index range Error
<p>i keep getting an error 'IndexError: list index out of range'</p>

<p>not sure what im doing wrong it works for a couple runs an error
the only thing i can think of is that the names i getting are too long for the variable </p>

<pre><code>        mylist = [x +'.mp3' for x in re.findall(r'file=(.*?).mp3',the_webpage)]
    #Remove Duplicates
    if mylist:
        mylist.sort()
        last = mylist[-1]
        for i in range(len(mylist)-3, -1, -1):
            if last == mylist[i]:
                del mylist[i]
            else:
                last = mylist[i]
    print " "
    #takes the quotes out of the string
    #ti = titl1[0]
    n1 = titl1[0]
    n2 = song1[0]

    #sg = song1
    sname = "".join(tuple(n1 + "-" + n2 + ".mp3"))

    print sname
    url = mylist[0]
</code></pre>

<p>results</p>

<pre><code>Traceback (most recent call last):
  File "grub.py", line 59, in &lt;module&gt;
    url = mylist[0]
IndexError: list index out of range
</code></pre>
