leoncvlt / blinkist-scraper

📚 Python tool to download book summaries and audio from Blinkist.com, and generate some pretty output
190 stars 36 forks source link

how to skip audio file? #24

Closed sasagr closed 4 years ago

sasagr commented 4 years ago

is there a command/argument I can give to skip the audio scraping, if I m interested in the ebook only?

Arminius4 commented 4 years ago

I just had a look in the __main.py__ file. There is the audio argument which you can set to False and it'll skip the audio download.

parser.add_argument(
        "--audio",
        action="store_true",
        default=True,
        help="Download the audio blinks for each book",
    )

Consider replacing default=True with default=False. If you'd like to download the audio also, you have to invoke the scraper the --audio argument with this change (or restore the True default in the code).

sasagr commented 4 years ago

shall I make the change in the__main.py_file or I can add it as argument in the scraper command. I tried python3 blinkistscraper/main.py user pass --audio false --book url but it gives me error

also I tried with argument --audio default=False, same result

Arminius4 commented 4 years ago

Yes, change the code in the file

sasagr commented 4 years ago

ok. thanks

leoncvlt commented 4 years ago

It does make sense for the --audio argument to be False by deafult since with it being of store_true type, there's no way to turn it off via command line. I fixed this in e2956f992d7919e599163b8b0a95ab641cdbe89a 😃

sasagr commented 4 years ago

so if I m understanding it right, with the change of https://github.com/leoncvlt/blinkist-scraper/commit/e2956f992d7919e599163b8b0a95ab641cdbe89a with the simple scraping command we don't get audio scraping but only book. What shall I do if I want the audio as well? can I ask for it in the command line?

leoncvlt commented 4 years ago

Yup, you just add --audio to your command as specified in the readme.