Last active
July 31, 2020 21:26
-
-
Save jkingsman/2019595adc016a4d6ada3fd4eafa4329 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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