Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- import mytemp
- import sys
- import urllib
- url = raw_input("Please, type in the url of the site to check:\n")
- if url == "":
- sys.exit("Error URL")
- webFile = urllib.urlopen(url)
- site = webFile.read()
- webFile.close()
- siteup = site
- uploaderlst = []
- while 1:
- tempup = mytemp.StringBetween(siteup,"<strong>Uploader:</strong> ","<")
- if tempup == None:
- break
- pos = tempup.find("|")
- if pos != 0:
- tempup = tempup[:pos]
- uploaderlst.append(tempup)
- pos = siteup.find(tempup)
- siteup = siteup[pos:]
- print "Avaible Uploader:"
- for item in uploaderlst:
- print item
- uploader = raw_input("Please, type the name of the uploader in:\n")
- if uploader == "":
- sys.exit("Error Uploader")
- links = mytemp.StringBetween(site,"<strong>Uploader:</strong> "+uploader,"<strong>Uploader:</strong> ")
- if links == None:
- sys.exit("Error with Uploader")
- linkshost = mytemp.StringBetween(links,'<strong>Download:</strong>',"/p>")
- if linkshost == None:
- sys.exit("Error with Downloads")
- hostlst = []
- while 1:
- temphost = mytemp.StringBetween(linkshost,' target="_blank">hier</a>',"<")
- if temphost == None:
- break
- hostlst.append(temphost[3:])
- pos = linkshost.find(temphost)
- linkshost = linkshost[pos:]
- print "Avaible Hoster\n"
- for item in hostlst:
- print item
- hoster = raw_input("\nPlease, type in the name of the hoster:\n")
- if hoster == "":
- sys.exit("\n\tError Hoster")
- link = []
- while 1:
- strtemp = mytemp.StringBetween(links,'<strong>Download:</strong> <a href="','" target="_blank">hier</a> | ')
- if strtemp != None:
- pos = links[len('<strong>Download:</strong> <a href="'+strtemp+'" target="_blank">hier</a> | '):].find(hoster)
- if pos == 1:
- link.append(strtemp)
- else:
- break
- strt = mytemp.strstr(links, '<br />')
- if strt != None:
- links = strt[len('<br />'):]
- else:
- break
- for item in link:
- print item
Advertisement
Add Comment
Please, Sign In to add comment