[FranceInter] update after flake8 code review
This commit is contained in:
parent
e98a3ec7a9
commit
9c8fa7c63c
@ -3,13 +3,10 @@ from __future__ import unicode_literals
|
|||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
int_or_none,
|
|
||||||
unified_strdate,
|
|
||||||
unified_timestamp,
|
unified_timestamp,
|
||||||
month_by_french_name,
|
month_by_french_name,
|
||||||
)
|
)
|
||||||
|
|
||||||
import re
|
|
||||||
|
|
||||||
class FranceInterIE(InfoExtractor):
|
class FranceInterIE(InfoExtractor):
|
||||||
_VALID_URL = r'https?://(?:www\.)?franceinter\.fr/emissions/(?P<id>[^?#]+)'
|
_VALID_URL = r'https?://(?:www\.)?franceinter\.fr/emissions/(?P<id>[^?#]+)'
|
||||||
@ -37,16 +34,14 @@ class FranceInterIE(InfoExtractor):
|
|||||||
|
|
||||||
title = self._og_search_title(webpage)
|
title = self._og_search_title(webpage)
|
||||||
description = self._og_search_description(webpage)
|
description = self._og_search_description(webpage)
|
||||||
|
|
||||||
extractdate = self._html_search_regex(
|
extractdate = self._html_search_regex(
|
||||||
r'<span class="header-main-content-date">(.*?)</span>', webpage, 'extractdate', fatal=False)
|
r'<span class="header-main-content-date">(.*?)</span>', webpage, 'extractdate', fatal=False)
|
||||||
|
|
||||||
extractdate = extractdate.split()
|
extractdate = extractdate.split()
|
||||||
|
|
||||||
extractdate = extractdate[3]+","+str(month_by_french_name(extractdate[2]))+","+extractdate[1]
|
extractdate = extractdate[3] + "," + str(month_by_french_name(extractdate[2])) + "," + extractdate[1]
|
||||||
|
|
||||||
upload_date = unified_strdate(extractdate)
|
|
||||||
|
|
||||||
timestamp = unified_timestamp(extractdate)
|
timestamp = unified_timestamp(extractdate)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@ -58,4 +53,4 @@ class FranceInterIE(InfoExtractor):
|
|||||||
'url': video_url,
|
'url': video_url,
|
||||||
'vcodec': 'none',
|
'vcodec': 'none',
|
||||||
}],
|
}],
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user