rdtorres / gbDownloader

CLI program used to download videos from GL0B0 tv website
GNU General Public License v2.0
2 stars 0 forks source link

Help using this #1

Closed charge closed 10 years ago

charge commented 10 years ago

Hi there, I wondered if you had 10 minutes to guide me on how to use this? I have a premium account and live in the UK, I would be very grateful! Thanks.

vitorhirota commented 10 years ago

Assuming you are on *nix platforms, download both this repo, and globo plugin's repo

In globoDownloader.sh edit the first two lines to:

PYTHON_EXEC=python
export PYTHONPATH=<your_path>/plugin.video.globotv

In globoDownloader.ini you can set your username/password

Fire up a terminal, cd to this repo and just execute the script with ./gbDownloader.sh [args]

-h will give you all the commands available.

charge commented 10 years ago

thanks! I get the following error...

\ running job globoDownloader.sh on Thu 19 Dec 2013 13:39:03 GMT running = 0 Traceback (most recent call last): File "./globoDownloader.py", line 24, in from resources.lib import globo File "/Users/user/Documents/globo/plugin.video.globotv/resources/lib/globo.py", line 20, in import requests ImportError: No module named requests

vitorhirota commented 10 years ago

A pip install requests will do the trick, if you have pip

If it throws an error, try with sudo. If you don't have pip sudo easy_install pip first.

charge commented 10 years ago

That looks to have done the trick! Will let you know once it works, thanks again

charge commented 10 years ago

How would I go about getting the following to work?

./globoDownloader.sh -drv /rede-globo/amor-a-vida/ -dir /Users/user/Movies

rdtorres commented 10 years ago

Hi Henry,

I was flying back home, so I did not have a chance to reply you before.

As I can see you already solve your issue. In any case, this is the command line that I run: /globoDownloader.sh --downloadRailVideos '/rede-globo/amor-a-vida/' '519ae95ae9bde479f200000a' -dir /mnt/dwn/canais/Amor_A_Vida/ -l 3

[] 's Rafael Torres On Dec 19, 2013 8:59 AM, "Henry Charge" notifications@github.com wrote:

How would I go about getting the following to work?

./globoDownloader.sh -drv /rede-globo/amor-a-vida/ -dir /Users/user/Movies

— Reply to this email directly or view it on GitHubhttps://github.com/rdtorres/gbDownloader/issues/1#issuecomment-30930055 .

charge commented 10 years ago

Almost there! I am getting this error now, when it tries to download

/bin/sh: /usr/bin/axel: No such file or directory

charge commented 10 years ago

I'm guessing it has something to do with this:

download_command = /usr/bin/axel -n 5 -o '%s' '%s' ffmpeg_step = /home/rafael/ffmpeg -i '%s' -c copy -bsf:v h264_mp4toannexb -f mpegts '%s' ffmpeg_final = /home/rafael/ffmpeg -i "concat:%s" -c copy -bsf:a aac_adtstoasc '%s'

rdtorres commented 10 years ago

I use axel to download the episodes because it is faster than using standard python library. You could install from your distribution like: sudo yum install axel or sudo apt-get install axel. On Dec 19, 2013 9:16 AM, "Henry Charge" notifications@github.com wrote:

I'm guessing it has something to do with this:

download_command = /usr/bin/axel -n 5 -o '%s' '%s' ffmpeg_step = /home/rafael/ffmpeg -i '%s' -c copy -bsf:v h264_mp4toannexb -f mpegts '%s' ffmpeg_final = /home/rafael/ffmpeg -i "concat:%s" -c copy -bsf:a aac_adtstoasc '%s'

— Reply to this email directly or view it on GitHubhttps://github.com/rdtorres/gbDownloader/issues/1#issuecomment-30931189 .

charge commented 10 years ago

OK great, I've used homebrew to install and get:

/usr/local/Cellar/axel/2.4: 8 files, 104K, built in 2 seconds

So shall I change the path to that?

And do I also need to change the ffmpeg directory?

charge commented 10 years ago

Ignore that last comment, I typed which axel and got /usr/local/bin/axel so have put that in, and ffmpeg is also the same so have updated that.

When I try and run it now it tries to download the videos but it seems to be erroring, and I have to cancel it as it just keeps trying.

\ running job globoDownloader.sh on Thu 19 Dec 2013 14:47:11 GMT running = 0 Downloading http://voddownload.globo.com/09/9f/cc/3028138_ccf30fb71aae8ac4d8d818995a5943ccf5c93cbd/3028138-web720.mp4?h=05021387464556475377044313874681561782494750vJLBFte8TX7Fw6GvQcwTmg&k=html5 to /users/user/Movies/Amor-a-Vida/amor1-_1812.mp4 /usr/local/bin/axel -n 5 -o '/users/user/Movies/Amor-a-Vida/amor1-_1812.mp4' 'http://voddownload.globo.com/09/9f/cc/3028138_ccf30fb71aae8ac4d8d818995a5943ccf5c93cbd/3028138-web720.mp4?h=05021387464556475377044313874681561782494750vJLBFte8TX7Fw6GvQcwTmg&k=html5' Initializing download: http://voddownload.globo.com/09/9f/cc/3028138_ccf30fb71aae8ac4d8d818995a5943ccf5c93cbd/3028138-web720.mp4?h=05021387464556475377044313874681561782494750vJLBFte8TX7Fw6GvQcwTmg&k=html5 File size: 237806113 bytes Opening output file /users/user/Movies/Amor-a-Vida/amor1-_1812.mp4 Error opening local file Error downloading file http://voddownload.globo.com/09/9f/cc/3028138_ccf30fb71aae8ac4d8d818995a5943ccf5c93cbd/3028138-web720.mp4?h=05021387464556475377044313874681561782494750vJLBFte8TX7Fw6GvQcwTmg&k=html5 to /users/user/Movies/Amor-a-Vida/amor1-_1812.mp4

Can you see anything wrong there?

rdtorres commented 10 years ago

Hi Henry,

Thanks for using it. It was my personal code that I decided to make available to everybody. I didn't realize that installing it from scratch would be so timing consuming. Based on this thread, I will write a "How to" manual.

Back to your issue:

It looks like axel could not write to that particular directory. Have you checked if you have write permissions there "/users/user/Movies/Amor-a-Vida" ? or if this directory exists ?

Try to do this:

mkdir -p /users/user/Movies/Amor-a-Vida chmod 777 /users/user/Movies/Amor-a-Vida

The first command will create the entire directory structure and the second will change its permission.

[]'s Rafael Torres

On Thu, Dec 19, 2013 at 9:54 AM, Henry Charge notifications@github.comwrote:

Ignore that last comment, I typed which axel and got /usr/local/bin/axel so have put that in, and ffmpeg is also the same so have updated that.

When I try and run it now it tries to download the videos but it seems to be erroring, and I have to cancel it as it just keeps trying.

\ running job globoDownloader.sh on Thu 19 Dec 2013 14:47:11 GMT running = 0 Downloading http://voddownload.globo.com/09/9f/cc/3028138_ccf30fb71aae8ac4d8d818995a5943ccf5c93cbd/3028138-web720.mp4?h=05021387464556475377044313874681561782494750vJLBFte8TX7Fw6GvQcwTmg&k=html5to /users/user/Movies/Amor-a-Vida/amor1- 1812.mp4 /usr/local/bin/axel -n 5 -o '/users/user/Movies/Amor-a-Vida/amor 1_-_1812.mp4' 'http://voddownload.globo.com/09/9f/cc/3028138 http://voddownload.globo.com/09/9f/cc/3028138_ccf30fbhttps://github.com/rdtorres/gbDownloader/commit/ccf30fb71aae8ac4d8d818995a5943ccf5c93cbd /3028138-web720.mp4?h=05021387464556475377044313874681561782494750vJLBFte8TX7Fw6GvQcwTmg&k=html5' Initializing download: http://voddownload.globo.com/09/9f/cc/3028138_ccf30fb71aae8ac4d8d818995a5943ccf5c93cbd/3028138-web720.mp4?h=05021387464556475377044313874681561782494750vJLBFte8TX7Fw6GvQcwTmg&k=html5 File size: 237806113 bytes Opening output file /users/user/Movies/Amor-a-Vida/amor1-

_1812.mp4 Error opening local file Error downloading file http://voddownload.globo.com/09/9f/cc/3028138 http://voddownload.globo.com/09/9f/cc/3028138_ccf30fbhttps://github.com/rdtorres/gbDownloader/commit/ccf30fb71aae8ac4d8d818995a5943ccf5c93cbd/3028138-web720.mp4?h=05021387464556475377044313874681561782494750vJLBFte8TX7Fw6GvQcwTmg&k=html5 to /users/user/Movies/Amor-a-Vida/amor1-_1812.mp4

Can you see anything wrong there?

— Reply to this email directly or view it on GitHubhttps://github.com/rdtorres/gbDownloader/issues/1#issuecomment-30934325 .

charge commented 10 years ago

Hi Rafael, that's the ticket! Thanks so much for your help. I just need to work out how to name the files now.

Thank you again, and if you and Vitor would like a beer donated let me know the details

Just realised it concatenates the files afterwards and names them, amazing!!!

charge commented 10 years ago

Is there any way to stop the process running? It seems to be still running even though I killed the terminal session and Ctrl-C'd it

OK it did seem to stop in the end, I'm guessing it would be difficult to make the script download the latest episode available of a show?

rdtorres commented 10 years ago

Great to hear that it is working. I don't want any donation, Victor is the one who deserves it ( he maintains the core api)

The "- l" parameter will specify the amount of episodes that will be downloaded. The program checks if the episode is already downloaded based on the file name, so be careful while renaming the file to avoid double download.

[] 's Rafael Torres On Dec 20, 2013 7:48 AM, "Henry Charge" notifications@github.com wrote:

Is there any way to stop the process running? It seems to be still running even though I killed the terminal session and Ctrl-C'd it

— Reply to this email directly or view it on GitHubhttps://github.com/rdtorres/gbDownloader/issues/1#issuecomment-30998919 .

charge commented 10 years ago

Oh wow, you're the best! OK I'll send Victor a beer and next time you're in London let me know!

Merry Christmas!!