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

TypeError: Network request failed #2

Open
pabloneme91 opened this issue Oct 9, 2017 · 5 comments
Open

TypeError: Network request failed #2

pabloneme91 opened this issue Oct 9, 2017 · 5 comments

Comments

@pabloneme91
Copy link

Hi! when I try to download a song and i'm getting this error. Is the server 52.232.85.160 still working?

@var77
Copy link
Owner

var77 commented Oct 9, 2017 via email

@pabloneme91
Copy link
Author

Great! I would like to run it. I've never work with python. How can I run it locally?

@var77
Copy link
Owner

var77 commented Oct 15, 2017

@pabloneme91 Hi, that's python server to get audio from youtube video, you can run it locally or on your server for that firstly you need Linux or OS X machine to run nginx, or if you can setup other webserver in windows it's ok. If you look at nginx.conf file you'll find nginx config, if you are using OS X or Linux just make it executable by typing sudo chmod 700 nginx.conf, then change the nginx config file location in the script it's under CONFIG_FILE variable, in the new versions of nginx it's /etc/nginx/conf.d/ , since in my server it wasn't the newest version it was /etc/nginx/sites-enabled. Then run the executable by typing ./nginx.conf so it will add config file for nginx. After that install python and pip on you machine and install pafy, and pydub packages via pip by tying pip install pafy && pip install pydub. After that just type python main.py to run the server. Now if you go to http://127.0.0.1/api?vid= it should download the audio of that video convert it to mp3 and give the URL, you'll also need to change the SERVER_URL variable in converter.py to get right response, if you are running in localhost just put there http://127.0.0.1/ , after downloading and converting the audio to mp3 it will save it under ./dist folder in youtube-audio project folder.

@xuananpham93
Copy link

xuananpham93 commented Oct 23, 2017

@var77 : Where can I put the file mp3 file so it appears in the download? I have never used python. I cant find folder youtube-audio

@var77
Copy link
Owner

var77 commented Oct 23, 2017

@xuananpham93 clone the https://github.com/var77/youtube-audio repo, then create dist folder under project root, and follow the instructions mentioned above.

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

No branches or pull requests

3 participants