jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/806554 )
Change subject: Revert: [bugfix] weblinkchecker.py: Use https for web.archive.org ......................................................................
Revert: [bugfix] weblinkchecker.py: Use https for web.archive.org
It's a temporary patch until the bug waiting for this bug to be fixed by memento_client library
this reverts I26cfebe7c1a09a93dfe4be659226ecb08f9315d5 because the issue is solved upstream
Bug: T167463 Change-Id: I3491fb11b618dc27da386b21aed235c6cb83dead --- M scripts/weblinkchecker.py 1 file changed, 2 insertions(+), 7 deletions(-)
Approvals: D3r1ck01: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/weblinkchecker.py b/scripts/weblinkchecker.py index 215b8d8..0662820 100755 --- a/scripts/weblinkchecker.py +++ b/scripts/weblinkchecker.py @@ -175,18 +175,13 @@ def get_archive_url(url): """Get archive URL.""" try: - archive = get_closest_memento_url( + return get_closest_memento_url( url, timegate_uri='http://web.archive.org/web/') except Exception: - archive = get_closest_memento_url( + return get_closest_memento_url( url, timegate_uri='http://timetravel.mementoweb.org/webcite/timegate/')
- # FIXME: Hack for T167463: Use https instead of http for archive.org links - if archive.startswith('http://web.archive.org'): - archive = archive.replace('http://', 'https://', 1) - return archive -
def weblinks_from_text( text,