[Tokentube] Fix description (#1578)

Authored by: u-spec-png
This commit is contained in:
u-spec-png 2021-11-10 15:28:38 +00:00 committed by GitHub
parent 9ebf3c6ab9
commit b47d236d72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,7 +6,10 @@ import re
from .common import InfoExtractor
from ..utils import (
clean_html,
get_element_by_class,
parse_count,
remove_end,
unified_strdate,
js_to_json,
OnDemandPagedList,
@ -35,7 +38,7 @@ class TokentubeIE(InfoExtractor):
'id': '3950239124',
'ext': 'mp4',
'title': 'Linux Ubuntu Studio perus käyttö',
'description': 'md5:854ff1dc732ff708976de2880ea32050',
'description': 'md5:46077d0daaba1974f2dc381257f9d64c',
'uploader': 'jyrilehtonen',
'upload_date': '20210825',
},
@ -45,7 +48,7 @@ class TokentubeIE(InfoExtractor):
'id': '3582463289',
'ext': 'mp4',
'title': 'Police for Freedom - toiminta aloitetaan Suomessa ❤️??',
'description': 'md5:cd92e620d7f5fa162e8410d0fc9a08be',
'description': 'md5:37ebf1cb44264e0bf23ed98b337ee63e',
'uploader': 'Voitontie',
'upload_date': '20210428',
}
@ -90,7 +93,10 @@ class TokentubeIE(InfoExtractor):
r'<a\s*class="place-left"[^>]+>(.+?)</a>',
webpage, 'uploader', fatal=False)
description = self._html_search_meta('description', webpage)
description = (clean_html(get_element_by_class('p-d-txt', webpage))
or self._html_search_meta(('og:description', 'description', 'twitter:description'), webpage))
description = remove_end(description, 'Category')
self._sort_formats(formats)