made changes according to request also I really appreciate help by @dirkf

This commit is contained in:
Ehtisham Sabir 2022-04-01 05:25:00 +05:00
parent bf428499a0
commit 810c1a56a0

View File

@ -39,9 +39,7 @@ class WikimediaIE(InfoExtractor):
licenze = "This " + licenze + " license." licenze = "This " + licenze + " license."
description = get_element_by_class('description', webpage) description = get_element_by_class('description', webpage)
author = self._html_search_regex(r'<td>([^\<]*?)<\/td>', str(webpage), u"video author") author = self._html_search_regex(r'<td>([^\<]*?)<\/td>', str(webpage), u"video author")
info = {} info = {}
subtitles = 'https://commons.wikimedia.org/w/api.php?action=timedtext&lang=nl&title=File%3A{}' \ subtitles = 'https://commons.wikimedia.org/w/api.php?action=timedtext&lang=nl&title=File%3A{}' \
'&trackformat=srt'.format(compat_urlparse.quote_plus(video_id)) '&trackformat=srt'.format(compat_urlparse.quote_plus(video_id))
@ -53,5 +51,4 @@ class WikimediaIE(InfoExtractor):
info['license'] = licenze info['license'] = licenze
info['author'] = author info['author'] = author
info['subtitles'] = {"nl": [{"ext": "srt", "url": subtitles}]} info['subtitles'] = {"nl": [{"ext": "srt", "url": subtitles}]}
print("ih")
return info return info