-
Notifications
You must be signed in to change notification settings - Fork 8.8k
feat(route): add 小木游戏情报 #20147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
feat(route): add 小木游戏情报 #20147
Conversation
|
Successfully generated as following: http://localhost:1200/xiaomuacg - Failed ❌ |
|
It should be working well, at least on my local device. Please help look into this. Thank you ~ |
|
Successfully generated as following: http://localhost:1200/xiaomuacg - Failed ❌ |
|
WordPress can using API to fetch, like https://github.com/DIYgod/RSSHub/tree/master/lib/routes/landiannews |
|
|
||
| async function handler() { | ||
| const baseUrl = 'https://xiaomuacg.com'; | ||
|
|
Check failure
Code scanning / ESLint
Disallow trailing whitespace at the end of lines Error
| retry: 2, | ||
| retryDelay: 1000 | ||
| }); | ||
|
|
Check failure
Code scanning / ESLint
Disallow trailing whitespace at the end of lines Error
| retry: 2, | ||
| retryDelay: 1000 | ||
| }); | ||
|
|
Check failure
Code scanning / ESLint
Disallow trailing whitespace at the end of lines Error
|
|
||
| // 尝试多种选择器来找到文章 | ||
| let articles = $('article').slice(0, 10); | ||
|
|
Check failure
Code scanning / ESLint
Disallow trailing whitespace at the end of lines Error
| if (articles.length === 0) { | ||
| articles = $('.post, .entry, .content-item, .item, .news-item').slice(0, 10); | ||
| } | ||
|
|
Check failure
Code scanning / ESLint
Disallow trailing whitespace at the end of lines Error
| if (dateText) { | ||
| try { | ||
| pubDate = parseDate(dateText); | ||
| } catch (e) { |
Check failure
Code scanning / ESLint
Prefer omitting the `catch` binding parameter. Error
| if (dateText) { | ||
| try { | ||
| pubDate = parseDate(dateText); | ||
| } catch (e) { |
Check failure
Code scanning / ESLint
Enforce a specific parameter name in catch clauses. Error
| if (dateText) { | ||
| try { | ||
| pubDate = parseDate(dateText); | ||
| } catch (e) { |
Check failure
Code scanning / ESLint
Disallow unused variables Error
| return { | ||
| title, | ||
| link, | ||
| description: description.substring(0, 200) + (description.length > 200 ? '...' : ''), |
Check warning
Code scanning / ESLint
Prefer `String#slice()` over `String#substr()` and `String#substring()`. Warning
| }; | ||
| } catch (fallbackError) { | ||
| logger.error(`Fallback also failed: ${fallbackError}`); | ||
|
|
Check failure
Code scanning / ESLint
Disallow trailing whitespace at the end of lines Error
|
Successfully generated as following: http://localhost:1200/xiaomuacg - Success ✔️<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
<channel>
<title>小木游戏情报</title>
<link>https://xiaomuacg.com</link>
<atom:link href="http://localhost:1200/xiaomuacg" rel="self" type="application/rss+xml"></atom:link>
<description>暂时无法获取最新文章,请稍后再试。 - Powered by RSSHub</description>
<generator>RSSHub</generator>
<webMaster>[email protected] (RSSHub)</webMaster>
<language>en</language>
<lastBuildDate>Sat, 27 Sep 2025 10:22:35 GMT</lastBuildDate>
<ttl>5</ttl>
<item>
<title>网站暂时无法访问</title>
<description>访问出现问题:[GET] "https://xiaomuacg.com/feed/": 403 Forbidden</description>
<link>https://xiaomuacg.com/</link>
<guid isPermaLink="false">https://xiaomuacg.com/</guid>
<pubDate>Sat, 27 Sep 2025 10:22:35 GMT</pubDate>
</item>
</channel>
</rss> |
Involved Issue / 该 PR 相关 Issue
Example for the Proposed Route(s) / 路由地址示例
New RSS Route Checklist / 新 RSS 路由检查表
PuppeteerNote / 说明
为 xiaomuacg.com 添加 RSS 路由。该网站是一个游戏、动漫资讯网站,提供游戏和动漫新闻、游戏限免和优惠信息等内容。路由基于现有的 WordPress RSS feed 进行优化处理,提供更好的阅读体验。