Move User-Agent string to config file

This commit is contained in:
Edward Betts 2024-03-21 08:57:38 +00:00
parent 97267c5f29
commit b3dc4ebf8e

View file

@ -58,7 +58,7 @@ warnings.filterwarnings("ignore", category=InsecureRequestWarning)
re_title = re.compile("<title>(.*?)</title>", re.DOTALL)
AGENT = "Mozilla/5.0 (Windows NT 6.1) Gecko/20100101 Firefox/29.0"
AGENT = config["browser"]["User-Agent"]
headers = {"User-Agent": AGENT, "Accept": "text/html"}
s = requests.Session()