requests.get in python giving connection timeout error
问题 Language Ver: Python 3.6.3 IDE Ver: PyCharm 2017.2.3 I was trying to parse a weather website to print weather for a place. As I am learning Python, previously I used urllib.request.urlopen(url).read() and it worked. Now, I am modifying the code to BeautifulSoup4 and requests module. Below is my code: from bs4 import * import requests url = "https://www.accuweather.com/en/in/dhenkanal/189844/weather-forecast/189844" data = requests.get(url) soup = BeautifulSoup(data.text, "html.parser") print