Fix Gallery

This commit is contained in:
Serene-Arc
2021-03-18 11:01:34 +10:00
committed by Ali Parlakci
parent a9028434c4
commit 0929469bef
2 changed files with 29 additions and 17 deletions

View File

@@ -38,6 +38,4 @@ class Gallery(BaseDownloader):
links = soup.findAll('a', attrs={'target': '_blank', 'href': re.compile(r'https://preview\.redd\.it.*')})
links = [link.get('href') for link in links]
pattern = re.compile(r'(.*?)\?.*$')
links = [re.search(pattern, link).group(1) for link in links]
return links