From e4928d4e98f0fd0583e94198b474cd9b1a4878b6 Mon Sep 17 00:00:00 2001 From: minoplhy Date: Fri, 1 Oct 2021 15:01:29 +0700 Subject: [PATCH] multi url --- crawler.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/crawler.py b/crawler.py index a5cf055..2fafdee 100644 --- a/crawler.py +++ b/crawler.py @@ -18,6 +18,17 @@ def download_filters(url,incoming): f.write(data) return url +def download_group_filters(multi_url,incoming): + for url in multi_url: + print("downloading: ",url) + + get = requests.get(url) + if get.status_code == requests.codes.ok: + with open(incoming, 'ab') as f: + for data in get: + f.write(data) + return url + def filtering(filters_welcome): unwanted = ['#',';','@','$',' NS',' NS','@@||','!','local-data:','-'] print("filtering . . .")