mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-10-31 06:35:12 +00:00 
			
		
		
		
	[TrovoLive] Add extractor (partially fix #20)
Only VOD extractor has been implemented Related: https://github.com/ytdl-org/youtube-dl/issues/26125 Related: https://github.com/blackjack4494/yt-dlc/issues/220
This commit is contained in:
		| @@ -4099,7 +4099,8 @@ def strip_jsonp(code): | ||||
|         r'\g<callback_data>', code) | ||||
|  | ||||
|  | ||||
| def js_to_json(code): | ||||
| def js_to_json(code, vars={}): | ||||
|     # vars is a dict of var, val pairs to substitute | ||||
|     COMMENT_RE = r'/\*(?:(?!\*/).)*?\*/|//[^\n]*' | ||||
|     SKIP_RE = r'\s*(?:{comment})?\s*'.format(comment=COMMENT_RE) | ||||
|     INTEGER_TABLE = ( | ||||
| @@ -4128,6 +4129,9 @@ def js_to_json(code): | ||||
|                     i = int(im.group(1), base) | ||||
|                     return '"%d":' % i if v.endswith(':') else '%d' % i | ||||
|  | ||||
|             if v in vars: | ||||
|                 return vars[v] | ||||
|  | ||||
|         return '"%s"' % v | ||||
|  | ||||
|     return re.sub(r'''(?sx) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 pukkandan
					pukkandan