The name says a lot about everything. Here is my code:
from urllib2 import urlopen as getpage print = getpage("www.radioreference.com/apps/audio/?ctid=5586")
and a trace error appears here:
Traceback (most recent call last): File "C:/Users/**/Dropbox/Dev/ComServ/citetest.py", line 2, in <module> contents = getpage("www.radioreference.com/apps/audio/?ctid=5586") File "C:\Python25\lib\urllib2.py", line 121, in urlopen return _opener.open(url, data) File "C:\Python25\lib\urllib2.py", line 366, in open protocol = req.get_type() File "C:\Python25\lib\urllib2.py", line 241, in get_type raise ValueError, "unknown url type: %s" % self.__original ValueError: unknown url type: www.radioreference.com/apps/audio/?ctid=5586
My best guess is that urllib cannot fetch data from untidy php urls. if so, is there any work? If not, what am I doing wrong?
source share