Browse Source

Merge remote-tracking branch 'origin/master'

totalwebcasting
Philipp Hagemeister 11 years ago
parent
commit
f92259c026
1 changed files with 10 additions and 1 deletions
  1. +10
    -1
      youtube_dl/extractor/orf.py

+ 10
- 1
youtube_dl/extractor/orf.py View File

@ -8,6 +8,7 @@ from .common import InfoExtractor
from ..utils import ( from ..utils import (
HEADRequest, HEADRequest,
unified_strdate, unified_strdate,
ExtractorError,
) )
@ -35,7 +36,15 @@ class ORFIE(InfoExtractor):
data_json = self._search_regex( data_json = self._search_regex(
r'initializeAdworx\((.+?)\);\n', webpage, 'video info') r'initializeAdworx\((.+?)\);\n', webpage, 'video info')
all_data = json.loads(data_json) all_data = json.loads(data_json)
sdata = all_data[0]['values']['segments']
def get_segments(all_data):
for data in all_data:
if data['name'] == 'Tracker::EPISODE_DETAIL_PAGE_OVER_PROGRAM':
return data['values']['segments']
sdata = get_segments(all_data)
if not sdata:
raise ExtractorError('Unable to extract segments')
def quality_to_int(s): def quality_to_int(s):
m = re.search('([0-9]+)', s) m = re.search('([0-9]+)', s)


Loading…
Cancel
Save