From 9f1bd098bce7b11876aff28f6907124b133fcf42 Mon Sep 17 00:00:00 2001 From: Samuel Sloniker Date: Sat, 4 Dec 2021 18:45:45 -0800 Subject: [PATCH] Use newer user agent --- stockquotes/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stockquotes/__init__.py b/stockquotes/__init__.py index abf2e6e..9377a91 100644 --- a/stockquotes/__init__.py +++ b/stockquotes/__init__.py @@ -43,7 +43,7 @@ class Stock: r = requests.get( "https://finance.yahoo.com/quote/{}/history".format(ticker), headers={ - "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3941.4 Safari/537.36" + "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:92.0) Gecko/20100101 Firefox/92.0" }, ) except: