You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/routes/other.md
+14-13Lines changed: 14 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -594,24 +594,25 @@ Filter parameters:
594
594
595
595
### Transformation - HTML <Siteurl="docs.rsshub.app"size="sm" />
596
596
597
-
<Route namespace="rsshub" :data='{"path":"/transform/html/:url/:routeParams","categories":["other"],"example":"/rsshub/transform/html/https%3A%2F%2Fwechat2rss.xlab.app%2Fposts%2Flist%2F/item=div%5Bclass%3D%27post%2Dcontent%27%5D%20p%20a","parameters":{"url":"`encodeURIComponent`ed URL address","routeParams":"Transformation rules, requires URL encode"},"features":{"requireConfig":[{"name":"ALLOW_USER_SUPPLY_UNSAFE_DOMAIN","description":""}],"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Transformation - HTML","maintainers":["ttttmr"],"description":"Pass URL and transformation rules to convert HTML/JSON into RSS.\n\nSpecify options (in the format of query string) in parameter `routeParams` parameter to extract data from HTML.\n\n| Key | Meaning | Accepted Values | Default |\n| ----------------- | -------------------------------------------------------------- | --------------- | ---------------------- |\n| `title` | The title of the RSS | `string` | Extract from `<title>` |\n| `item` | The HTML elements as `item` using CSS selector | `string` | html |\n| `itemTitle` | The HTML elements as `title` in `item` using CSS selector | `string` | `item` element |\n| `itemTitleAttr` | The attributes of `title` element as title | `string` | Element text |\n| `itemLink` | The HTML elements as `link` in `item` using CSS selector | `string` | `item` element |\n| `itemLinkAttr` | The attributes of `link` element as link | `string` | `href` |\n| `itemDesc` | The HTML elements as `descrption` in `item` using CSS selector | `string` | `item` element |\n| `itemDescAttr` | The attributes of `descrption` element as description | `string` | Element html |\n| `itemPubDate` | The HTML elements as `pubDate` in `item` using CSS selector | `string` | `item` element |\n| `itemPubDateAttr` | The attributes of `pubDate` element as pubDate | `string` | Element html |\n\n Parameters parsing in the above example:\n\n | Parameter | Value |\n | ------------- | ----------------------------------------- |\n | `url` | `https://wechat2rss.xlab.app/posts/list/` |\n | `routeParams` | `item=div[class='post-content'] p a` |\n\n Parsing of `routeParams` parameter:\n\n | Parameter | Value |\n | --------- | ------------------------------- |\n | `item` | `div[class='post-content'] p a` |","location":"transform/html.ts"}' :test='{"code":1,"message":"AssertionError: expected 503 to be 200 // Object.is equality\n at /home/runner/work/RSSHub/RSSHub/lib/routes.test.ts:79:41\n at processTicksAndRejections (node:internal/process/task_queues:95:5)\n at runTest (file:///home/runner/work/RSSHub/RSSHub/node_modules/.pnpm/@vitest+runner@2.0.5/node_modules/@vitest/runner/dist/index.js:960:11)\n at async Promise.all (index 1429)\n at runSuite (file:///home/runner/work/RSSHub/RSSHub/node_modules/.pnpm/@vitest+runner@2.0.5/node_modules/@vitest/runner/dist/index.js:1102:13)\n at runSuite (file:///home/runner/work/RSSHub/RSSHub/node_modules/.pnpm/@vitest+runner@2.0.5/node_modules/@vitest/runner/dist/index.js:1116:15)\n at runFiles (file:///home/runner/work/RSSHub/RSSHub/node_modules/.pnpm/@vitest+runner@2.0.5/node_modules/@vitest/runner/dist/index.js:1173:5)\n at startTests (file:///home/runner/work/RSSHub/RSSHub/node_modules/.pnpm/@vitest+runner@2.0.5/node_modules/@vitest/runner/dist/index.js:1182:3)\n at file:///home/runner/work/RSSHub/RSSHub/node_modules/.pnpm/vitest@2.0.5_@types+node@22.7.5_jsdom@25.0.1_bufferutil@4.0.8_utf-8-validate@5.0.10_/node_modules/vitest/dist/chunks/runBaseTests.CyvqmuC9.js:130:11\n at withEnv (file:///home/runner/work/RSSHub/RSSHub/node_modules/.pnpm/vitest@2.0.5_@types+node@22.7.5_jsdom@25.0.1_bufferutil@4.0.8_utf-8-validate@5.0.10_/node_modules/vitest/dist/chunks/runBaseTests.CyvqmuC9.js:94:5)\n at run (file:///home/runner/work/RSSHub/RSSHub/node_modules/.pnpm/vitest@2.0.5_@types+node@22.7.5_jsdom@25.0.1_bufferutil@4.0.8_utf-8-validate@5.0.10_/node_modules/vitest/dist/chunks/runBaseTests.CyvqmuC9.js:116:3)\n at runBaseTests (file:///home/runner/work/RSSHub/RSSHub/node_modules/.pnpm/vitest@2.0.5_@types+node@22.7.5_jsdom@25.0.1_bufferutil@4.0.8_utf-8-validate@5.0.10_/node_modules/vitest/dist/chunks/base.CC5R_kgU.js:31:3)\n at ForksBaseWorker.executeTests (file:///home/runner/work/RSSHub/RSSHub/node_modules/.pnpm/vitest@2.0.5_@types+node@22.7.5_jsdom@25.0.1_bufferutil@4.0.8_utf-8-validate@5.0.10_/node_modules/vitest/dist/workers/forks.js:25:7)\n at execute (file:///home/runner/work/RSSHub/RSSHub/node_modules/.pnpm/vitest@2.0.5_@types+node@22.7.5_jsdom@25.0.1_bufferutil@4.0.8_utf-8-validate@5.0.10_/node_modules/vitest/dist/worker.js:115:5)\n at onMessage (file:///home/runner/work/RSSHub/RSSHub/node_modules/.pnpm/tinypool@1.0.1/node_modules/tinypool/dist/entry/process.js:55:20)"}' />
597
+
<Route namespace="rsshub" :data='{"path":"/transform/html/:url/:routeParams","categories":["other"],"example":"/rsshub/transform/html/https%3A%2F%2Fwechat2rss.xlab.app%2Fposts%2Flist%2F/item=div%5Bclass%3D%27post%2Dcontent%27%5D%20p%20a","parameters":{"url":"`encodeURIComponent`ed URL address","routeParams":"Transformation rules, requires URL encode"},"features":{"requireConfig":[{"name":"ALLOW_USER_SUPPLY_UNSAFE_DOMAIN","description":""}],"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Transformation - HTML","maintainers":["ttttmr","hyoban"],"description":"Pass URL and transformation rules to convert HTML/JSON into RSS.\n\nSpecify options (in the format of query string) in parameter `routeParams` parameter to extract data from HTML.\n\n| Key | Meaning | Accepted Values | Default |\n| ------------------- | ------------------------------------------------------------------------------------------------------------- | --------------- | ------------------------ |\n| `title` | The title of the RSS | `string` | Extract from `<title>` |\n| `item` | The HTML elements as `item` using CSS selector | `string` | html |\n| `itemTitle` | The HTML elements as `title` in `item` using CSS selector | `string` | `item` element |\n| `itemTitleAttr` | The attributes of `title` element as title | `string` | Element text |\n| `itemLink` | The HTML elements as `link` in `item` using CSS selector | `string` | `item` element |\n| `itemLinkAttr` | The attributes of `link` element as link | `string` | `href` |\n| `itemDesc` | The HTML elements as `descrption` in `item` using CSS selector | `string` | `item` element |\n| `itemDescAttr` | The attributes of `descrption` element as description | `string` | Element html |\n| `itemPubDate` | The HTML elements as `pubDate` in `item` using CSS selector | `string` | `item` element |\n| `itemPubDateAttr` | The attributes of `pubDate` element as pubDate | `string` | Element html |\n| `itemContent` | The HTML elements as `description` in `item` using CSS selector ( in `itemLink` page for full content ) | `string` | |\n\n Parameters parsing in the above example:\n\n | Parameter | Value |\n | ------------- | ----------------------------------------- |\n | `url` | `https://wechat2rss.xlab.app/posts/list/` |\n | `routeParams` | `item=div[class='post-content'] p a` |\n\n Parsing of `routeParams` parameter:\n\n | Parameter | Value |\n | --------- | ------------------------------- |\n | `item` | `div[class='post-content'] p a` |","location":"transform/html.ts"}' :test='{"code":1,"message":"AssertionError: expected 503 to be 200 // Object.is equality\n at /home/runner/work/RSSHub/RSSHub/lib/routes.test.ts:79:41\n at processTicksAndRejections (node:internal/process/task_queues:95:5)\n at runTest (file:///home/runner/work/RSSHub/RSSHub/node_modules/.pnpm/@vitest+runner@2.0.5/node_modules/@vitest/runner/dist/index.js:960:11)\n at async Promise.all (index 1429)\n at runSuite (file:///home/runner/work/RSSHub/RSSHub/node_modules/.pnpm/@vitest+runner@2.0.5/node_modules/@vitest/runner/dist/index.js:1102:13)\n at runSuite (file:///home/runner/work/RSSHub/RSSHub/node_modules/.pnpm/@vitest+runner@2.0.5/node_modules/@vitest/runner/dist/index.js:1116:15)\n at runFiles (file:///home/runner/work/RSSHub/RSSHub/node_modules/.pnpm/@vitest+runner@2.0.5/node_modules/@vitest/runner/dist/index.js:1173:5)\n at startTests (file:///home/runner/work/RSSHub/RSSHub/node_modules/.pnpm/@vitest+runner@2.0.5/node_modules/@vitest/runner/dist/index.js:1182:3)\n at file:///home/runner/work/RSSHub/RSSHub/node_modules/.pnpm/vitest@2.0.5_@types+node@22.7.5_jsdom@25.0.1_bufferutil@4.0.8_utf-8-validate@5.0.10_/node_modules/vitest/dist/chunks/runBaseTests.CyvqmuC9.js:130:11\n at withEnv (file:///home/runner/work/RSSHub/RSSHub/node_modules/.pnpm/vitest@2.0.5_@types+node@22.7.5_jsdom@25.0.1_bufferutil@4.0.8_utf-8-validate@5.0.10_/node_modules/vitest/dist/chunks/runBaseTests.CyvqmuC9.js:94:5)\n at run (file:///home/runner/work/RSSHub/RSSHub/node_modules/.pnpm/vitest@2.0.5_@types+node@22.7.5_jsdom@25.0.1_bufferutil@4.0.8_utf-8-validate@5.0.10_/node_modules/vitest/dist/chunks/runBaseTests.CyvqmuC9.js:116:3)\n at runBaseTests (file:///home/runner/work/RSSHub/RSSHub/node_modules/.pnpm/vitest@2.0.5_@types+node@22.7.5_jsdom@25.0.1_bufferutil@4.0.8_utf-8-validate@5.0.10_/node_modules/vitest/dist/chunks/base.CC5R_kgU.js:31:3)\n at ForksBaseWorker.executeTests (file:///home/runner/work/RSSHub/RSSHub/node_modules/.pnpm/vitest@2.0.5_@types+node@22.7.5_jsdom@25.0.1_bufferutil@4.0.8_utf-8-validate@5.0.10_/node_modules/vitest/dist/workers/forks.js:25:7)\n at execute (file:///home/runner/work/RSSHub/RSSHub/node_modules/.pnpm/vitest@2.0.5_@types+node@22.7.5_jsdom@25.0.1_bufferutil@4.0.8_utf-8-validate@5.0.10_/node_modules/vitest/dist/worker.js:115:5)\n at onMessage (file:///home/runner/work/RSSHub/RSSHub/node_modules/.pnpm/tinypool@1.0.1/node_modules/tinypool/dist/entry/process.js:55:20)"}' />
598
598
599
599
Pass URL and transformation rules to convert HTML/JSON into RSS.
600
600
601
601
Specify options (in the format of query string) in parameter `routeParams` parameter to extract data from HTML.
0 commit comments