Skip to content

Instantly share code, notes, and snippets.

@dbgrigsby
Created May 6, 2017 20:15
Show Gist options
  • Save dbgrigsby/9dad350216cb29c6a4d18024b83b8d4f to your computer and use it in GitHub Desktop.
Save dbgrigsby/9dad350216cb29c6a4d18024b83b8d4f to your computer and use it in GitHub Desktop.
Echo 360 Video Download Python
import requests
dataout = ""
lectureNumber = 1
with open ("source.html", 'r') as source: # Right click - View Source on an Echo 360 video page, save as file
dataout="".join(line.rstrip() for line in source)
for num in range(0,4): # There are four video possible, HD doc camera, HD facecam and their SD versions
y = dataout.split(".mp4?response-cache-control")[num]
x = y.split("s3Url",2)[1]
z = x[5:] + ".mp4"
q = z.replace('\/', '/')
if 'hd1' in q: # switch to 'hd2' for camera 2 (face camera), or 'sd1'/'sd2' for SD versions
print("Downloading: " + q)
r = requests.get(q)
with open('EECS_XXX_Lecture_' + str(lectureNumber) + '_Camera_' + str(1) + '.mp4', 'wb') as fd:
fd.write(r.content)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment