ValueError: unknown url type: h : <p>I wrote an application in python to download the file at a specified hour but I received <strong>ValueError: unknown url type: h</strong> Error
this is my code</p>

<pre><code>import time,os,urllib2
coun=input("Enter count of the movies:")
x=0
namelist=[]
addresslist=[]
os.chdir('D:\\')
while(coun &gt; x):
    name=raw_input("Enter the name of movie:")
    namelist.append(name)
    address=raw_input("enter the address of %s:"%(name))
    addresslist.append(address)
    x=x+1
ti= time.localtime().tm_hour
print('it\'s wating...')
while(ti!=11):
    ti= time.localtime().tm_hour
    timi=time.localtime().tm_min
    tisec=time.localtime().tm_sec
    if (ti==3 &amp; timi==59 &amp; tisec==59):
        print('it\'s 3')
print('it\'s your time.let start downloating')
x=0
while(coun &gt; x):
    data=urllib2.urlopen(address[x])
    file=open(namelist[x],'wb')
    file.write(data)
    file.close()
    x=x+1
</code></pre>

<p>And when I run it and answer the questions that return to me this Error:</p>

<pre><code>Traceback (most recent call last):
  File "tidopy.py", line 24, in &lt;module&gt;
    data=urllib2.urlopen(address[x])
  File "C:\Python27\lib\urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "C:\Python27\lib\urllib2.py", line 421, in open
    protocol = req.get_type()
  File "C:\Python27\lib\urllib2.py", line 283, in get_type
    raise ValueError, "unknown url type: %s" % self.__original
ValueError: unknown url type: h
</code></pre>

<p><strong>How can I fix it?</strong>
  please help</p>
