Skip to content

Commit a328c25

Browse files
chore: auto build DIYgod/RSSHub@b3d8bc8
1 parent dfefa1a commit a328c25

File tree

2 files changed

+28
-26
lines changed

2 files changed

+28
-26
lines changed

src/routes/other.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -594,24 +594,25 @@ Filter parameters:
594594

595595
### Transformation - HTML <Site url="docs.rsshub.app" size="sm" />
596596

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=&#39;post-content&#39;] p a` |\n\n Parsing of `routeParams` parameter:\n\n | Parameter | Value |\n | --------- | ------------------------------- |\n | `item` | `div[class=&#39;post-content&#39;] 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=&#39;post-content&#39;] p a` |\n\n Parsing of `routeParams` parameter:\n\n | Parameter | Value |\n | --------- | ------------------------------- |\n | `item` | `div[class=&#39;post-content&#39;] 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)"}' />
598598

599599
Pass URL and transformation rules to convert HTML/JSON into RSS.
600600

601601
Specify options (in the format of query string) in parameter `routeParams` parameter to extract data from HTML.
602602

603-
| Key | Meaning | Accepted Values | Default |
604-
| ----------------- | -------------------------------------------------------------- | --------------- | ---------------------- |
605-
| `title` | The title of the RSS | `string` | Extract from `<title>` |
606-
| `item` | The HTML elements as `item` using CSS selector | `string` | html |
607-
| `itemTitle` | The HTML elements as `title` in `item` using CSS selector | `string` | `item` element |
608-
| `itemTitleAttr` | The attributes of `title` element as title | `string` | Element text |
609-
| `itemLink` | The HTML elements as `link` in `item` using CSS selector | `string` | `item` element |
610-
| `itemLinkAttr` | The attributes of `link` element as link | `string` | `href` |
611-
| `itemDesc` | The HTML elements as `descrption` in `item` using CSS selector | `string` | `item` element |
612-
| `itemDescAttr` | The attributes of `descrption` element as description | `string` | Element html |
613-
| `itemPubDate` | The HTML elements as `pubDate` in `item` using CSS selector | `string` | `item` element |
614-
| `itemPubDateAttr` | The attributes of `pubDate` element as pubDate | `string` | Element html |
603+
| Key | Meaning | Accepted Values | Default |
604+
| ------------------- | ------------------------------------------------------------------------------------------------------------- | --------------- | ------------------------ |
605+
| `title` | The title of the RSS | `string` | Extract from `<title>` |
606+
| `item` | The HTML elements as `item` using CSS selector | `string` | html |
607+
| `itemTitle` | The HTML elements as `title` in `item` using CSS selector | `string` | `item` element |
608+
| `itemTitleAttr` | The attributes of `title` element as title | `string` | Element text |
609+
| `itemLink` | The HTML elements as `link` in `item` using CSS selector | `string` | `item` element |
610+
| `itemLinkAttr` | The attributes of `link` element as link | `string` | `href` |
611+
| `itemDesc` | The HTML elements as `descrption` in `item` using CSS selector | `string` | `item` element |
612+
| `itemDescAttr` | The attributes of `descrption` element as description | `string` | Element html |
613+
| `itemPubDate` | The HTML elements as `pubDate` in `item` using CSS selector | `string` | `item` element |
614+
| `itemPubDateAttr` | The attributes of `pubDate` element as pubDate | `string` | Element html |
615+
| `itemContent` | The HTML elements as `description` in `item` using CSS selector ( in `itemLink` page for full content ) | `string` | |
615616

616617
Parameters parsing in the above example:
617618

0 commit comments

Comments
 (0)