Fix the 'www.' strip changing the lstrip method by the replace
This commit is contained in:
parent
fe1f3ec06c
commit
596b435e57
1 changed files with 1 additions and 1 deletions
|
|
@ -9,7 +9,7 @@ def bucket_name_from_url(url):
|
||||||
domain = urlparse.urlparse(url).netloc
|
domain = urlparse.urlparse(url).netloc
|
||||||
|
|
||||||
# If 'www' prefixed, strip it.
|
# If 'www' prefixed, strip it.
|
||||||
domain = domain.lstrip("www.")
|
domain = domain.replace("www.", "")
|
||||||
|
|
||||||
if 'amazonaws.com' in domain:
|
if 'amazonaws.com' in domain:
|
||||||
bucket_result = bucket_name_regex.search(domain)
|
bucket_result = bucket_name_regex.search(domain)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue