openzim / youtube

Create a ZIM file from a Youtube channel/username/playlist
GNU General Public License v3.0
39 stars 26 forks source link

Local file --banner and --profile not working #178

Closed lsolesen closed 9 months ago

lsolesen commented 9 months ago

I am trying the following command

youtube2zim --api-key API_KEY --type playlist --id "PLkJ6LtaZYPrWaT4g1qmhLakYFkMOiWQFW" --name "just-dance" --format mp4 --output ./data/ --banner ./just-dance-1.jpg --profile ./logo.jpeg --description "Just Dance - have great fun while moving your body." --title "Just Dance"

But it returns this error:

[youtube2zim::2023-10-09 09:28:55,706] INFO:starting youtube scraper for playlist#PLkJ6LtaZYPrWaT4g1qmhLakYFkMOiWQFW
[youtube2zim::2023-10-09 09:28:55,706] INFO:preparing build folder at /tmp/tmpdnmkacgq
INFO:fixing videosjs-ogvjs.js
INFO:all done.
[youtube2zim::2023-10-09 09:28:55,761] INFO:testing Youtube credentials
[youtube2zim::2023-10-09 09:28:56,177] INFO:checking your branding files and values
[youtube2zim::2023-10-09 09:28:56,177] ERROR:FAILED. An error occurred: 'str' object has no attribute 'exists' 

When removing this it works:

--banner ./just-dance-1.jpg --profile ./logo.jpeg

However, I would like to add the banner and another profile image. How can I do this. I also tried with the full path to the image.

rgaudin commented 9 months ago

Thank you @lsolesen for your report. It's now fixed in main branch.

lsolesen commented 9 months ago

I can confirm that it works. However, the script deletes both the banner and the profile picture from the folder after running the script. Is that intended?

benoit74 commented 9 months ago

It is "intented" in the sense that this is what the code say ^^ But I agree it is probably not a good idea. @rgaudin any reason to not copy them instead?

rgaudin commented 9 months ago

It's been there for a while but I see no reason not to copy instead.

benoit74 commented 9 months ago

I opened an issue to change this behavior