Difference between revisions of "How-to create a Python scraper"

Jump to navigation Jump to search
m
Fix title for indexing custom content
m (Documented some helpful things to know when working with scrapers that produce Vue.JS-based ZIMs. (Adding legacy support, Using ogv.js as fallback for video.js, Using webp-hero for polyfilling WebP images and indexing custom content for search suggestions))
m (Fix title for indexing custom content)
Line 134: Line 134:
</syntaxhighlight>If you are using a special image component like <code><v-img></code> from a UI library like [https://vuetifyjs.com/en/ Vuetify], refer to this [https://github.com/openzim/youtube/blob/853b9245aa5af552110be205b94c6c0e804bf865/zimui/src/plugins/webp-hero.ts helper function] and it [https://github.com/openzim/youtube/blob/853b9245aa5af552110be205b94c6c0e804bf865/zimui/src/components/video/VideoCard.vue#L37-L42 usage] in the YouTube scraper.
</syntaxhighlight>If you are using a special image component like <code><v-img></code> from a UI library like [https://vuetifyjs.com/en/ Vuetify], refer to this [https://github.com/openzim/youtube/blob/853b9245aa5af552110be205b94c6c0e804bf865/zimui/src/plugins/webp-hero.ts helper function] and it [https://github.com/openzim/youtube/blob/853b9245aa5af552110be205b94c6c0e804bf865/zimui/src/components/video/VideoCard.vue#L37-L42 usage] in the YouTube scraper.


'''Indexing items for suggestions'''
==== '''Indexing Custom Content for Suggestions/Search''' ====
 


Since we are not using HTML templates with the Vue.js UI, the content stored in ZIM files will no longer be automatically indexed. To manually index special content refer to code below:<syntaxhighlight lang="python3">
Since we are not using HTML templates with the Vue.js UI, the content stored in ZIM files will no longer be automatically indexed. To manually index special content refer to code below:<syntaxhighlight lang="python3">
4

edits

Navigation menu