You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
1.5 KiB
23 lines
1.5 KiB
# www.npmjs.com (2019-02-01) HTML search results mapping
|
|
# search template URL : https://www.npmjs.com/search?q={searchTerms}
|
|
|
|
# This is an example mapping file for OpenSearch systems or search APIs providing results only as HTML
|
|
# When possible, it is preferable to use an OpenSearch URL providing results as standard RSS or Atom feed as mapping is generic
|
|
# Selectors are using CSS or JQuery-like syntax, as described at https://jsoup.org/apidocs/org/jsoup/select/Selector.html
|
|
# Standard Java properties file syntax is used here instead of usual YaCy Configuration syntax to easily allow '#' characters in values (example : _result=div#result li)
|
|
# Character encoding is assumed to be ISO-8859-1
|
|
|
|
# Result node selector (required)
|
|
# In this example, a section such as : <section class="package-list-item__capsule___3_4Eo flex flex-row-reverse pl1-ns pt3 pb2 ph1 bb b--black-10 ">...</section>
|
|
_result=section[class*=package-list-item]
|
|
|
|
# Result link selector relative to the selected result block (required)
|
|
# In this example, a link such as <div class="flex flex-row items-end pr3"><a target="_self" href="/package/packafename">...</a></div>
|
|
_sku=div.items-end a
|
|
|
|
# field mappings
|
|
# YaCyFieldname = HTML text node selector, relative to the result block
|
|
# In this example title is the text of the link so it has the same selector
|
|
title=h3[class*=package-list-item__title]
|
|
# In this example the description is in a paragraph tag such as <p class="description css-zqstoe">Package description</p>
|
|
description_txt=p[class*=package-list-item__description] |