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

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -