Apply minor style corrections

This commit introduces a few minor style corrections that were previously overlooked. These corrections ensure that the code adheres to the project's style guidelines and improves overall readability. The changes are minor and do not affect the functionality of the code.
This commit is contained in:
Abdessamad DERRAZ 2023-07-21 11:43:27 +02:00
parent f5fc4de7c9
commit 19cc97d1a1

View File

@ -110,37 +110,36 @@ class TeachableIE(TeachableBaseIE):
/courses/[^/]+/lectures/(?P<id>\d+)
''' % TeachableBaseIE._VALID_URL_SUB_TUPLE
_TESTS = [
{
'url': 'https://gns3.teachable.com/courses/gns3-certified-associate/lectures/6842364',
'info_dict': {
'id': 'Nq7vkXmXRA',
'video_id': 'Nq7vkXmXRA',
'ext': 'mp4',
'title': 'Overview',
'chapter': 'Welcome',
'chapter_number': 1,
'webpage_url': r're:https://player.hotmart.com/embed/Nq7vkXmXRA\?signature=.+&token=.+',
'width': 1920,
'height': 1080,
'thumbnail': r're:https?://.*\.(?:jpg|jpeg|webp)\?token=exp=\d+~acl=.*~hmac=[a-f0-9]+$',
},
'params': {
'skip_download': True,
},
}, {
'url': 'http://v1.upskillcourses.com/courses/119763/lectures/1747100',
'only_matching': True,
}, {
'url': 'http://v1.upskillcourses.com/courses/119763/lectures/1747100',
'only_matching': True,
}, {
'url': 'https://gns3.teachable.com/courses/423415/lectures/6885939',
'only_matching': True,
}, {
'url': 'teachable:https://v1.upskillcourses.com/courses/essential-web-developer-course/lectures/1747100',
'only_matching': True,
}]
_TESTS = [{
'url': 'https://gns3.teachable.com/courses/gns3-certified-associate/lectures/6842364',
'info_dict': {
'id': 'Nq7vkXmXRA',
'video_id': 'Nq7vkXmXRA',
'ext': 'mp4',
'title': 'Overview',
'chapter': 'Welcome',
'chapter_number': 1,
'webpage_url': r're:https://player.hotmart.com/embed/Nq7vkXmXRA\?signature=.+&token=.+',
'width': 1920,
'height': 1080,
'thumbnail': r're:https?://.*\.(?:jpg|jpeg|webp)\?token=exp=\d+~acl=.*~hmac=[a-f0-9]+$',
},
'params': {
'skip_download': True,
},
}, {
'url': 'http://v1.upskillcourses.com/courses/119763/lectures/1747100',
'only_matching': True,
}, {
'url': 'http://v1.upskillcourses.com/courses/119763/lectures/1747100',
'only_matching': True,
}, {
'url': 'https://gns3.teachable.com/courses/423415/lectures/6885939',
'only_matching': True,
}, {
'url': 'teachable:https://v1.upskillcourses.com/courses/essential-web-developer-course/lectures/1747100',
'only_matching': True,
}]
@staticmethod
def _is_teachable(webpage):
@ -229,28 +228,24 @@ def _real_extract(self, url):
entries = []
for wistia_url in wistia_urls:
entries.append(
{
'_type': 'url_transparent',
'url': wistia_url,
'ie_key': WistiaIE.ie_key(),
'title': title,
'chapter': chapter,
'chapter_number': chapter_number,
}
)
entries.append({
'_type': 'url_transparent',
'url': wistia_url,
'ie_key': WistiaIE.ie_key(),
'title': title,
'chapter': chapter,
'chapter_number': chapter_number,
})
for hotmart_url in hotmart_urls:
entries.append(
{
'_type': 'url_transparent',
'url': hotmart_url,
'ie_key': HotmartIE.ie_key(),
'title': title,
'chapter': chapter,
'chapter_number': chapter_number,
}
)
entries.append({
'_type': 'url_transparent',
'url': hotmart_url,
'ie_key': HotmartIE.ie_key(),
'title': title,
'chapter': chapter,
'chapter_number': chapter_number,
})
return self.playlist_result(entries, video_id, title)