abhint / youtube-downloader Goto Github PK
View Code? Open in Web Editor NEWThis is a youtube downloader. Made of flask and yt-dlp.
License: MIT License
This is a youtube downloader. Made of flask and yt-dlp.
License: MIT License
Thanks a lot for such a great example of flask and yt-dlp.
I am a Flutter developer. I was thinking to make a downloader app with the help of yt-dlp. The problem is yt-dlp is a python program and you can not run it in flutter. Moreover you can not run its executable file in Android or ios. So someone on internet mentioned that you can create yt-dlp api on your cloud-platform using flask and then you can make get and post requests to that api and get a working downloader for Android, iOS, Windows, Linux and MacOS (Flutter supports all these platforms).
But here comes major problems.
It would be great if you guide me.
Is this a yt-dlp error, a flask error, or does it actually belong here?
Log output:
* Serving Flask app 'main'
* Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on all addresses (0.0.0.0)
* Running on http://127.0.0.1:9001
* Running on http://REMOVED:9001
Press CTRL+C to quit
* Restarting with stat
[youtube] Extracting URL: https://www.youtube.com/watch?v=fwtBBTVDFsk
[youtube] fwtBBTVDFsk: Downloading webpage
[youtube] fwtBBTVDFsk: Downloading ios player API JSON
[youtube] fwtBBTVDFsk: Downloading android player API JSON
[youtube] fwtBBTVDFsk: Downloading m3u8 information
[2023-10-07 09:26:17,892] ERROR in app: Exception on / [POST]
Traceback (most recent call last):
File "/home/USERNAME/.local/lib/python3.10/site-packages/flask/app.py", line 1455, in wsgi_app
response = self.full_dispatch_request()
File "/home/USERNAME/.local/lib/python3.10/site-packages/flask/app.py", line 869, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/USERNAME/.local/lib/python3.10/site-packages/flask/app.py", line 867, in full_dispatch_request
rv = self.dispatch_request()
File "/home/USERNAME/.local/lib/python3.10/site-packages/flask/app.py", line 852, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/var/www/html/maskinen/main.py", line 13, in _index
user_dict = get_youtube_extract(youtube_url)
File "/var/www/html/maskinen/utils/tool.py", line 102, in get_youtube_extract
user_sanitize = user_sanitize_info(sanitize_info)
File "/var/www/html/maskinen/utils/tool.py", line 23, in user_sanitize_info
file_size_sanitize = formats['filesize'] if formats['filesize'] else 0
KeyError: 'filesize'
REDACTED - - [07/Oct/2023 09:26:17] "POST / HTTP/1.1" 500 -
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.