Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if enable_google_cache:
- 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:
- type = 'YOUTUBE'
- arglist = params.split('&')
- dict = {}
- for arg in arglist:
- try:
- dict[arg.split('=')[0]] = arg.split('=')[1]
- except:
- continue
- if dict.has_key('video_id'):
- video_id = dict['video_id']
- elif dict.has_key('docid'):
- video_id = dict['docid']
- elif dict.has_key('id'):
- video_id = dict['id']
- else:
- video_id = None
- if video_id is not None:
- new_url = submit_video(pid, client, type, url, video_id)
- else:
- log(format%(pid, client, '-', 'URL_ERROR', type, 'docid not found in ' + new_url))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement