Skip to content

Commit

Permalink
uploader.py: Handle protocol-relative base URL
Browse files Browse the repository at this point in the history
  • Loading branch information
nemobis committed Mar 5, 2020
1 parent 573623e commit 3ddfa85
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ def upload(wikis, config={}, uploadeddumps=[]):
sitename = wikiname
if not baseurl:
baseurl = re.sub(ur"(?im)/api\.php", ur"", wiki)
# Convert protocol-relative URLs
baseurl = re.sub('^//', 'https://', baseurl)
if lang:
lang = convertlang.has_key(lang.lower()) and convertlang[lang.lower()] or lang.lower()

Expand Down

0 comments on commit 3ddfa85

Please sign in to comment.