Skip to content

Instantly share code, notes, and snippets.

@jkingsman
Last active July 31, 2020 21:26
Show Gist options
  • Save jkingsman/2019595adc016a4d6ada3fd4eafa4329 to your computer and use it in GitHub Desktop.
Save jkingsman/2019595adc016a4d6ada3fd4eafa4329 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
import re
import requests
thumbnail_url = input("Thumbnail URL: ")
vid_id_regex = re.compile(r'\?wvideo=(.*?)"')
vid_id = vid_id_regex.search(thumbnail_url).groups()[0]
rolled_url = "http://fast.wistia.net/embed/iframe/%s?videoFoam=true" % (vid_id)
r = requests.get(rolled_url)
page_source = r.text
bin_file_url_regex = re.compile(r'(http:\/\/embed\.wistia\.com\/deliveries\/.*?\.bin)')
bin_file_url = bin_file_url_regex.search(page_source).groups()[0]
print("Go download %s" % (bin_file_url))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment