Skip to content

Commit

Permalink
Update hulk.py (#11)
Browse files Browse the repository at this point in the history
Accepts both http and https without forcing https.
  • Loading branch information
Hyperclaw79 committed Jun 5, 2020
1 parent 36283db commit 2b46c9c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions hulk.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@
class Missile():
def __init__(self, root, url, loop):
self.root = root
self.base_url = url
self.url = url.replace('http://', 'https://')
self.url = self.base_url = url
if self.url.count("/") == 2:
self.url += "/"
m = re.search('https\://([^/]*)/?.*', self.url)
m = re.search('http[s]?\://([^/]*)/?.*', self.url)
self.host = m.group(1)
url_fmt = self.url.rstrip('/')
if self.url.count("?") > 0: # For Quering type urls
Expand Down

0 comments on commit 2b46c9c

Please sign in to comment.