diff --git a/youtube_dl/extractor/piapro.py b/youtube_dl/extractor/piapro.py index 85f1b4efb..e28fcc84c 100644 --- a/youtube_dl/extractor/piapro.py +++ b/youtube_dl/extractor/piapro.py @@ -39,8 +39,10 @@ class PiaproIE(InfoExtractor): else: content_id = self._search_regex(r'''contentId\s*:\s*['"]([0-9a-zA-Z]+?)['\"]''', webpage, 'content_id') - create_date = self._search_regex(r'''createDate\s*:\s*['"]([0-9]{14})['"]''', webpage, 'create_date', fatal=False) or \ + create_date_str = self._search_regex(r'''createDate\s*:\s*['"]([0-9]{14})['"]''', webpage, 'create_date', fatal=False) or \ self._search_regex(r'''["']https?://songle\.jp/songs/piapro\.jp.*([0-9]{14})['"]''', webpage, 'create_date') + create_date = datetime.strptime(create_date_str, '%Y%m%d%H%M%S') + create_date_unix = (create_date - datetime(1970,1,1)).total_seconds() uploader = get_element_by_class("cd_user-name", webpage) try: @@ -55,9 +57,9 @@ class PiaproIE(InfoExtractor): 'description': get_element_by_class("cd_dtl_cap", webpage), 'id': content_id, 'thumbnail': self._search_regex(r'(https?://c1\.piapro\.jp/timg/.+?_1440\.jpg)', webpage, 'thumbnail', fatal=False), - 'timestamp': int(datetime.strptime(create_date, '%Y%m%d%H%M%S').strftime("%s")), + 'timestamp': create_date_unix, 'title': get_element_by_class("works-title", webpage) or self._html_search_regex(r'