SuLab / WikidataIntegrator

A Wikidata Python module integrating the MediaWiki API and the Wikidata SPARQL endpoint
MIT License
244 stars 46 forks source link

Implement edit and page creation rate limit #60

Closed stuppie closed 6 years ago

stuppie commented 6 years ago

https://www.wikidata.org/wiki/Wikidata:Project_chat#Limit_page_creation_and_edit_rate

stuppie commented 6 years ago

I don't see a reasonable way to figure out what the rate limits are, so this is (to me) the best workaround. If you make a request to the mediawiki api and hit the rate limit, you get an actionthrottledtext error message. We then wait 30 seconds and retry again. If it still fails 10 times in a row, the action will fail. https://github.com/SuLab/WikidataIntegrator/commit/9851fabb291c825e91ba9aea2dac1fd8219962e8