projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2405854
)
[cda] Detect geo restricted videos (refs #28106)
author
Sergey M․
<dstftw@gmail.com>
Sun, 7 Feb 2021 12:18:06 +0000
(19:18 +0700)
committer
Sergey M․
<dstftw@gmail.com>
Sun, 7 Feb 2021 12:18:40 +0000
(19:18 +0700)
youtube_dl/extractor/cda.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/cda.py
b/youtube_dl/extractor/cda.py
index 6429454fb22389ca137f12415f26afd3f343bb56..1b4362144a180da10ba52c06c856a498802f7527 100644
(file)
--- a/
youtube_dl/extractor/cda.py
+++ b/
youtube_dl/extractor/cda.py
@@
-95,6
+95,9
@@
class CDAIE(InfoExtractor):
if 'Ten film jest dostępny dla użytkowników premium' in webpage:
raise ExtractorError('This video is only available for premium users.', expected=True)
+ if re.search(r'niedostępn[ey] w(?: |\s+)Twoim kraju\s*<', webpage):
+ self.raise_geo_restricted()
+
need_confirm_age = False
if self._html_search_regex(r'(<form[^>]+action="[^"]*/a/validatebirth[^"]*")',
webpage, 'birthday validate form', default=None):