SHARE
TWEET

Untitled

a guest Jan 20th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/env python
  2.  
  3. import gdata.service
  4. import gdata.youtube
  5. import gdata.youtube.service
  6.  
  7. client = gdata.youtube.service.YouTubeService()
  8.  
  9. assoc = {}
  10.  
  11. for name in open('input.txt'):
  12.     query = gdata.youtube.service.YouTubeVideoQuery()
  13.     query.vq = name.strip()
  14.     query.racy = 'include'
  15.     feed = client.YouTubeQuery(query)
  16.     print
  17.     print 'Original Name: {}'.format(name.strip())
  18.     if (feed.entry):
  19.         print 'Found Name: {}'.format(feed.entry[0].title.text)
  20.         print feed.entry[0].GetSwfUrl()
  21.     else:
  22.         print 'Nothing found'
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top