Skip to content

Commit

Permalink
changed the request User-Agent to accepted value
Browse files Browse the repository at this point in the history
  • Loading branch information
frruit authored and frruit committed Jul 4, 2021
1 parent 0fa63ef commit 2f9ad7b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions backtrader/feeds/yahoo.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ def start_v7(self):

crumb = None
sess = requests.Session()
sess.headers['User-Agent'] = 'backtrader'
for i in range(self.p.retries + 1): # at least once
resp = sess.get(url, **sesskwargs)
if resp.status_code != requests.codes.ok:
Expand Down

0 comments on commit 2f9ad7b

Please sign in to comment.