Skip to content

Commit

Permalink
[extractor/cbsnews] Overhaul extractors (#6681)
Browse files Browse the repository at this point in the history
Closes #6565
Authored by: bashonly
  • Loading branch information
bashonly committed May 29, 2023
1 parent fd5d93f commit f6e43d6
Show file tree
Hide file tree
Showing 4 changed files with 345 additions and 169 deletions.
8 changes: 4 additions & 4 deletions yt_dlp/extractor/_extractors.py
Expand Up @@ -313,14 +313,14 @@
CBSIE,
ParamountPressExpressIE,
)
from .cbslocal import (
CBSLocalIE,
CBSLocalArticleIE,
)
from .cbsinteractive import CBSInteractiveIE
from .cbsnews import (
CBSNewsEmbedIE,
CBSNewsIE,
CBSLocalIE,
CBSLocalArticleIE,
CBSLocalLiveIE,
CBSNewsLiveIE,
CBSNewsLiveVideoIE,
)
from .cbssports import (
Expand Down
10 changes: 1 addition & 9 deletions yt_dlp/extractor/anvato.py
Expand Up @@ -336,7 +336,7 @@ def _get_anvato_videos(self, access_key, video_id, token):
elif media_format == 'm3u8-variant' or ext == 'm3u8':
# For some videos the initial m3u8 URL returns JSON instead
manifest_json = self._download_json(
video_url, video_id, note='Downloading manifest JSON', errnote=False)
video_url, video_id, note='Downloading manifest JSON', fatal=False)
if manifest_json:
video_url = manifest_json.get('master_m3u8')
if not video_url:
Expand Down Expand Up @@ -392,14 +392,6 @@ def _extract_from_webpage(cls, url, webpage):
url = smuggle_url(url, {'token': anvplayer_data['token']})
yield cls.url_result(url, AnvatoIE, video_id)

def _extract_anvato_videos(self, webpage, video_id):
anvplayer_data = self._parse_json(
self._html_search_regex(
self._ANVP_RE, webpage, 'Anvato player data', group='anvp'),
video_id)
return self._get_anvato_videos(
anvplayer_data['accessKey'], anvplayer_data['video'], 'default') # cbslocal token = 'default'

def _real_extract(self, url):
url, smuggled_data = unsmuggle_url(url, {})
self._initialize_geo_bypass({
Expand Down
116 changes: 0 additions & 116 deletions yt_dlp/extractor/cbslocal.py

This file was deleted.

0 comments on commit f6e43d6

Please sign in to comment.