Advertisement
Guest User

clovanzo

a guest
Aug 26th, 2009
1,084
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.43 KB | None | 0 0
  1.             if enable_google_cache:
  2.                 if (host.find('.youtube.com') > -1 or host.find('.youtube.com') > -1 or re.compile('\.youtube\.[a-z][a-z]').search(host) or re.compile('^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$').match(host)) and (path.find('videoplayback') > -1 or path.find('videoplay') > -1 or path.find('get_video') > -1) and path.find('get_video_info') < 0:
  3.                     type = 'YOUTUBE'
  4.                     arglist = params.split('&')
  5.                     dict = {}
  6.                     for arg in arglist:
  7.                         try:
  8.                             dict[arg.split('=')[0]] = arg.split('=')[1]
  9.                         except:
  10.                             continue
  11.                     if dict.has_key('video_id'):
  12.                         video_id = dict['video_id']
  13.                     elif dict.has_key('docid'):
  14.                         video_id = dict['docid']
  15.                     elif dict.has_key('id'):
  16.                         video_id = dict['id']
  17.                     else:
  18.                         video_id = None
  19.                     if video_id is not None:
  20.                         new_url = submit_video(pid, client, type, url, video_id)
  21.                     else:
  22.                         log(format%(pid, client, '-', 'URL_ERROR', type, 'docid not found in ' + new_url))
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement