openzim / youtube

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

Access zim file metadata "la_chaine_de_maths_et_tiques" #134

Closed barbayellow closed 3 years ago

barbayellow commented 3 years ago

We with are currently working on a script who will automatically add zim files url in a database and get Metadata from the Zimfarm API and Meta4 file.

On a particular Zim https://farm.openzim.org/recipes/la_chaine_de_maths_et_tiques when I request the API, the description key is missing in the json response compared to other zim files which send all these keys: [config][flags][description]

Moreover, this specific zim file does not have a a .meta4 file as the other zim files which all have this kinf of file which is reachable through this pattern: url = kiwix_url_download + information_json["category"]+"/"+ informationjson["config"]["flags"]["name"] + "" + date[0] + ".zim" + ".meta4"

Is this file problematic or is this a change in the generation of the zim files?

rgaudin commented 3 years ago

On the description field, this is optional so you can not assume it should be there. Same goes for title actually. Zimfarm values are used to overwrite the scraper defaults (name of video for title for instance).

Regarding the missing .meta4 I believe it's a bug in the mirrorbrain confirguration (as this is in the newly created /videos folder). @kelson42 please follow-up on that.

kelson42 commented 3 years ago

@barbayellow Which URL has 404 and shoult not to your opinion?

rgaudin commented 3 years ago

@kelson42 https://mirror.download.kiwix.org/zim/videos/la_chaine_de_maths_et_tiques_fr_all_2020-09.zim

rgaudin commented 3 years ago

ZIM is present but not the .meta4 one. Could mirrorbrain not be configured properly for videos subfolder?

kelson42 commented 3 years ago

It is online https://download.kiwix.org/zim/videos/la_chaine_de_maths_et_tiques_fr_all_2020-09.zim.meta4

rgaudin commented 3 years ago

Ah… OK I got the problem, links in zimfarm have changed to point to a specific mirror now (mirror.download.kiwix.org) so there of course the .meta4 link doesn't obviously exist. Mystery solved. @barbayellow replace this link with download.kiwix.org one.

barbayellow commented 3 years ago

thx, will do.