Remove splice and fix quotes
This commit is contained in:
parent
8bd4b8b3a9
commit
f0d3cfefc0
1 changed files with 4 additions and 2 deletions
|
@ -38,8 +38,10 @@ class Imgur(BaseDownloader):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _get_data(link: str) -> dict:
|
def _get_data(link: str) -> dict:
|
||||||
if re.match(r".*i\.imgur\.com.*\.gifv$", link):
|
if re.match(r'.*i\.imgur\.com.*\.gifv$', link):
|
||||||
link = link.replace("i.imgur", "imgur")[:-5]
|
link = link.replace('i.imgur', 'imgur')
|
||||||
|
link = link.rstrip('.gifv')
|
||||||
|
|
||||||
res = requests.get(link, cookies={'over18': '1', 'postpagebeta': '0'})
|
res = requests.get(link, cookies={'over18': '1', 'postpagebeta': '0'})
|
||||||
|
|
||||||
if res.status_code != 200:
|
if res.status_code != 200:
|
||||||
|
|
Loading…
Reference in a new issue