Jul-26-2020, 02:13 PM
Hi, I am trying to scrape a web site with following code. But it comes with a Timeout Error as below.
TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
If I try with other websites, it works.
Wondering if sites can block urlopen?
Is there any way around?
Appreciate any help.
TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
If I try with other websites, it works.
Wondering if sites can block urlopen?
Is there any way around?
Appreciate any help.
from urllib.request import urlopen from bs4 import BeautifulSoup url = "https://www.nseindia.com/option-chain" html = urlopen(url) soup = BeautifulSoup(html,'lxml') type(soup) title = soup.title print(title)