Yes, I added a user agent, and that worked. Thanks!
On Tue, Dec 29, 2009 at 4:19 PM, Platonides <platonides(a)gmail.com> wrote:
Anand Ramanathan wrote:
I have a requirement to inspect a given wikipage's url to determine if
its size exceeds 500kb, and to get the page, truncate it to 500kb and
pass it to some api.
I couldnt find a way to determine the size of a wikipage through the api.
You can get page size via the api using rvprop=size, or by grabbing the
revision content and looking at its length.
I also tried to call HEAD on the wikipage. I do
get results sometimes,
but sometimes I get an http 403 forbidden. The same thing happens with
http GET on the page. The pages I tried most often for testing were
Identify yourself. Give your program a proper user-agent, like "Anand
500kb program". If you use the generic user agent of your framework or
try to make you pass as a browser you will be blocked.
Can you suggest an effective way to achieve the
Mediawiki-api mailing list