I'm trying to navigate to a specific webpage, using urllib.request.urlopen.
hdr = 'Mozilla/5.0 (Windows NT 6.1; Win64; x64)'
my_url ='https://www.cms.co.il/catalog/products.aspx?keySearch=9SX3000I'
weburl = urllib.request.urlopen(my_url,headers=hdr,timeout=30)
I'm getting an error: urlopen() got an unexpected keyword argument 'headers'
I've tried to remove the header, but then I'm getting the error: HTTP Error 403: Forbidden
how to reach this page without getting an error?
from when navigating to an url, I'm getting error: "urlopen() got an unexpected keyword argument 'headers' "
No comments:
Post a Comment