Skip to content

Instantly share code, notes, and snippets.

@Themis3000
Created January 12, 2022 02:13
Show Gist options
  • Save Themis3000/9d8583b3209c1c5f06265d920d7d91cc to your computer and use it in GitHub Desktop.
Save Themis3000/9d8583b3209c1c5f06265d920d7d91cc to your computer and use it in GitHub Desktop.
import requests
from time import sleep
CHANNEL_ID = "channel id here"
channel_req = requests.get(f"https://archive.vine.co/profiles/_/{CHANNEL_ID}.json")
if channel_req.status_code != 200:
print("failed getting channel data")
quit(-1)
video_ids = channel_req.json()["posts"]
for video_id in video_ids:
video_info_req = requests.get(f"https://archive.vine.co/posts/{video_id}.json")
if video_info_req.status_code != 200:
print(f"failed getting video info for id {video_id}")
continue
video_info = video_info_req.json()
video_req = requests.get(video_info["videoUrl"])
if video_req.status_code != 200:
print(f"failed getting video id {video_id}")
file_name = f"{video_id}.mp4"
with open(file_name, "wb") as f:
f.write(video_req.content)
sleep(1)
print("done!")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment