Fetcher
Name: HTML
Short description: HyperText Markup Language
Website: N/A
API documentation: N/A
Proposed verification mechanism
- We create a new fetcher that takes a URL and a CSS selector query
- We
fetch()the URL's raw HTML content, and usecheerioto query it - We then convert all the queried nodes into JSON using
html-to-json-parser, and return them
Remarks
- This is not a service provider, but a fetcher that will help create other service providers.
Example response
If we have the following HTML:
<div id="ariadne">openpgp4fpr:4993568a993436c36d0d77c6c8e368337d68194a</div>
and we query #ariadne, it will return
[
{
"type": "div",
"content": [
"openpgp4fpr:4993568a993436c36d0d77c6c8e368337d68194a"
],
"attributes": {
"id": "ariadne"
}
}
]
Tasks
- Verification mechanism tested
- Added to doip-js
- Added to doip-rs
- Added proxy routes (if needed)
- Added to keyoxide-brands
- Added to documentation
### Fetcher
Name: HTML
Short description: **H**yper**T**ext **M**arkup **L**anguage
Website: N/A
API documentation: N/A
### Proposed verification mechanism
* We create a new fetcher that takes a URL and a CSS selector query
* We `fetch()` the URL's raw HTML content, and use [`cheerio`](https://www.npmjs.com/package/cheerio) to query it
* We then convert all the queried nodes into JSON using [`html-to-json-parser`](https://www.npmjs.com/package/html-to-json-parser), and return them
### Remarks
* This is <em>not</em> a service provider, but a fetcher that will help create other service providers.
#### Example response
If we have the following HTML:
```html
<div id="ariadne">openpgp4fpr:4993568a993436c36d0d77c6c8e368337d68194a</div>
```
and we query `#ariadne`, it will return
```json
[
{
"type": "div",
"content": [
"openpgp4fpr:4993568a993436c36d0d77c6c8e368337d68194a"
],
"attributes": {
"id": "ariadne"
}
}
]
```
### Tasks
<!-- Leave the following unchecked -->
- [ ] Verification mechanism tested
- [ ] Added to [doip-js](https://codeberg.org/keyoxide/doipjs)
- [ ] Added to [doip-rs](https://codeberg.org/keyoxide/doip-rs)
- [ ] Added proxy routes (if needed)
- [ ] Added to [keyoxide-brands](https://codeberg.org/keyoxide/keyoxide-brands)
- [ ] Added to [documentation](https://codeberg.org/keyoxide/keyoxide-docs)