zdr1976 / svbd

Safari video book downloader.
2 stars 1 forks source link

Invalid output dir #2

Open elmobotix opened 3 years ago

elmobotix commented 3 years ago

I get:

NotADirectoryError: [WinError 267] The directory name is invalid: 'C:\Users\elmo/Videos/SafariBooks/Python for Beginners: Learn Python from Scratch'

zdr1976 commented 3 years ago

Hi,

I'm no more using this scrip as the youtube-dl can do it by its own. It can also download videos from another popular site like udemy an so. Please have a look.

elmobotix commented 3 years ago

Hi, Ah OK. Can YouTube-dl manage full batch downloads so I can get a full course rather than single videos from Oreilly?

zdr1976 commented 3 years ago

Yes this tool can download whole video course.

elmobotix commented 3 years ago

Great many thanks. I’ve been trying for ages to get full courses but I’m not good at coding etc so I find it a bit challenging. Do you know if anyone has written a guide on how to do it.

On Tue, 16 Feb 2021 at 08:24, zdr1976 notifications@github.com wrote:

Yes this tool can download whole video course.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/zdr1976/svbd/issues/2#issuecomment-779669387, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASXX2MQR5KVOLOHLWFAUE3DS7ITSXANCNFSM4XU4UCYA .

zdr1976 commented 3 years ago

So here you are example how to download via youtube-dl

youtube-dl -u your@account.com -o '%(playlist_title)s/%(playlist_index)s-%(title)s.%(ext)s' -f 'bestvideo[height<=720]+bestaudio/best[height<=720]/worst' https://learning.oreilly.com/videos/node-js-api-masterclass/9781800569638/

You can adjust quality and output as you need. Check manual pages for more options. This is one i use.

elmobotix commented 3 years ago

So, I assume I can either use the same folder that I use for getting books from safari, or I simply make a new folder. Ive just tried both of those ways and have but my email in the script (no password!! - or do I put ":mypassword" after the email address?)

I get an error anyway. [image: image.png]

On Tue, 16 Feb 2021 at 08:37, zdr1976 notifications@github.com wrote:

So here you are example how to download via youtube-dl

youtube-dl -u your@account.com -o '%(playlist_title)s/%(playlist_index)s-%(title)s.%(ext)s' -f 'bestvideo[height<=720]+bestaudio/best[height<=720]/worst' https://learning.oreilly.com/videos/node-js-api-masterclass/9781800569638/

You can adjust quality and output as you need. Check manual pages for more options. This is one i use.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/zdr1976/svbd/issues/2#issuecomment-779676470, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASXX2MWWZ3TVRGU3XKJX6C3S7IVEPANCNFSM4XU4UCYA .

elmobotix commented 3 years ago

[image: image.png]I did use -u before the email address.

On Tue, 16 Feb 2021 at 08:37, zdr1976 notifications@github.com wrote:

So here you are example how to download via youtube-dl

youtube-dl -u your@account.com -o '%(playlist_title)s/%(playlist_index)s-%(title)s.%(ext)s' -f 'bestvideo[height<=720]+bestaudio/best[height<=720]/worst' https://learning.oreilly.com/videos/node-js-api-masterclass/9781800569638/

You can adjust quality and output as you need. Check manual pages for more options. This is one i use.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/zdr1976/svbd/issues/2#issuecomment-779676470, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASXX2MWWZ3TVRGU3XKJX6C3S7IVEPANCNFSM4XU4UCYA .

elmobotix commented 3 years ago

Doh, just looked on Github, theres a repository to get first right!

On Tue, 16 Feb 2021 at 08:37, zdr1976 notifications@github.com wrote:

So here you are example how to download via youtube-dl

youtube-dl -u your@account.com -o '%(playlist_title)s/%(playlist_index)s-%(title)s.%(ext)s' -f 'bestvideo[height<=720]+bestaudio/best[height<=720]/worst' https://learning.oreilly.com/videos/node-js-api-masterclass/9781800569638/

You can adjust quality and output as you need. Check manual pages for more options. This is one i use.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/zdr1976/svbd/issues/2#issuecomment-779676470, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASXX2MWWZ3TVRGU3XKJX6C3S7IVEPANCNFSM4XU4UCYA .

zdr1976 commented 3 years ago

-u is user name on oreilly.com it's email address as your account.

elmobotix commented 3 years ago

Yeah sorry I understood that part. Do I need the youtube-dl repository from Github https://github.com/ytdl-org/youtube-dl.git ?

On Tue, 16 Feb 2021 at 08:54, zdr1976 notifications@github.com wrote:

-u is user name on oreilly.com it's email address as your account.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/zdr1976/svbd/issues/2#issuecomment-779685009, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASXX2MRLE52YIAXK4NNLLFTS7IXETANCNFSM4XU4UCYA .

zdr1976 commented 3 years ago

Just follow the installation instructions here.

elmobotix commented 3 years ago

Hi,

Yes once I realised there was a specific youtude-dl repository I got it working. Thankyou for helping. Im grabbing some videos right now but I just need to work out how to stop it from adding characters to the file name such as...

  1. Lesson 1 - Getting Started with IPv4 Addresses-0_cs1sxl8j.mp4 (where "-0_cs1sxl8j" has been added)

On Tue, 16 Feb 2021 at 10:17, zdr1976 notifications@github.com wrote:

Just follow the installation instructions here https://github.com/ytdl-org/youtube-dl/blob/master/README.md#installation .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/zdr1976/svbd/issues/2#issuecomment-779735068, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASXX2MRJLKLQVWZT4OPGP23S7JAZ7ANCNFSM4XU4UCYA .

zdr1976 commented 3 years ago

In the example above i'm using -o '%(playlist_title)s/%(playlist_index)s-%(title)s.%(ext)s' to name the directory and files. So just modify it to your liking.

elmobotix commented 3 years ago

Perfect!! - thankyou sooo much fore your help ...lifesaver.

On Tue, 16 Feb 2021 at 11:00, zdr1976 notifications@github.com wrote:

In the example above i'm using -o '%(playlist_title)s/%(playlist_index)s-%(title)s.%(ext)s' to name the directory and files. So just modify it to your liking.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/zdr1976/svbd/issues/2#issuecomment-779761180, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASXX2MQTLPWAJSOCF3DRRODS7JF5LANCNFSM4XU4UCYA .

zdr1976 commented 3 years ago

You're welcome.

elmobotix commented 3 years ago

Hi again

Do you the books downloader too?

I use it but would like to know how I could tweak the .py to prompt for book ID as well as email addy and password.

Any ideas Steve

zdr1976 commented 3 years ago

You can tweak it as much as you want. For argument parsing you can use argparse python module.

elmobotix commented 3 years ago

I’m literally on day 1 of learning python but I will certainly hit it a go.

Thanks

On Wed, 17 Feb 2021 at 20:40, zdr1976 notifications@github.com wrote:

You can tweak it as much as you want. For argument parsing you can use argparse https://docs.python.org/3.8/library/argparse.html python module.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/zdr1976/svbd/issues/2#issuecomment-780838912, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASXX2MX6MFZ5OXCCYMERYZLS7QSSBANCNFSM4XU4UCYA .