Skip to content

Commit

Permalink
[fix] fix error message and Accept-Encodng.
Browse files Browse the repository at this point in the history
  • Loading branch information
t-tani committed Jun 28, 2021
1 parent 2bd7d01 commit d1cb63d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions investpy/stocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1642,7 +1642,7 @@ def get_stock_earnings(stock, country):
"User-Agent": random_user_agent(),
"X-Requested-With": "XMLHttpRequest",
"Accept": "text/html",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
}

Expand Down Expand Up @@ -1695,4 +1695,4 @@ def get_stock_earnings(stock, country):
df = pd.DataFrame(objs)
return df
else:
raise RuntimeError("ERR#0061: introduced stock has no dividend's data to display.")
raise RuntimeError("ERR#0061: introduced stock has no earnings history's data to display.")

0 comments on commit d1cb63d

Please sign in to comment.