get_live_price() Not working
Closed this issue · 6 comments
+1 Suddenly stopped working in last 12-18 hours.
Just to confirm - the pending PR does not fix this issue
Printing out the response to the yahoo request:
<Response [403]>
Not sure that is fixable - right?
It happened the same to me. I looked at the code in the get_data
function. If you add the user-agent to the header:
headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36'}
result = requests.get(site, params=params, headers=headers)
and pass it to the request, it does work. However, I don't know if yahoo will eventually block these requests.
Thanks for notifying me of the issue - I'm looking into it, and will try to push a patch (if possible) within the next 24 hours
Please download the latest version - 0.8.9.1. I just pushed this patch to PyPI to update the headers, per @erickmartinez suggestion. This should hopefully resolve these issues. Thank you all for posting and the suggestions.