mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-10-31 14:45:14 +00:00 
			
		
		
		
	[mildom:vod] Remove proxy
* Proxy is needed only for live videos
This commit is contained in:
		| @@ -212,16 +212,16 @@ class MildomVodIE(MildomBaseIE): | |||||||
|                 lambda x: x['author_info']['login_name'], |                 lambda x: x['author_info']['login_name'], | ||||||
|             ), compat_str) |             ), compat_str) | ||||||
|  |  | ||||||
|         audio_formats = [{ |         formats = [{ | ||||||
|             'url': autoplay['audio_url'], |             'url': autoplay['audio_url'], | ||||||
|             'format_id': 'audio', |             'format_id': 'audio', | ||||||
|             'protocol': 'm3u8_native', |             'protocol': 'm3u8_native', | ||||||
|             'vcodec': 'none', |             'vcodec': 'none', | ||||||
|             'acodec': 'aac', |             'acodec': 'aac', | ||||||
|  |             'ext': 'm4a' | ||||||
|         }] |         }] | ||||||
|         video_formats = [] |  | ||||||
|         for fmt in autoplay['video_link']: |         for fmt in autoplay['video_link']: | ||||||
|             video_formats.append({ |             formats.append({ | ||||||
|                 'format_id': 'video-%s' % fmt['name'], |                 'format_id': 'video-%s' % fmt['name'], | ||||||
|                 'url': fmt['url'], |                 'url': fmt['url'], | ||||||
|                 'protocol': 'm3u8_native', |                 'protocol': 'm3u8_native', | ||||||
| @@ -229,15 +229,15 @@ class MildomVodIE(MildomBaseIE): | |||||||
|                 'height': fmt['level'], |                 'height': fmt['level'], | ||||||
|                 'vcodec': 'h264', |                 'vcodec': 'h264', | ||||||
|                 'acodec': 'aac', |                 'acodec': 'aac', | ||||||
|  |                 'ext': 'mp4' | ||||||
|             }) |             }) | ||||||
|  |  | ||||||
|  |         r''' # Proxy is not needed for VODs | ||||||
|         stream_query = self._common_queries({ |         stream_query = self._common_queries({ | ||||||
|             'is_lhls': '0', |             'is_lhls': '0', | ||||||
|         }) |         }) | ||||||
|         del stream_query['timestamp'] |         del stream_query['timestamp'] | ||||||
|         formats = audio_formats + video_formats |  | ||||||
|         for fmt in formats: |         for fmt in formats: | ||||||
|             fmt['ext'] = 'mp4' |  | ||||||
|             parsed = compat_urlparse.urlparse(fmt['url']) |             parsed = compat_urlparse.urlparse(fmt['url']) | ||||||
|             stream_query['path'] = parsed.path[5:] |             stream_query['path'] = parsed.path[5:] | ||||||
|             parsed = parsed._replace( |             parsed = parsed._replace( | ||||||
| @@ -245,6 +245,7 @@ class MildomVodIE(MildomBaseIE): | |||||||
|                 query=compat_urllib_parse_urlencode(stream_query, True), |                 query=compat_urllib_parse_urlencode(stream_query, True), | ||||||
|                 path='/api/mildom/vod2/proxy') |                 path='/api/mildom/vod2/proxy') | ||||||
|             fmt['url'] = compat_urlparse.urlunparse(parsed) |             fmt['url'] = compat_urlparse.urlunparse(parsed) | ||||||
|  |         ''' | ||||||
|  |  | ||||||
|         self._sort_formats(formats) |         self._sort_formats(formats) | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 pukkandan
					pukkandan