From 4952fc56974e3e70372851b0cd32b44097ebc607 Mon Sep 17 00:00:00 2001 From: manasbichoo Date: Sat, 12 Oct 2019 18:22:13 +0530 Subject: [PATCH] Added user agent strings to make the project more reliable and secure --- g4g.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/g4g.py b/g4g.py index e82f07b..726a5aa 100755 --- a/g4g.py +++ b/g4g.py @@ -14,6 +14,8 @@ BASE_URL = "http://www.geeksforgeeks.org/" articles = [] +headers = ({'User-Agent': + 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36'}) CHOICE_TO_CATEGORY_MAPPING = { 1: "c",