diff --git a/crawler.py b/crawler.py index 52b8124..23dc8ec 100644 --- a/crawler.py +++ b/crawler.py @@ -22,7 +22,7 @@ def save_data(file_name, data): def main(args): category_dict = {"green": "Uwierzytelniona", "yellow": "Skorygowana", "red": "Przepisana"} - if args.start_page: + if args.start_file_name and args.start_page_number: CATEGORY_URL = f"{MAIN_URL}/w/index.php?title=Kategoria:{category_dict[args.type]}&pagefrom={args.start_file_name}" else: CATEGORY_URL = f"{MAIN_URL}/wiki/Kategoria:{category_dict[args.type]}"