Hi MediaWiki dev,
I want to know the revision of a HTML of an article.
I noticed that every page (no matter which namespace an article is in), the HTML contains a section "printfooter", and there will be a url after that looks like: http://www.mediawiki.org/w/index.php?title=Manual:Footer&oldid=659536
The "oldid=659536" is just the revision id of the HTML of an article.
My question is, if this is a reliable way to find out the revision? Or is there other recommended way?
Thanks
On Thu, Mar 14, 2013 at 10:43 AM, Jiang BIAN bianjiang@google.com wrote:
Hi MediaWiki dev,
I want to know the revision of a HTML of an article.
I noticed that every page (no matter which namespace an article is in), the HTML contains a section "printfooter", and there will be a url after that looks like: http://www.mediawiki.org/w/index.php?title=Manual:Footer&oldid=659536
The "oldid=659536" is just the revision id of the HTML of an article.
My question is, if this is a reliable way to find out the revision? Or is there other recommended way?
You probably want something like this API query:
https://www.mediawiki.org/w/api.php?action=query&prop=revisions&titl...
-Chad
Thanks for your reply. Do you know other option?
More background about the reason of checking HTML revision: We are currently getting every wikipedia revision by monitoring "api.php?action=query&prop=recentchange", and get both wikitext and HTML of the revision. From the comment of code, it seems we want to reduce the number of requests to api.php, so we are fetching HTML without using api.php. The issue with fetching HTML without using api.php is that it's possible to get HTML at a different revision from the wikitext. So we need to find out a way to detect if the revision.
On Thu, Mar 14, 2013 at 7:52 AM, Chad innocentkiller@gmail.com wrote:
On Thu, Mar 14, 2013 at 10:43 AM, Jiang BIAN bianjiang@google.com wrote:
Hi MediaWiki dev,
I want to know the revision of a HTML of an article.
I noticed that every page (no matter which namespace an article is in),
the
HTML contains a section "printfooter", and there will be a url after that looks like:
http://www.mediawiki.org/w/index.php?title=Manual:Footer&oldid=659536
The "oldid=659536" is just the revision id of the HTML of an article.
My question is, if this is a reliable way to find out the revision? Or is there other recommended way?
You probably want something like this API query:
https://www.mediawiki.org/w/api.php?action=query&prop=revisions&titl...
-Chad
Mediawiki-api mailing list Mediawiki-api@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
On Thu, Mar 14, 2013 at 11:11 AM, Jiang BIAN bianjiang@google.com wrote:
Thanks for your reply. Do you know other option?
We are currently getting every wikipedia revision by monitoring "api.php?action=query&prop=recentchange", and get both wikitext and HTML of the revision. From the comment of code, it seems we want to reduce the number of requests to api.php, so we are fetching HTML without using api.php.
I haven't looked at the performance recently, but i suspect this api call
would be more efficient: http://www.mediawiki.org/w/api.php?action=parse&oldid=659536
If not, please let me know what performance issues you have seen.
On 14/03/13 15:43, Jiang BIAN wrote:
Hi MediaWiki dev,
I want to know the revision of a HTML of an article.
I noticed that every page (no matter which namespace an article is in), the HTML contains a section "printfooter", and there will be a url after that looks like: http://www.mediawiki.org/w/index.php?title=Manual:Footer&oldid=659536 http://www.mediawiki.org/w/index.php?title=Manual:Footer&oldid=659536
The "oldid=659536" is just the revision id of the HTML of an article.
My question is, if this is a reliable way to find out the revision? Or is there other recommended way?
Thanks
You will also have it in the "Permanent link" link of the sidebar and as wgCurRevisionId in the javascript variables set at the top.
On Thu, Mar 14, 2013 at 8:11 AM, Platonides platonides@gmail.com wrote:
On 14/03/13 15:43, Jiang BIAN wrote:
Hi MediaWiki dev,
I want to know the revision of a HTML of an article.
I noticed that every page (no matter which namespace an article is in), the HTML contains a section "printfooter", and there will be a url after that looks like:
http://www.mediawiki.org/w/index.php?title=Manual:Footer&oldid=659536< http://www.mediawiki.org/w/index.php?title=Manual:Footer&oldid=659536%3E
The "oldid=659536" is just the revision id of the HTML of an article.
My question is, if this is a reliable way to find out the revision? Or is there other recommended way?
Thanks
You will also have it in the "Permanent link" link of the sidebar and as
Thanks for pointing out :) seems I can use this as a double-check.
wgCurRevisionId in the javascript variables set at the top.
The value in this variable should always be the latest revision of the article, right?
Mediawiki-api mailing list Mediawiki-api@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
mediawiki-api@lists.wikimedia.org