Last active
          January 7, 2024 11:08 
        
      - 
      
- 
        Save iKlotho/2d3c6178125498310345 to your computer and use it in GitHub Desktop. 
    vine.co download popular vines
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import requests | |
| import urllib | |
| import json | |
| #url = 'https://vine.co/api/timelines/popular?size=30' | |
| #url = 'https://vine.co/api/timelines/promoted' | |
| url = 'https://vine.co/api/timelines/channels/vanity/comedy' | |
| r = requests.get(url) | |
| data = r.json() | |
| print "Starting.." | |
| def removeNonAscii(s): | |
| return "".join(i for i in s if ord(i)<128) | |
| circle = True | |
| index = 0 | |
| while circle != False: | |
| try: | |
| index += 1 | |
| desc = removeNonAscii(data["data"]["records"][index]['description']).replace('\\','').replace('/','') | |
| name = removeNonAscii(data["data"]["records"][index]['username']).replace('\\','').replace('/','') | |
| header = name + desc | |
| urllib.urlretrieve (data["data"]["records"][index]['videoUrl'],\ | |
| "/home/umut/Videos/vinevideos/page2/"+ header +".mp4") | |
| print str(index)+"-> Vine Downloaded...\n" | |
| except: | |
| circle = False | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment