Browse Source

[vlive] improve extraction for geo-restricted videos

Remita Amine 4 years ago
parent
commit
3a78198a96
2 changed files with 6 additions and 1 deletions
  1. 1 0
      youtube_dl/extractor/extractors.py
  2. 5 1
      youtube_dl/extractor/vlive.py

+ 1 - 0
youtube_dl/extractor/extractors.py

@@ -1375,6 +1375,7 @@ from .vk import (
 )
 from .vlive import (
     VLiveIE,
+    VLivePostIE,
     VLiveChannelIE,
 )
 from .vodlocker import VodlockerIE

+ 5 - 1
youtube_dl/extractor/vlive.py

@@ -68,6 +68,10 @@ class VLiveIE(VLiveBaseIE):
     }, {
         'url': 'https://www.vlive.tv/embed/1326',
         'only_matching': True,
+    }, {
+        # works only with gcc=KR
+        'url': 'https://www.vlive.tv/video/225019',
+        'only_matching': True,
     }]
 
     def _real_initialize(self):
@@ -102,7 +106,7 @@ class VLiveIE(VLiveBaseIE):
             raise ExtractorError('Unable to log in', expected=True)
 
     def _call_api(self, path_template, video_id, fields=None):
-        query = {'appId': self._APP_ID}
+        query = {'appId': self._APP_ID, 'gcc': 'KR'}
         if fields:
             query['fields'] = fields
         try: