For API searches does the size value for srprop refer to the size of the
snippet value or something else?
If it isn't for the snippet value is there any way to predict the
snippet length?
--tomasz
Hi,
What is the best way to programmatically get the attribution text for
creative commons images? I was told that the category containing the license
would contain the attribution text, but found many images dont follow that
process. Some images, for example, Max_Planck.png have some attribution
requirements buried inside the description - but that is hard to extract and
automate. Any suggestions?
Thanks
Anand
As of Monday Feb 15, passing a User-Agent header is mandatory for
*all* HTTP requests to Wikimedia sites. This includes the API. If your
client doesn't provide a User-Agent header, it'll receive HTTP 403
errors with the text "Please provide a User-Agent" or something along
those lines. This was announced in a (now rather lengthy) thread on
wikitech-l: http://lists.wikimedia.org/pipermail/wikitech-l/2010-February/046777.html
Ideally, your User-Agent header should identify your client in such a
way that Wikimedia staff are able to figure out who to contact if your
client is somehow engaging in disruptive behavior. Putting in an
e-mail address works well for this, but mentioning your wiki username,
the name of the wiki page of the tool (with wiki prefix, so they know
on which of the 812 wikis to look) or a URL to a page about you or
your tool are fine too, provided that they lead to a functional way of
contacting you.
Please don't take this as "if I set a User-Agent my client will
potentially be blocked". If it's being disruptive, it'll be blocked
anyway; if you set a User-Agent header, you'll be informed
immediately, or better, get a chance to fix your client without having
it blocked.
Roan Kattouw (Catrope)
_______________________________________________
Mediawiki-api-announce mailing list
Mediawiki-api-announce(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce
Hello,
I am stuck with image uploading from file system
I have a path c:\images\abc.jpg
This image I want to upload on wiki
but it doesnt work
sample code looks like
$file = "c:\\images\\D4215_0_0.jpg";
$data = "action=upload&filename=$file&token=%2B%5C";
$path = "/mediawiki/api.php";
echo "socket opened";
fputs($fp, "POST $path HTTP/1.1\r\n");
fputs($fp, "Host: $host\r\n");
fputs($fp, "Content-type: multipart/form-data \r\n");
fputs($fp, "Content-length: ". strlen($data) ."\r\n");
fputs($fp, "\r\n");
fputs($fp, $data);
can you please help me whats wrong here?
--
View this message in context: http://old.nabble.com/Image-uploading-tp27544560p27544560.html
Sent from the WikiMedia API mailing list archive at Nabble.com.
Hello,
Is it possible to change a specific section of existing page using API?
Is it possible to have seperate TOC for list of figures or list of tables?
Thanx in advance
--
View this message in context: http://old.nabble.com/Section-editing-tp27435551p27435551.html
Sent from the WikiMedia API mailing list archive at Nabble.com.
Hi,
According to the API documentation the "titles" argument can take a
list of titles,e.g.
http://en.wikipedia.org/w/api.php?titles=The_Matrix|Casablanca_%28film%29&a…
Is there a limit on # of titles I can string together?
Would it be possible to combine a large number (say, 100 or 1000) into
one API request?
Thanks,
Eric
Hi,
Is it possible to know using the MediaWiki API when an article was
added to a given category?
More specifically, I'm looking for the dates when featured articles
where labeled as featured.
If this turns out to be impossible via the API, how can this
information be obtained otherwise?
Thanks in advance for your comments,
--
Sérgio Nunes