i need to open an URL that is inside another URL, but i dont know how to do it
this is the code i wrote (im a beginner), and it send me a traceback: URLError: <urlopen error unknown url type: "http>
please help me
thank u
import re
import urllib.request, urllib.parse, urllib.error
fhand=urllib.request.urlopen("http://dr-chuck.com/page1.htm")
for line in fhand:
words=line.decode().strip()
if re.search("href=", words):
print(words)
w=words.split()
print(w)
i=w[1]
print(i)
p=i[5:40]
print(p)
q=urllib.request.urlopen(p)
print(q)