From 2c8a0cb5e87692ce3132d284cd5f71cb50006cfe Mon Sep 17 00:00:00 2001 From: Mort Yao Date: Mon, 19 Aug 2024 21:48:34 +0200 Subject: [PATCH] [vimeo] cleanup --- src/you_get/extractors/vimeo.py | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/src/you_get/extractors/vimeo.py b/src/you_get/extractors/vimeo.py index 8c9f8ebc..4034d0e0 100644 --- a/src/you_get/extractors/vimeo.py +++ b/src/you_get/extractors/vimeo.py @@ -132,34 +132,6 @@ class VimeoExtractor(VideoExtractor): def vimeo_download_by_id(id, title=None, output_dir='.', merge=True, info_only=False, **kwargs): - ''' - try: - # normal Vimeo video - html = get_content('https://vimeo.com/' + id) - cfg_patt = r'clip_page_config\s*=\s*(\{.+?\});' - cfg = json.loads(match1(html, cfg_patt)) - video_page = get_content(cfg['player']['config_url'], headers=fake_headers) - title = cfg['clip']['title'] - info = loads(video_page) - except: - # embedded player - referer may be required - if 'referer' in kwargs: - fake_headers['Referer'] = kwargs['referer'] - - video_page = get_content('http://player.vimeo.com/video/%s' % id, headers=fake_headers) - title = r1(r'([^<]+)', video_page) - info = loads(match1(video_page, r'var t=(\{.+?\});')) - - streams = info['request']['files']['progressive'] - streams = sorted(streams, key=lambda i: i['height']) - url = streams[-1]['url'] - - type, ext, size = url_info(url, faker=True) - - print_info(site_info, title, type, size) - if not info_only: - download_urls([url], title, ext, size, output_dir, merge=merge, faker=True) - ''' site = VimeoExtractor() site.download_by_vid(id, info_only=info_only, output_dir=output_dir, merge=merge, **kwargs)