Skip to content

Commit

Permalink
[Docubay] Improve IE
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashish0804 committed May 20, 2022
1 parent fc18502 commit 713117c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
10 changes: 7 additions & 3 deletions yt_dlp/extractor/docubay.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,13 @@ def _real_extract(self, url):
})

webpage = self._download_webpage(url, video_id)
title = self._og_search_title(webpage)
if title:
title = title.replace(' | Online at DocuBay', '').replace('Watch ', '')
title = self._search_regex(r'class\s*=\s*"shows-title"[^>]*>([^<]+)', webpage, 'title', None, False)
if not title:
title = self._og_search_title(webpage).replace(' | Online at DocuBay', '').replace('Watch ', '')

upload_date = self._search_regex(r'class\s*=\s*"show-duration"[^>]*>\s*(\d+)', webpage, 'upload date', None, False)
if upload_date:
upload_date += '0101'
subtitles = self._merge_subtitles(subs, subtitles)
self._sort_formats(formats)

Expand All @@ -45,6 +48,7 @@ def _real_extract(self, url):
'title': title,
'description': self._og_search_description(webpage),
'thumbnail': self._og_search_thumbnail(webpage),
'upload_date': upload_date,
'formats': formats,
'subtitles': subtitles

Expand Down
1 change: 1 addition & 0 deletions yt_dlp/postprocessor/renamer.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def __init__(self, downloader=None, group='ytdlP'):
'SonyLiv': 'SONY',
'Zee5': 'ZEE',
'DiscoveryPlusIndia': 'DSCP',
'Docubay': 'DOCBAY'
}

def run(self, info):
Expand Down

0 comments on commit 713117c

Please sign in to comment.