+ 1
its showing http error ..im new to crawling using py
import re import urllib.request url = "https://finance.google.com/finance?q= " stock = input("enter your stock: ") url = url + stock data = urllib.request.urlopen(url).read() data1 = data.decode("utf-8") print(data1)
3 Respostas
+ 6
Try using "requests" module, instead of "urllib.request" when https doesn't seem to work.
+ 2
thank you now its working
+ 2
I updated my version of Python and urllib above code works fine😆