alvarobartt / investpy

Financial Data Extraction from Investing.com with Python
https://investpy.readthedocs.io/
MIT License
1.59k stars 374 forks source link

Incredibly Slow Response #517

Closed mrkgoh closed 2 years ago

mrkgoh commented 2 years ago

Hi @alvarobartt ,

Firstly, thanks for your work. I use this package everyday.

Today 6 Feb 2022 10:08PM +8 GMT, I experienced a weird issue. I noticed that the response were terrribly slow, please see attached code:

t1 = time.time()
df = investpy.get_stock_information(stock='APER', country="malaysia")
print(time.time()-t1, ' seconds')
>>>257.2104423046112  seconds  # it took 257 seconds to complete. Why that is?

When I use Chrome browser to visit: www.investing.com the page loads fine without a problem.

mrkgoh commented 2 years ago

I found the issue with help of the following: https://stackoverflow.com/questions/62599036/python-requests-is-slow-and-takes-very-long-to-complete-http-or-https-request

It is related to my ipV6 settings on my router. I restore the backup settings of the router and it fixed the issue.

alvarobartt commented 2 years ago

Hi @mrkgoh, thanks for the information! 👍🏻 I think it's really useful to know that issue related to IPv6!