Closed dan-niles closed 3 months ago
@benoit74 I've included a zimdump of a ZIM file I generated using this new code here. Can you check the JSON files and let me know if everything is ok?
(I removed the video files since there is a limit of 25MB for things I can upload here)
Additionally, you can try running the scraper on the new testing channel created in #221 with the following command:
youtube2zim --api-key "<YOUR-API-KEY>" --type channel --id "UC8elThf5TGMpQfQc_VE917Q" --name "openZIM_testing" --output ../output
I added a new videoSlug
property to the PlaylistPreview
schema, that points to the video to be redirected to when clicking on the preview.
Edit 1 - Added joined_date
, channel_name
and channel_description
to channel.json.
Edit 2 - I found a way to get the video durations from the YouTube API. I updated the scraper to fetch the durations and include them in the JSON files.
This PR adds the functionality for generating JSON files to be consumed by Vue.js UI as mentioned in #212. The JSON files being generated are:
channel.json
: Contains information about the channelplaylists.json
: Contains a list of all playlists in the channelplaylists
folder for each playlist : Contains info about the playlist and the videos it contains. (This includes the "Uploads" of the channel as well)videos
folder for each video : Contains info about the specific videoThe JSON files are added "on the fly" to the ZIM as mentioned in #209. However the video files and branding files are still being copied from the build_dir.
Closes #212 Closes #220