Python HTTP Error - 403 Forbidden -
i trying code run in python 3.3. here code:
import urllib.request html = urllib.request.urlopen("https://www.google.com/") html_code = html.read() html_code = str(html_code) sind = html_code.index("<cite class=]\"vurls\">") + len("<cite class=\"vurls\">") eind = html_code.index("</cite>") ser1resurl = html_code[sind:eind] print(ser1resurl)
it gives 403 forbidden error because of urllib.request.open(google)
Comments
Post a Comment