feat: integrate node-html-parser for HTML fetching and parsing
- Added node-html-parser as a dependency for parsing HTML content. - Implemented fetch-html script to fetch and parse HTML from a specified URL. - Updated script sandbox to allow the use of node-html-parser. - Created a new workflow for fetching data from dev.to, including configuration for URL and selectors. - Updated package.json to include node-html-parser in server package dependencies.
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
name: fetch-devto
|
||||
scripts:
|
||||
- script: fetch-html.js
|
||||
config:
|
||||
url: https://dev.to/t/productivity/top/week
|
||||
selector: "#substories h2"
|
||||
outputVar: titles
|
||||
jsonata: "$[].text"
|
||||
triggers:
|
||||
- type: HTTP
|
||||
method: POST
|
||||
path: /fetch-dev-to
|
||||
@@ -2,4 +2,5 @@ scripts:
|
||||
- time-to-ntfy-example.yaml
|
||||
- test.yaml
|
||||
- manual-trigger.yaml
|
||||
- cron-example.yaml
|
||||
- cron-example.yaml
|
||||
- fetch-devto.yaml
|
||||
|
||||
Reference in New Issue
Block a user