Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not downloading in HD #1

Open
WarKittens opened this issue Feb 26, 2024 · 3 comments
Open

Not downloading in HD #1

WarKittens opened this issue Feb 26, 2024 · 3 comments

Comments

@WarKittens
Copy link

I ran this script on a txt file of TT videos and they are all downloaded in standard definition. HD videos are around 9-15 MB (in my experience) and all the downloaded videos are around 2-4 MB. If I am wrong about this please let me know. Otherwise, is there an argument for the python command I am missing?

@AlexRabbit
Copy link
Owner

Sorry for the delay, i wasn't notified.
On line 14 there is an HD setting, as default is activated (number one).
Video sizes in high definition varies by author and how they record it.

edit: i just made some tests nad my script works as it should be.
I tested with this link:
https://www.tiktok.com/@emiliopiano/video/7322960513669811488
The script throws a 21.5 MB file and other tools like ytdlp throws a 10 MB file.

@MattCode64
Copy link

I ran this script on a txt file of TT videos and they are all downloaded in standard definition. HD videos are around 9-15 MB (in my experience) and all the downloaded videos are around 2-4 MB. If I am wrong about this please let me know. Otherwise, is there an argument for the python command I am missing?

In this part of code of tt.py :

if not os.path.exists(filename):
                # Download the video and save it inside the folder
                video_url_without_watermark = response_data['data']['play']
                video_data = requests.get(video_url_without_watermark).content
                with open(filename, 'wb') as video_file:
                    video_file.write(video_data)

Change the play key for hdplay

@AlexRabbit
Copy link
Owner

Change the play key for hdplay

Thanks a lot, fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants