[vine] remove support (discontinued)

This commit is contained in:
Mort Yao 2024-05-22 01:15:49 +02:00
parent 1a3bcb462a
commit 00f6c01e18
No known key found for this signature in database
GPG Key ID: 07DA00CB78203251
6 changed files with 0 additions and 44 deletions

View File

@ -373,7 +373,6 @@ Use `--url`/`-u` to get a list of downloadable resource URLs extracted from the
| **YouTube** | <https://www.youtube.com/> |✓| | |
| **X (Twitter)** | <https://x.com/> |✓|✓| |
| VK | <https://vk.com/> |✓|✓| |
| Vine | <https://vine.co/> |✓| | |
| Vimeo | <https://vimeo.com/> |✓| | |
| Veoh | <https://www.veoh.com/> |✓| | |
| **Tumblr** | <https://www.tumblr.com/> |✓|✓|✓|

View File

@ -111,7 +111,6 @@ SITES = {
'wanmen' : 'wanmen',
'weibo' : 'miaopai',
'veoh' : 'veoh',
'vine' : 'vine',
'vk' : 'vk',
'x' : 'twitter',
'xiaokaxiu' : 'yixia',

View File

@ -74,7 +74,6 @@ from .twitter import *
from .ucas import *
from .veoh import *
from .vimeo import *
from .vine import *
from .vk import *
from .w56 import *
from .wanmen import *

View File

@ -6,7 +6,6 @@ from ..common import *
from .universal import *
from .dailymotion import dailymotion_download
from .vimeo import vimeo_download
from .vine import vine_download
def tumblr_download(url, output_dir='.', merge=True, info_only=False, **kwargs):
if re.match(r'https?://\d+\.media\.tumblr\.com/', url):
@ -125,9 +124,6 @@ def tumblr_download(url, output_dir='.', merge=True, info_only=False, **kwargs):
elif re.search(r'dailymotion\.com', iframe_url):
dailymotion_download(iframe_url, output_dir, merge=merge, info_only=info_only, **kwargs)
return
elif re.search(r'vine\.co', iframe_url):
vine_download(iframe_url, output_dir, merge=merge, info_only=info_only, **kwargs)
return
else:
iframe_html = get_content(iframe_url)
real_url = r1(r'<source src="([^"]*)"', iframe_html)

View File

@ -4,7 +4,6 @@ __all__ = ['twitter_download']
from ..common import *
from .universal import *
from .vine import vine_download
def extract_m3u(source):
r1 = get_content(source)

View File

@ -1,36 +0,0 @@
#!/usr/bin/env python
__all__ = ['vine_download']
from ..common import *
import json
def vine_download(url, output_dir='.', merge=True, info_only=False, **kwargs):
html = get_content(url)
video_id = r1(r'vine.co/v/([^/]+)', url)
title = r1(r'<title>([^<]*)</title>', html)
stream = r1(r'<meta property="twitter:player:stream" content="([^"]*)">', html)
if not stream: # https://vine.co/v/.../card
stream = r1(r'"videoUrl":"([^"]+)"', html)
if stream:
stream = stream.replace('\\/', '/')
else:
posts_url = 'https://archive.vine.co/posts/' + video_id + '.json'
json_data = json.loads(get_content(posts_url))
stream = json_data['videoDashUrl']
title = json_data['description']
if title == "":
title = json_data['username'].replace(" ", "_") + "_" + video_id
mime, ext, size = url_info(stream)
print_info(site_info, title, mime, size)
if not info_only:
download_urls([stream], title, ext, size, output_dir, merge=merge)
site_info = "Vine.co"
download = vine_download
download_playlist = playlist_not_supported('vine')