Fix bs4 warning by specifying parser

This commit is contained in:
Serene-Arc
2021-03-21 18:58:32 +10:00
committed by Ali Parlakci
parent 1215bc69de
commit 3ca2df067f
3 changed files with 3 additions and 3 deletions

View File

@@ -34,7 +34,7 @@ class Gallery(BaseDownloader):
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
}
)
soup = bs4.BeautifulSoup(page.text)
soup = bs4.BeautifulSoup(page.text, 'html.parser')
links = soup.findAll('a', attrs={'target': '_blank', 'href': re.compile(r'https://preview\.redd\.it.*')})
links = [link.get('href') for link in links]