Skip to content
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

fix(core): string-type categories only #13590

Merged
merged 1 commit into from
Oct 24, 2023
Merged

Conversation

JimenezLi
Copy link
Contributor

Involved Issue / 该 PR 相关 Issue

Close #13451

Example for the Proposed Route(s) / 路由地址示例

/test/filter-illegal-category?filter_category=CategoryIllegal

New RSS Route Checklist / 新 RSS 路由检查表

  • New Route / 新的路由
  • Documentation / 文档说明
    • EN / 英文文档
    • CN / 中文文档
  • Full text / 全文获取
    • Use cache / 使用缓存
  • Anti-bot or rate limit / 反爬/频率限制
    • If yes, do your code reflect this sign? / 如果有, 是否有对应的措施?
  • Date and time / 日期和时间
    • Parsed / 可以解析
    • Correct time zone / 时区正确
  • New package added / 添加了新的包
  • Puppeteer

Note / 说明

The issue doesn't provide a route, so I use the test one.
This is meant to keep only string-type categories, so that the program doesn't crash with null category.

@github-actions github-actions bot added core enhancement Route: v2 v2 route related Auto: Route Test Complete Auto route test has finished on given PR labels Oct 20, 2023
@github-actions
Copy link
Contributor

Successfully generated as following:

http://localhost:1200/test/filter-illegal-category?filter_category=CategoryIllegal - Success ✔️
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"
>
    <channel>
        <title><![CDATA[Test filter-illegal-category]]></title>
        <link>https://github.com/DIYgod/RSSHub</link>
        <atom:link href="http://localhost:1200/test/filter-illegal-category?filter_category=CategoryIllegal" rel="self" type="application/rss+xml" />
        <description><![CDATA[A test route for RSSHub - Made with love by RSSHub(https://github.com/DIYgod/RSSHub)]]></description>
        <generator>RSSHub</generator>
        <webMaster>i@diygod.me (DIYgod)</webMaster>
        <language>zh-cn</language>
        <lastBuildDate>Fri, 20 Oct 2023 21:06:33 GMT</lastBuildDate>
        <ttl>5</ttl>
        <item>
            <title><![CDATA[TitleIllegal]]></title>
            <description><![CDATA[DescriptionIllegal]]></description>
            <pubDate>Thu, 28 Feb 2019 16:00:00 GMT</pubDate>
            <guid isPermaLink="false">https://github.com/DIYgod/RSSHub/issues/1</guid>
            <link>https://github.com/DIYgod/RSSHub/issues/1</link>
            <author><![CDATA[DIYgod0]]></author>
                <category>CategoryIllegal</category>
        </item>
    </channel>
</rss>

@TonyRL TonyRL merged commit 2c8f463 into DIYgod:master Oct 24, 2023
29 checks passed
@JimenezLi JimenezLi deleted the category branch December 19, 2023 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto: Route Test Complete Auto route test has finished on given PR core enhancement Route: v2 v2 route related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

category若含null会导致路由报错
2 participants