Jump to content
totti93

serialepenet.ro Downloader

Recommended Posts


import sys
import urlgrabber
import urlgrabber.progress

def readURL(URL):
return urlgrabber.urlread(URL)

def unescape(str):
char = str.split("%")
ret = ""
for i in range(1, len(char)):
ret += chr(int(char[i], 16))
return ret

def getembedurl(URL):
HTML = readURL(URL)
EMBED = ["", "", ""]
EMBED[0] = unescape(HTML[HTML.find("document.write(unescape('") + 25: HTML.find("')")])
EMBED[1] = HTML[HTML.find("')+'") + 4: HTML.find("'+unescape('")]
EMBED[2] = unescape(HTML[HTML.find("'+unescape('") + 12: HTML.find("'))")])
EMBED = EMBED[0] + EMBED[1] + EMBED[2]
return EMBED[EMBED.find('src="') + 5: EMBED.find('" frameborder="')]

def getmp4url(URL):
HTML = readURL(URL)
return HTML[HTML.find('value="file=') + 12: HTML.find('&provider=')]

def main():
URL = sys.argv[1]
FILE_NAME = sys.argv[2]
URL = getembedurl(URL)
URL = getmp4url(URL)
progress = urlgrabber.progress.text_progress_meter()
urlgrabber.urlgrab(URL, FILE_NAME, progress_obj = progress)

main()

E scris in Python. Poate are ceva greseli... L-am facut in graba :)

Cum se foloseste?

python __main__.py <link> <nume_fisier>

ex:

python __main__.py http://serialepenet.ro/house_m_d/sezon_7/episod_1 houseS07E01.mp4

Aveti nevoie de libraria "urlgrabber".

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...