-
-
Save akash-gajjar/24fc183f6b25c74750606606f2319d01 to your computer and use it in GitHub Desktop.
from datetime import datetime | |
from os import system | |
import requests | |
import json | |
## Please install ffmpeg before running this script and make sure it's in your PATH | |
## brew install ffmpeg | |
## Please install requests before running this script | |
## pip3 install requests | |
## download video from tldv.io | |
## | |
## 1. Go to https://tldv.io/ | |
## 2. Login | |
## 3. Go to the meeting you want to download | |
## 4. Copy the URL of the meeting | |
## 5. Open the developer tools (F12) | |
## 6. Go to the network tab | |
## 7. Refresh the page | |
## 8. Find the request to https://gw.tldv.io/v1/meetings/64145828ced74b0013d496ce/watch-page?noTranscript=true | |
## 9. Copy the auth token from the request headers | |
## 10. Run this script and paste the URL and auth token | |
## 11. python3 tldv.py | |
url = input("Please paste the URL of the meeting you want to download: ") | |
meeting_id = url.split("/")[-1] | |
print("\rFound meeting ID: ", meeting_id) | |
auth_token = input("Auth token: ") | |
data = requests.get( | |
f"https://gw.tldv.io/v1/meetings/{meeting_id}/watch-page?noTranscript=true", | |
headers={ | |
"Authorization": auth_token, | |
}, | |
) | |
try: | |
response = json.loads(data.text) | |
meeting = response.get("meeting", {}) | |
name = meeting.get("name", "No name") | |
createdAt = meeting.get("createdAt", datetime.now()) | |
source = response.get("video", {}).get("source", None) | |
date = datetime.strptime((createdAt), "%Y-%m-%dT%H:%M:%S.%fZ") | |
normalised_date = date.strftime("%Y-%m-%d-%H-%M-%S") | |
filename = f"{normalised_date}_{name}" | |
filename_ext = ".mp4" | |
command = f'ffmpeg -i {source} -c copy "{filename}.{filename_ext}"' | |
json_filename = f'{filename}.json' | |
with open(json_filename, "w") as f: | |
f.write(data.text) | |
print(command) | |
print("Downloading video...") | |
system(command) | |
except: | |
print("Error encountered") | |
print(data.text) |
I think I found the token, but it gives me an error unauthorized message
Hi I'm not a dev but i need to download a video from tldv
I got lost at 8, I couldn't find the request
could you help out
same i also got lost at step 8
If anybody is facing problem in setting up FFMPEG-
https://www.editframe.com/guides/how-to-install-and-start-using-ffmpeg-in-under-10-minutes
not works !!
I created a fork with working code
@cnovasj can you share with us?
Thanks. It's works.
I have forked one with some changes:
- Remove invalid characters from the filename
- Add "Bearer" to auth token if not present
its stoped working from today
Does anyone have a new working version ?
thanks! works like a charm!
Anyone could download from MACOS? I have tried but it doesn't work. I am able to enter the url and the token but it seems to show me on terminal, all transcription of the video but does not download the video or anything.
it's not clear on how to get the authorization token