From b3a74584e9575da177a3dc6f47d566610cf0370f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Sun, 28 Jun 2020 21:46:55 +0200 Subject: [PATCH] Explicitly declare parser. --- main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index a538683..f838b01 100644 --- a/main.py +++ b/main.py @@ -11,7 +11,9 @@ if __name__ == '__main__': h = httplib2.Http('.cache') response, content = h.request(args.site) - s = BeautifulSoup(content) + + s = BeautifulSoup(content,features='html.parser') + """find only file names""" links = s.find_all(href=re.compile(args.filter)) if not links or links == 0: