Hi, I was playing with properties as written at https://www.mediawiki.org/wiki/API:Properties#Info:_Parameters I spent a lot of time, but I cannot get the properties watched and preload anyway. Preload is empty for an existing page and None for a non-existing page with preload; watched doeas not appear at all. I tried it in browser as well as with bot, logged in as admin. Could somebody please provide me a working link that shows watched and preload? Page example with preloadhttp://hu.wikipedia.org/w/index.php?action=edit&preload=Wikip%C3%A9dia%3AJavaslat+tiszts%C3%A9gvisel%C5%91k+megv%C3%A1laszt%C3%A1s%C3%A1ra%2Fpreload&editintro=&summary=&nosummary=&prefix=&minor=&title=Wikip%C3%A9dia%3AJavaslat+tiszts%C3%A9gvisel%C5%91k+megv%C3%A1laszt%C3%A1s%C3%A1ra%2Fddd&create=%C3%9Aj+v%C3%A1laszt%C3%A1si+allap+l%C3%A9trehoz%C3%A1sa
I am interested in new pages in namespace MediaWiki where a text is preloaded but without a preload subpage (I guess taken from translatewiki). Do they qualify as preload and may be got by API?
Hi, the query would be something like:
http://hu.wikipedia.org/w/api.php?action=query&titles=Wikip%C3%A9dia:Jav...
But I think pages without a preload subpage will show with an empty preload. Just because you can link to a page with a preload link, doesn't mean that page has preload.
Also, I think would be best if you included what have you tried in your question the next time, because that way, people can pinpoint where exactly was your mistake, or look somewhere else if you did everything correctly.
Petr Onderka [[en:User:Svick]]
On Fri, Mar 23, 2012 at 16:37, Bináris wikiposta@gmail.com wrote:
Hi, I was playing with properties as written at https://www.mediawiki.org/wiki/API:Properties#Info:_Parameters I spent a lot of time, but I cannot get the properties watched and preload anyway. Preload is empty for an existing page and None for a non-existing page with preload; watched doeas not appear at all. I tried it in browser as well as with bot, logged in as admin. Could somebody please provide me a working link that shows watched and preload? Page example with preloadhttp://hu.wikipedia.org/w/index.php?action=edit&preload=Wikip%C3%A9dia%3AJavaslat+tiszts%C3%A9gvisel%C5%91k+megv%C3%A1laszt%C3%A1s%C3%A1ra%2Fpreload&editintro=&summary=&nosummary=&prefix=&minor=&title=Wikip%C3%A9dia%3AJavaslat+tiszts%C3%A9gvisel%C5%91k+megv%C3%A1laszt%C3%A1s%C3%A1ra%2Fddd&create=%C3%9Aj+v%C3%A1laszt%C3%A1si+allap+l%C3%A9trehoz%C3%A1sa
I am interested in new pages in namespace MediaWiki where a text is preloaded but without a preload subpage (I guess taken from translatewiki). Do they qualify as preload and may be got by API?
-- Bináris _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
2012/3/23 Petr Onderka gsvick@gmail.com
Hi, the query would be something like:
http://hu.wikipedia.org/w/api.php?action=query&titles=Wikip%C3%A9dia:Jav...http://hu.wikipedia.org/w/api.php?action=query&titles=Wikip%C3%A9dia:Javaslat%20tiszts%C3%A9gvisel%C5%91k%20megv%C3%A1laszt%C3%A1s%C3%A1ra/ddd&prop=info&inprop=watched%7Cpreload
That's what I say: preload is empty and watched is completely missing from result.
But I think pages without a preload subpage will show with an empty preload. Just because you can link to a page with a preload link, doesn't mean that page has preload.
This one has, you may see if you click on my original link.
Also, I think would be best if you included what have you tried in your question the next time
E.g. this is what I tried what you have just linked; it is an example of fail.
Thanks,
Hi,
That's what I say: preload is empty and watched is completely missing from result.
Watched behaves correctly for me, if you aren't watching the page, then the watched attribute *should* be missing. Try watching the page and you'll notice the parameter is there (as long as you query the API when logged in under the same account).
But I think pages without a preload subpage will show with an empty preload. Just because you can link to a page with a preload link, doesn't mean that page has preload.
This one has, you may see if you click on my original link.
No, the page doesn't have any preload. You can see that if you try editing it in normal way. *Your link* has preload (notice the preload parameter), but that has nothing to do with the page itself, so it won't show in the API.
Also, I think would be best if you included what have you tried in your question the next time
E.g. this is what I tried what you have just linked; it is an example of fail.
And if you said that right away, you might have gotten the answer that will actually help you faster, which was my point.
Petr Onderka [[en:User:Svick]]
2012/3/23 Petr Onderka gsvick@gmail.com
Watched behaves correctly for me, if you aren't watching the page, then the watched attribute *should* be missing.
Thanks. Then I misunderstood the help page: watched: Indicates whether or not the page is being watched. So it indicates whether or not it is being watched* by me* (not watched at all by anybody); one may think from this text that it returns a true or false, not that it will be missing. I will correct the help page so as other people won't spend time with the same again. (Anyway, in this case it is useless for bot work.)
No, the page doesn't have any preload. You can see that if you try editing it in normal way. *Your link* has preload (notice the preload parameter), but that has nothing to do with the page itself, so it won't show in the API.
OK, there is a button we create these pages with, but you are right, it is not the own preload of this page. So a preload means here a /preload subpage under the desired page? Can you show me a positive example please?
Now the main field of my interest is MW namespace, as I wrote in the other letter. Let's take this page: http://hu.wikipedia.org/wiki/MediaWiki:Emailpagetext/de It displays some text from Translatewiki that will appear in edit window if you try to edit the page but editing means really creating, and it is written above the window that "page does not exist". How can I make sure if any text on the page exists this way and get it?
Page{[[MediaWiki:Emailpagetext/de]]} page.get() Traceback (most recent call last): ... File "wikipedia.py", line 772, in _getEditPage "Page does not exist."
2012/3/23 Bináris wikiposta@gmail.com
I am interested in new pages in namespace MediaWiki where a text is preloaded but without a preload subpage (I guess taken from translatewiki). Do they qualify as preload and may be got by API?
The goal is to be able to mass create MW pages by bot. One needs to have the default preloaded text first and then complete it with the desired text, or else the previously visible contents will disappear after creating the page. Pywikibot currently throws a NoPage error for such pages if I try to get the text; so I must first make it get the preload if exists.
wikitech-l@lists.wikimedia.org