Activity Stream
93,399 MEMBERS
26 ONLINE
YouTube Download YouTube Download YouTube Download YouTube Download YouTube Download
Results 1 to 1 of 1
  1.    Tweet this post   Share This Post On Facebook Share This Post On Google+
    #1
    Programmar
    Xcode's Avatar

    Devil YouTube Download

    Source Code : 
    #!/usr/bin/python
    import sgmllib
    import sys
     
    class MyParser(sgmllib.SGMLParser):
        
    "A simple parser class."
     
        
    def parse(selfs):
            
    "Parse the given string 's'."
            
    self.feed(s)
            
    self.close()
     
        
    def __init__(selfverbose=0):
            
    "Initialise an object, passing 'verbose' to the superclass."
     
            
    sgmllib.SGMLParser.__init__(selfverbose)
            
    self.hyperlinks = []
     
        
    def start_a(selfattributes):
            
    "Process a hyperlink and its 'attributes'."
     
            
    for namevalue in attributes:
                if 
    name == "href":
            if 
    value.startswith("/watch?v="):
                
    self.hyperlinks.append("youtube-dl -t http://youtube.com"+value)
     
        
    def get_hyperlinks(self):
            
    "Return the list of hyperlinks."
     
            
    return self.hyperlinks
     
    def f2
    (seq): 
       
    # order preserving
       
    checked = []
       for 
    e in seq:
           if 
    e not in checked:
               
    checked.append(e)
       return 
    checked
     
    import urllib
    sgmllib
     
    # Get something to work with.
    urllib.urlopen(sys.argv[1])

    [Login or Register to remove this advertisement]

    f.read()
     
    # Try and process the page.
    # The class should have been defined first, remember.
    myparser MyParser()
    myparser.parse(s)
     
    # Get the hyperlinks.
    print f2(myparser.get_hyperlinks())
    yt open("youtube_links","w")
     
    for 
    link in f2(myparser.get_hyperlinks()):
        
    yt.write(link)
        
    yt.write("\n")
     
    print 
    "\nYouTube Download \"youtube_links\" has been generated. Execute it !" 
    Xcode Reviewed by Xcode on . YouTube Download #!/usr/bin/python import sgmllib import sys class MyParser(sgmllib.SGMLParser): "A simple parser class." def parse(self, s): "Parse the given string 's'." self.feed(s) Rating: 5

  2. The Following 1 Users Say Thank You to Xcode For This Useful Post:
    [ Click to Expand ]

    Rebel (4th March 2012)

  3.   Advertisements

Thread Information

Users Browsing this Thread

There Are Currently 1 Users Browsing This Thread. (0 Members and 1 Guests)

Similar Threads

  1. How to download videos from youtube by opera mini/mobile
    By [email protected] in forum S60^3 Tips & Tutorial
    Replies: 6
    Last Post: 1st April 2014, 07:24 PM
  2. Replies: 7
    Last Post: 5th April 2012, 09:17 AM
  3. [Windows XP] How to download original youtube 3gp and mp4 from youtube mobile site
    By Prawinkurdeg in forum General Tutorials ,Tips & Tricks
    Replies: 0
    Last Post: 21st October 2011, 10:13 AM
  4. How to Download Youtube Videos on Android Directly in MP4 Format
    By G u H a N in forum Android Tips & Tutorial
    Replies: 0
    Last Post: 15th August 2011, 10:30 PM
  5. SuperTube(Stream and download YouTube video in HQ and HD)-[U]-1/06/2011-[V]-1.6
    By Mobile_Guru in forum Windows Phone 7 Applications
    Replies: 0
    Last Post: 21st June 2011, 06:05 PM

Tags for this Thread

BE SOCIAL
YouTube Download YouTube Download YouTube Download YouTube Download YouTube Download