Explicitly declare parser.

This commit is contained in:
Lukáš Kucharczyk 2020-06-28 21:46:55 +02:00
parent 9864ad2617
commit b3a74584e9
1 changed files with 3 additions and 1 deletions

View File

@ -11,7 +11,9 @@ if __name__ == '__main__':
h = httplib2.Http('.cache') h = httplib2.Http('.cache')
response, content = h.request(args.site) response, content = h.request(args.site)
s = BeautifulSoup(content)
s = BeautifulSoup(content,features='html.parser')
"""find only file names""" """find only file names"""
links = s.find_all(href=re.compile(args.filter)) links = s.find_all(href=re.compile(args.filter))
if not links or links == 0: if not links or links == 0: