aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsam <mail@samueljenks.me>2022-11-05 04:25:17 +1300
committerGitHub <noreply@github.com>2022-11-04 20:55:17 +0530
commited13a772d717c0df4f41fad6010369ad5d545005 (patch)
treeb0eeaeed67c80d4f19d1f39fd48b95944f888795
parent78545664bf80086a011494b2010f949b2f182b04 (diff)
downloadhypervideo-pre-ed13a772d717c0df4f41fad6010369ad5d545005.tar.lz
hypervideo-pre-ed13a772d717c0df4f41fad6010369ad5d545005.tar.xz
hypervideo-pre-ed13a772d717c0df4f41fad6010369ad5d545005.zip
[extractor/bbc] Support onion domains (#5211)
Authored by: DoubleCouponDay
-rw-r--r--yt_dlp/extractor/bbc.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/yt_dlp/extractor/bbc.py b/yt_dlp/extractor/bbc.py
index 89fce8d5a..fe122af85 100644
--- a/yt_dlp/extractor/bbc.py
+++ b/yt_dlp/extractor/bbc.py
@@ -591,7 +591,12 @@ class BBCCoUkIE(InfoExtractor):
class BBCIE(BBCCoUkIE):
IE_NAME = 'bbc'
IE_DESC = 'BBC'
- _VALID_URL = r'https?://(?:www\.)?bbc\.(?:com|co\.uk)/(?:[^/]+/)+(?P<id>[^/#?]+)'
+ _VALID_URL = r'''(?x)
+ https?://(?:www\.)?(?:
+ bbc\.(?:com|co\.uk)|
+ bbcnewsd73hkzno2ini43t4gblxvycyac5aw4gnv7t2rccijh7745uqd\.onion|
+ bbcweb3hytmzhn5d532owbu6oqadra5z3ar726vq5kgwwn6aucdccrad\.onion
+ )/(?:[^/]+/)+(?P<id>[^/#?]+)'''
_MEDIA_SETS = [
'pc',
@@ -841,6 +846,12 @@ class BBCIE(BBCCoUkIE):
'upload_date': '20190604',
'categories': ['Psychology'],
},
+ }, { # onion routes
+ 'url': 'https://www.bbcnewsd73hkzno2ini43t4gblxvycyac5aw4gnv7t2rccijh7745uqd.onion/news/av/world-europe-63208576',
+ 'only_matching': True,
+ }, {
+ 'url': 'https://www.bbcweb3hytmzhn5d532owbu6oqadra5z3ar726vq5kgwwn6aucdccrad.onion/sport/av/football/63195681',
+ 'only_matching': True,
}]
@classmethod