mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-06-21 13:24:20 -04:00
skip remembering dash manifests
This commit is contained in:
parent
7f4deacdf7
commit
31e54c94e7
1 changed files with 5 additions and 2 deletions
|
@ -247,14 +247,16 @@ class BrozzlerWorker:
|
||||||
if not 'videos' in page:
|
if not 'videos' in page:
|
||||||
page.videos = []
|
page.videos = []
|
||||||
for txn in ydl_spy.transactions:
|
for txn in ydl_spy.transactions:
|
||||||
if (txn['response_headers'].get_content_type().startswith('video/')
|
content_type = txn['response_headers'].get_content_type()
|
||||||
|
if (content_type.startswith('video/')
|
||||||
|
and content_type != 'video/vnd.mpeg.dash.mpd'
|
||||||
and txn['method'] == 'GET'
|
and txn['method'] == 'GET'
|
||||||
and txn['status_code'] in (200, 206)):
|
and txn['status_code'] in (200, 206)):
|
||||||
video = {
|
video = {
|
||||||
'blame': 'youtube-dl',
|
'blame': 'youtube-dl',
|
||||||
'url': txn['url'],
|
'url': txn['url'],
|
||||||
'response_code': txn['status_code'],
|
'response_code': txn['status_code'],
|
||||||
'content-type': txn['response_headers'].get_content_type(),
|
'content-type': content_type,
|
||||||
}
|
}
|
||||||
if 'content-length' in txn['response_headers']:
|
if 'content-length' in txn['response_headers']:
|
||||||
video['content-length'] = int(
|
video['content-length'] = int(
|
||||||
|
@ -390,6 +392,7 @@ class BrozzlerWorker:
|
||||||
and 'response' in chrome_msg['params']
|
and 'response' in chrome_msg['params']
|
||||||
and 'mimeType' in chrome_msg['params']['response']
|
and 'mimeType' in chrome_msg['params']['response']
|
||||||
and chrome_msg['params']['response'].get('mimeType', '').startswith('video/')
|
and chrome_msg['params']['response'].get('mimeType', '').startswith('video/')
|
||||||
|
and chrome_msg['params']['response']['mimeType'] != 'video/vnd.mpeg.dash.mpd'
|
||||||
and chrome_msg['params']['response'].get('status') in (200, 206)):
|
and chrome_msg['params']['response'].get('status') in (200, 206)):
|
||||||
video = {
|
video = {
|
||||||
'blame': 'browser',
|
'blame': 'browser',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue