Hello all, API is one of the most important features of MW and it has been used on WMF wikis since 2009 If I recall correctly I want to use API on everything remained (in PWB codes) in order to reduce pressure on servers but this idea of supporting non-API wikis is really annoying and unreasonable in my opinion
I think we must end supporting non-API wikis, If you're not agree with me, tell me why not
Best
Can we solve everything through API? I have a script that I wrote a few years ago, and I had to analyze HTML code to distunguish "red" and "blue" links on a page because there was no API function for that.
(sorry for poor english grammar )
I think you want to distunguish the link page is exist or not in wikitext. You don't need to analyze HTML tags now, just use
- Page().linkedPages() to get all links Page() object in the page you want. - getall(site, pagelist) to load all links detail. - pagelist[x].get() to get wikitexts.
if page is not exist, you will get the exception NoPage.
There's use two API requests, and easy to solve it.
2013/4/22 Bináris wikiposta@gmail.com
Can we solve everything through API? I have a script that I wrote a few years ago, and I had to analyze HTML code to distunguish "red" and "blue" links on a page because there was no API function for that.
-- Bináris _______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Thank you! I don't protect non-API wikis at all, they have a room in the museum, I only want to be sure that we can do everything with API.
2013/4/22 Alex S.H. Lin alexsh.tw@gmail.com
(sorry for poor english grammar )
I think you want to distunguish the link page is exist or not in wikitext. You don't need to analyze HTML tags now, just use
- Page().linkedPages() to get all links Page() object in the page you
want.
- getall(site, pagelist) to load all links detail.
- pagelist[x].get() to get wikitexts.
if page is not exist, you will get the exception NoPage.
There's use two API requests, and easy to solve it.
2013/4/22 Bináris wikiposta@gmail.com
Can we solve everything through API? I have a script that I wrote a few years ago, and I had to analyze HTML code to distunguish "red" and "blue" links on a page because there was no API function for that.
-- Bináris _______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
-- I always keep my spirit minority.
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
I am not sure whether we need non-API-wiki support anymore. We have the rewrite branch for fully API support. And trunk release supports both but it fails with getAll method for some sites. Indeed I am against a mixed stucture who merged to API based site methods and cuts older methods which means they never works again. As demonstrated in rewrite branch there could be exists more than one site object. We have BaseSite for basic methods, APISite for API call methods and DataSite for methods dealing with Wikidata. Why couldn't we have a site object for non-API wikis? Maybe we do not need non-API support anymore. Ok, than we should archive the actual framework and remove old code stuff, perhaps merge from or to rewrite branch and hold only one framework, which would be easier to support instead of doing the same part twice as it is today.
Greetings
xqt
----- Original Nachricht ---- Von: Amir Ladsgroup ladsgroup@gmail.com An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 21.04.2013 22:42 Betreff: [Pywikipedia-l] Stop supporting non-API wikis
Hello all, API is one of the most important features of MW and it has been used on WMF wikis since 2009 If I recall correctly I want to use API on everything remained (in PWB codes) in order to reduce pressure on servers but this idea of supporting non-API wikis is really annoying and unreasonable in my opinion
I think we must end supporting non-API wikis, If you're not agree with me, tell me why not
Best
Amir
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
I don't say API is everything we need. I used http for a similar purpose once but I say running bots on a wiki without API support is like playing Crysis 2 on a computer with Windows 98 Supporting non-API wikis is just a holding back and nothing more besides I don't think any wiki now using very old versions or disabled API.
Best for all
On 4/22/13, info@gno.de info@gno.de wrote:
I am not sure whether we need non-API-wiki support anymore. We have the rewrite branch for fully API support. And trunk release supports both but it fails with getAll method for some sites. Indeed I am against a mixed stucture who merged to API based site methods and cuts older methods which means they never works again. As demonstrated in rewrite branch there could be exists more than one site object. We have BaseSite for basic methods, APISite for API call methods and DataSite for methods dealing with Wikidata. Why couldn't we have a site object for non-API wikis? Maybe we do not need non-API support anymore. Ok, than we should archive the actual framework and remove old code stuff, perhaps merge from or to rewrite branch and hold only one framework, which would be easier to support instead of doing the same part twice as it is today.
Greetings
xqt
----- Original Nachricht ---- Von: Amir Ladsgroup ladsgroup@gmail.com An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 21.04.2013 22:42 Betreff: [Pywikipedia-l] Stop supporting non-API wikis
Hello all, API is one of the most important features of MW and it has been used on WMF wikis since 2009 If I recall correctly I want to use API on everything remained (in PWB codes) in order to reduce pressure on servers but this idea of supporting non-API wikis is really annoying and unreasonable in my opinion
I think we must end supporting non-API wikis, If you're not agree with me, tell me why not
Best
Amir
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Slightly highjacking this thread, sorry in advance.
I'd much rather see effort put into the rewrite branch than trying to remove support from trunk. There's a very-incomplete list of things to do here[1] and some general brainstorming ideas. The original rewrite proposal[2] said that we should branch for every release of MediaWiki (1.20, 1.21, etc). If someone needs to run for an older version, they just use an older branch.
It's also worth noting that there are still very important functions that the API doesn't support yet like revision deletion[3] and globalblocking[4]. (As an aside, I have a patch to screenscrape revdel's nearly ready).
tl;dr: Focus on improving rewrite :)
[1] https://www.mediawiki.org/wiki/Manual:Pywikipediabot/2.0 [2] http://botwiki.sno.cc/wiki/Rewrite [3] https://bugzilla.wikimedia.org/show_bug.cgi?id=23005 [4] https://bugzilla.wikimedia.org/show_bug.cgi?id=16214
-- Legoktm
On Tue, Apr 23, 2013 at 2:02 PM, Amir Ladsgroup ladsgroup@gmail.com wrote:
I don't say API is everything we need. I used http for a similar purpose once but I say running bots on a wiki without API support is like playing Crysis 2 on a computer with Windows 98 Supporting non-API wikis is just a holding back and nothing more besides I don't think any wiki now using very old versions or disabled API.
Best for all
On 4/22/13, info@gno.de info@gno.de wrote:
I am not sure whether we need non-API-wiki support anymore. We have the rewrite branch for fully API support. And trunk release supports both
but it
fails with getAll method for some sites. Indeed I am against a mixed stucture who merged to API based site methods and cuts older methods
which
means they never works again. As demonstrated in rewrite branch there
could
be exists more than one site object. We have BaseSite for basic methods, APISite for API call methods and DataSite for methods dealing with
Wikidata.
Why couldn't we have a site object for non-API wikis? Maybe we do not
need
non-API support anymore. Ok, than we should archive the actual framework
and
remove old code stuff, perhaps merge from or to rewrite branch and hold
only
one framework, which would be easier to support instead of doing the same part twice as it is today.
Greetings
xqt
----- Original Nachricht ---- Von: Amir Ladsgroup ladsgroup@gmail.com An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 21.04.2013 22:42 Betreff: [Pywikipedia-l] Stop supporting non-API wikis
Hello all, API is one of the most important features of MW and it has been used on WMF wikis since 2009 If I recall correctly I want to use API on everything remained (in PWB codes) in order to reduce pressure on servers but this idea of supporting non-API wikis is really annoying and unreasonable in my opinion
I think we must end supporting non-API wikis, If you're not agree with me, tell me why not
Best
Amir
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
-- Amir
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
pywikipedia-l@lists.wikimedia.org