mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-11-04 08:35:12 +00:00 
			
		
		
		
	[vrv] fix CMS signing query extraction(closes #21809)
This commit is contained in:
		@@ -64,7 +64,15 @@ class VRVBaseIE(InfoExtractor):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    def _call_cms(self, path, video_id, note):
 | 
					    def _call_cms(self, path, video_id, note):
 | 
				
			||||||
        if not self._CMS_SIGNING:
 | 
					        if not self._CMS_SIGNING:
 | 
				
			||||||
            self._CMS_SIGNING = self._call_api('index', video_id, 'CMS Signing')['cms_signing']
 | 
					            index = self._call_api('index', video_id, 'CMS Signing')
 | 
				
			||||||
 | 
					            self._CMS_SIGNING = index.get('cms_signing') or {}
 | 
				
			||||||
 | 
					            if not self._CMS_SIGNING:
 | 
				
			||||||
 | 
					                for signing_policy in index.get('signing_policies', []):
 | 
				
			||||||
 | 
					                    signing_path = signing_policy.get('path')
 | 
				
			||||||
 | 
					                    if signing_path and signing_path.startswith('/cms/'):
 | 
				
			||||||
 | 
					                        name, value = signing_policy.get('name'), signing_policy.get('value')
 | 
				
			||||||
 | 
					                        if name and value:
 | 
				
			||||||
 | 
					                            self._CMS_SIGNING[name] = value
 | 
				
			||||||
        return self._download_json(
 | 
					        return self._download_json(
 | 
				
			||||||
            self._API_DOMAIN + path, video_id, query=self._CMS_SIGNING,
 | 
					            self._API_DOMAIN + path, video_id, query=self._CMS_SIGNING,
 | 
				
			||||||
            note='Downloading %s JSON metadata' % note, headers=self.geo_verification_headers())
 | 
					            note='Downloading %s JSON metadata' % note, headers=self.geo_verification_headers())
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user