remove trailing backslashes from url
This commit is contained in:
parent
a98d839bb6
commit
0141323473
|
@ -16,7 +16,8 @@ def Scrape(thread_url, output=None, original_filename=False, combo=False):
|
|||
"""
|
||||
Downloads thread page, extracts file urls and saves them to a directory.
|
||||
"""
|
||||
thread_url = re.sub(r"/?#.*$", "", thread_url)
|
||||
thread_url = re.sub(r"\/(?:#.+)?$", "", thread_url)
|
||||
# regex removes trailing backslashes and post number anchors
|
||||
|
||||
s = requests.Session()
|
||||
s.headers.update(HEADERS)
|
||||
|
|
Loading…
Reference in New Issue
Block a user