from an initial value of SIZE.
--dump-user-agent display the current browser identification
--user-agent UA specify a custom user agent
- --referer REF specify a custom referer
++ --referer REF specify a custom referer, use if the video access
++ is restricted to one domain
--list-extractors List all supported extractors and the URLs they
would handle
config = webpage.split(' = {config:')[1].split(',assets:')[0]
config = json.loads(config)
except:
-- self._downloader.report_error(u'unable to extract info section')
++ if re.search('The creator of this video has not given you permission to embed it on this domain.', webpage):
++ self._downloader.report_error(u'The author has restricted the access to this video, try with the "--referer" option')
++ else:
++ self._downloader.report_error(u'unable to extract info section')
return
# Extract title
help='display the current browser identification', default=False)
general.add_option('--user-agent',
dest='user_agent', help='specify a custom user agent', metavar='UA')
- dest='referer', help='specify a custom referer', metavar='REF', default=None)
+ general.add_option('--referer',
++ dest='referer', help='specify a custom referer, use if the video access is restricted to one domain',
++ metavar='REF', default=None)
general.add_option('--list-extractors',
action='store_true', dest='list_extractors',
help='List all supported extractors and the URLs they would handle', default=False)