import urllib2
band = raw_input(\"Band name: \")
song = raw_input(\"Song name: \")
filename = song + \'.html\'
band = band.replace(\' \',\'+\')
song = song.replace(\' \', \'+\')
#print band
url = \'http://www.google.com/search?hl=en&safe=off&q=intitle:\"index+of\"+\"%s\"+\"%s\"&btnG=Search\' % (song, band)
#print url
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor())
opener.addheaders = [(\'User-agent\', \'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)\')]
urllib2.install_opener(opener)
stuff = urllib2.urlopen(url).read()
links = []
spamfile = open(\'spamsites.txt\',\'r\')
spams = spamfile.read()
spamfile.close()
spam = spams.split(\'n\')
#print spam
while \'<a href=\"http://\' in stuff:
shit = stuff.split(\'<a href=\"http://\',1)[1].split(\'\"\',1)[0]
line = \'<a href=\"http://\' + shit + \'\"\'
link = \'http://\' + shit
stuff = stuff.replace(line,\'\')
z = 0
while z < len(spam):
if spam[z] in link:
caek = \'one\'
break
else:
caek = \'two\'
z += 1
if caek == \'two\':
links.append(link)
total = 10
while total < 50:
newurl = \'http://www.google.com/search?hl=en&safe=off&q=intitle:\"index+of\"+\"%s\"&btnG=Search&start=%s&sa=N\' % (band, total)
stuff = urllib2.urlopen(newurl).read()
while \'<a href=\"http://\' in stuff:
shit = stuff.split(\'<a href=\"http://\',1)[1].split(\'\"\',1)[0]
line = \'<a href=\"http://\' + shit + \'\"\'
link = \'http://\' + shit
stuff = stuff.replace(line,\'\')
z = 0
while z < len(spam):
if spam[z] in link:
caek = \'one\'
break
else:
caek = \'two\'
z += 1
if caek == \'two\':
links.append(link)
total += 10
title = band.replace(\'+\',\' \')
html = \"\"\"
<html>
<head><title>%s Results</title></head>
<body>
\"\"\" % title
x = 0
while x < len(links):
#name = \'/\' + links[x].split(\'http://\',1)[1].split(\'/\',1)[1]
htmlink = \'<a href=\"%s\" target=\"_blank\">%s</a><br>\' % (links[x], links[x])
html += htmlink
x += 1
html += \"\"\"
</body>
</html>
\"\"\"
file2 = open(filename,\'w\')
file2.write(html)
file2.close()
-----------------------------------------
spamsites.txt
listen77
youtube
google
franceradio
mp3gl
mp3s.pl
indexofmp3.net
e-mp3s.eu
mp3mirror.com
music-dir.org
mp3rhythms.com
fast-mp3.com
null3d.com
mp3fiesta.com
music-index.net
index-of-mp3.biz
lyric
indexofmp3.org
mp3fever.org
bewbs.net
blogspot
01direct.net
free-softwares-download.info
vmp3.eu
mp3-index.com
mp3-collection.info
listofmp3s.com
mp3slap.com
tartists.com
cache
related
mp3dl
musicindexof
mp3-network
musik.am
metacritic
mp3fusion
justhotmp3s
audiozen
airmp3
hitzmp3
mp3toss
pure-mp3
mp3fy
indexof-mp3
mp3zine
geekmp3