toolforge / video2commons

Transfer video and audio from external sites to Commons.
https://video2commons.toolforge.org/
GNU General Public License v3.0
44 stars 24 forks source link

Handle spamblacklist #72

Closed owcz closed 7 years ago

owcz commented 7 years ago

An exception occurred: TaskError: pywikibot.Error: APIError: spamblacklist: The text you wanted to save was blocked by the spam filter. This is probably caused by a link to a blacklisted external site. [filekey:....webm; message:{u'params': u'bit.ly/11jJQQT', u'key': u'spamprotectionmatch'}; sessionkey:....webm; help:See https://commons.wikimedia.org/w/api.php for API usage.; spamblacklist:{u'matches': [u'bit.ly/11jJQQT']}] (Removed identifying info)

A friendlier error here would be to say that the bit.ly link needs to be removed, or else catch this in the license setup process before it goes to upload (otherwise have to re-customize info again).

zhuyifei1999 commented 7 years ago

Pywikibot does not seem to have native support to Spamblacklist API. If the tool needs to call that API, I'll try to find the regexes in which the extension gets the list of urls and somehow make pywikibot call that API with the list.