Merge pull request #337 from zerote000/master

Wikiapiary update script - Change Internet Archive search string to search using both API URL and Index URL.
pull/230/merge
nemobis 5 years ago committed by GitHub
commit be0dcd8e55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -52,7 +52,8 @@ def main():
print('No API found in WikiApiary, skiping')
continue
urliasearch = 'https://archive.org/search.php?query=originalurl:"%s"' % (apiurl)
indexurl = 'index.php'.join(apiurl.rsplit('api.php', 1))
urliasearch = 'https://archive.org/search.php?query=originalurl:"%s" OR originalurl:"%s"' % (apiurl, indexurl)
f = urllib.request.urlopen(urliasearch)
raw = f.read().decode('utf-8')
if re.search(r'(?i)Your search did not match any items', raw):

Loading…
Cancel
Save