Skip to content

feat(route): add Shanghai weather alert#22087

Open
TinkoLiu wants to merge 3 commits into
DIYgod:masterfrom
TinkoLiu:master
Open

feat(route): add Shanghai weather alert#22087
TinkoLiu wants to merge 3 commits into
DIYgod:masterfrom
TinkoLiu:master

Conversation

@TinkoLiu
Copy link
Copy Markdown

@TinkoLiu TinkoLiu commented May 24, 2026

Involved Issue / 该 PR 相关 Issue

Close #

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

/soweather/warn

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

  • New Route / 新的路由
  • 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 / 说明

  • Add new route for Shanghai weather alerts

@github-actions github-actions Bot added the route label May 24, 2026
Comment on lines +98 to +100
text: content
.replaceAll(/<br\s*\/?>/gi, '\n')
.replaceAll(/<[^>]+>/g, '')
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<script has been removed in L121

@github-actions
Copy link
Copy Markdown
Contributor

Auto Route Test failed, please check your PR body format and reopen pull request. Check logs for more details.
自动路由测试失败,请确认 PR 正文部分符合格式规范并重新开启,详情请检查 日志

@github-actions github-actions Bot added the auto: route no found Automated test failed due to route can not be found in PR description body label May 24, 2026
@github-actions github-actions Bot closed this May 24, 2026
@github-actions github-actions Bot added the auto: DO NOT merge Docker won’t even start label May 24, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Auto Review

  • Rule 23/24 (Import consolidation)lib/routes/soweather/warn.ts: import type { Data } from '../../types' and import type { DataItem, Route } from '@/types' both import from the same module (lib/types.ts). These should be consolidated into a single import using the @/types alias for consistency:
    import type { Data, DataItem, Route } from '@/types';

@github-actions github-actions Bot reopened this May 24, 2026
@github-actions github-actions Bot removed the auto: DO NOT merge Docker won’t even start label May 24, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Auto Route Test failed, please check your PR body format and reopen pull request. Check logs for more details.
自动路由测试失败,请确认 PR 正文部分符合格式规范并重新开启,详情请检查 日志

@github-actions github-actions Bot closed this May 24, 2026
@github-actions github-actions Bot added the auto: DO NOT merge Docker won’t even start label May 24, 2026
@TinkoLiu
Copy link
Copy Markdown
Author

Then how to reopen this PR (

@github-actions github-actions Bot reopened this May 24, 2026
@github-actions github-actions Bot removed the auto: DO NOT merge Docker won’t even start label May 24, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Auto Route Test failed, please check your PR body format and reopen pull request. Check logs for more details.
自动路由测试失败,请确认 PR 正文部分符合格式规范并重新开启,详情请检查 日志

@github-actions github-actions Bot closed this May 24, 2026
@github-actions github-actions Bot added the auto: DO NOT merge Docker won’t even start label May 24, 2026
@github-actions github-actions Bot reopened this May 24, 2026
@github-actions github-actions Bot removed auto: DO NOT merge Docker won’t even start auto: route no found Automated test failed due to route can not be found in PR description body labels May 24, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Successfully generated as following:

http://localhost:1200/soweather/warn - 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://wx.soweather.com/wxapp/warn.jsp</link>
    <atom:link href="http://localhost:1200/soweather/warn" rel="self" type="application/rss+xml"></atom:link>
    <description>上海天气预警 - Powered by RSSHub</description>
    <generator>RSSHub</generator>
    <webMaster>contact@rsshub.app (RSSHub)</webMaster>
    <language>zh-CN</language>
    <lastBuildDate>Sun, 24 May 2026 14:17:46 GMT</lastBuildDate>
    <ttl>5</ttl>
    <item>
      <title>【已解除】金山区气象台发布雷电黄色预警</title>
      <description>解除时间:2026-05-24 18:05&lt;br&gt;【市预警发布中心】金山区气象台2026年05月24日13时00分发布:预计未来12小时内,本区大部分街镇将发生雷电活动,可能会造成雷电灾害事故,请注意防范。</description>
      <link>https://wx.soweather.com/wxapp/warn.jsp#%E9%87%91%E5%B1%B1%E5%8C%BA-37039-(2026)1163</link>
      <guid isPermaLink="false">金山区-37039-(2026)1163</guid>
      <pubDate>Sun, 24 May 2026 05:00:00 GMT</pubDate>
      <author>金山区气象台</author>
      <enclosure url="https://wx.soweather.com/wxapp/images/icon/hff0736_30.png" type="image/jpeg"></enclosure>
      <category>分区历史预警</category>
      <category>金山区</category>
      <category>雷电黄色</category>
      <category>已解除</category>
    </item>
    <item>
      <title>崇明区气象台发布大风蓝色预警</title>
      <description>【市预警发布中心】崇明区气象台2026年05月24日07时29分发布:预计未来24小时内本区大部分乡镇将出现阵风6-7级,长江口区7-8级的大风,请注意防范大风对高空作业、水陆交通、设施农业等的不利影响。</description>
      <link>https://wx.soweather.com/wxapp/warn.jsp#%E5%B4%87%E6%98%8E%E5%8C%BA-37032-(2026)1156</link>
      <guid isPermaLink="false">崇明区-37032-(2026)1156</guid>
      <pubDate>Sat, 23 May 2026 23:29:00 GMT</pubDate>
      <author>崇明区气象台</author>
      <enclosure url="https://wx.soweather.com/wxapp/images/icon/hff0736_17.png" type="image/jpeg"></enclosure>
      <category>分区预警</category>
      <category>崇明区</category>
      <category>大风蓝色</category>
      <category>生效中</category>
    </item>
    <item>
      <title>【已解除】奉贤区气象台发布雷电黄色预警</title>
      <description>解除时间:2026-05-24 18:03&lt;br&gt;【市预警发布中心】奉贤区气象台2026年05月24日07时02分发布:预计未来12小时内,本区大部地区将发生雷电活动,可能会造成雷电灾害事故,请注意防范。</description>
      <link>https://wx.soweather.com/wxapp/warn.jsp#%E5%A5%89%E8%B4%A4%E5%8C%BA-37031-(2026)1155</link>
      <guid isPermaLink="false">奉贤区-37031-(2026)1155</guid>
      <pubDate>Sat, 23 May 2026 23:02:00 GMT</pubDate>
      <author>奉贤区气象台</author>
      <enclosure url="https://wx.soweather.com/wxapp/images/icon/hff0736_30.png" type="image/jpeg"></enclosure>
      <category>分区历史预警</category>
      <category>奉贤区</category>
      <category>雷电黄色</category>
      <category>已解除</category>
    </item>
    <item>
      <title>【已解除】上海中心气象台发布雷电黄色预警</title>
      <description>解除时间:2026-05-24 18:00&lt;br&gt;【市预警发布中心】上海中心气象台2026年05月24日07时00分发布:预计未来12小时内,全市将发生雷电活动,可能会造成雷电灾害事故,请注意防范。</description>
      <link>https://wx.soweather.com/wxapp/warn.jsp#%E5%85%A8%E5%B8%82-37028-(2026)1151</link>
      <guid isPermaLink="false">全市-37028-(2026)1151</guid>
      <pubDate>Sat, 23 May 2026 23:00:00 GMT</pubDate>
      <author>上海中心气象台</author>
      <enclosure url="https://wx.soweather.com/wxapp/images/icon/hff0736_30.png" type="image/jpeg"></enclosure>
      <category>市级历史预警</category>
      <category>全市</category>
      <category>雷电黄色</category>
      <category>已解除</category>
    </item>
    <item>
      <title>【已解除】崇明区气象台发布雷电黄色预警</title>
      <description>解除时间:2026-05-24 18:03&lt;br&gt;【市预警发布中心】崇明区气象台2026年05月24日07时00分发布:预计未来12小时内本区大部分乡镇将发生雷电活动,可能会造成雷电灾害事故,请注意防范。</description>
      <link>https://wx.soweather.com/wxapp/warn.jsp#%E5%B4%87%E6%98%8E%E5%8C%BA-37030-(2026)1154</link>
      <guid isPermaLink="false">崇明区-37030-(2026)1154</guid>
      <pubDate>Sat, 23 May 2026 23:00:00 GMT</pubDate>
      <author>崇明区气象台</author>
      <enclosure url="https://wx.soweather.com/wxapp/images/icon/hff0736_30.png" type="image/jpeg"></enclosure>
      <category>分区历史预警</category>
      <category>崇明区</category>
      <category>雷电黄色</category>
      <category>已解除</category>
    </item>
    <item>
      <title>【已解除】松江区气象台发布雷电黄色预警</title>
      <description>解除时间:2026-05-24 18:03&lt;br&gt;【市预警发布中心】松江区气象台2026年05月24日04时26分发布:预计今天上午以前,本区大部分街镇将发生雷电活动,可能会造成雷电灾害事故,请注意防范。</description>
      <link>https://wx.soweather.com/wxapp/warn.jsp#%E6%9D%BE%E6%B1%9F%E5%8C%BA-37026-(2026)1150</link>
      <guid isPermaLink="false">松江区-37026-(2026)1150</guid>
      <pubDate>Sat, 23 May 2026 20:26:00 GMT</pubDate>
      <author>松江区气象台</author>
      <enclosure url="https://wx.soweather.com/wxapp/images/icon/hff0736_30.png" type="image/jpeg"></enclosure>
      <category>分区历史预警</category>
      <category>松江区</category>
      <category>雷电黄色</category>
      <category>已解除</category>
    </item>
    <item>
      <title>【已解除】嘉定区气象台发布雷电黄色预警</title>
      <description>解除时间:2026-05-24 18:06&lt;br&gt;【市预警发布中心】嘉定区气象台2026年05月24日02时45分发布:预计今天上午以前,我区大部街镇将发生雷电活动,可能会造成雷电灾害事故,请注意防范。</description>
      <link>https://wx.soweather.com/wxapp/warn.jsp#%E5%98%89%E5%AE%9A%E5%8C%BA-37023-(2026)1147</link>
      <guid isPermaLink="false">嘉定区-37023-(2026)1147</guid>
      <pubDate>Sat, 23 May 2026 18:45:00 GMT</pubDate>
      <author>嘉定区气象台</author>
      <enclosure url="https://wx.soweather.com/wxapp/images/icon/hff0736_30.png" type="image/jpeg"></enclosure>
      <category>分区历史预警</category>
      <category>嘉定区</category>
      <category>雷电黄色</category>
      <category>已解除</category>
    </item>
    <item>
      <title>【已解除】上海中心气象台发布大风蓝色预警</title>
      <description>解除时间:2026-05-18 18:00&lt;br&gt;【市预警发布中心】上海中心气象台2026年05月18日08时50分发布:预计未来24小时内,全市将出现阵风8级或平均风力6级以上的大风,请注意防范大风对高空作业、交通出行、设施农业等的不利影响。</description>
      <link>https://wx.soweather.com/wxapp/warn.jsp#%E5%85%A8%E5%B8%82-36994-(2026)1116</link>
      <guid isPermaLink="false">全市-36994-(2026)1116</guid>
      <pubDate>Mon, 18 May 2026 00:50:00 GMT</pubDate>
      <author>上海中心气象台</author>
      <enclosure url="https://wx.soweather.com/wxapp/images/icon/hff0736_17.png" type="image/jpeg"></enclosure>
      <category>市级历史预警</category>
      <category>全市</category>
      <category>大风蓝色</category>
      <category>已解除</category>
    </item>
    <item>
      <title>【已解除】上海中心气象台发布雷电黄色预警</title>
      <description>解除时间:2026-04-16 20:43&lt;br&gt;【市预警发布中心】上海中心气象台2026年04月16日15时52分发布:预计今天半夜以前,全市将发生雷电活动,可能会造成雷电灾害事故,请注意防范。</description>
      <link>https://wx.soweather.com/wxapp/warn.jsp#%E5%85%A8%E5%B8%82-36873-(2026)995</link>
      <guid isPermaLink="false">全市-36873-(2026)995</guid>
      <pubDate>Thu, 16 Apr 2026 07:52:00 GMT</pubDate>
      <author>上海中心气象台</author>
      <enclosure url="https://wx.soweather.com/wxapp/images/icon/hff0736_30.png" type="image/jpeg"></enclosure>
      <category>市级历史预警</category>
      <category>全市</category>
      <category>雷电黄色</category>
      <category>已解除</category>
    </item>
    <item>
      <title>【已解除】上海中心气象台发布雷电黄色预警</title>
      <description>解除时间:2026-04-10 06:15&lt;br&gt;【市预警发布中心】上海中心气象台2026年04月09日18时45分发布:预计今天半夜以前,全市将发生雷电活动,可能会造成雷电灾害事故,请注意防范。</description>
      <link>https://wx.soweather.com/wxapp/warn.jsp#%E5%85%A8%E5%B8%82-36831-(2026)953</link>
      <guid isPermaLink="false">全市-36831-(2026)953</guid>
      <pubDate>Thu, 09 Apr 2026 10:45:00 GMT</pubDate>
      <author>上海中心气象台</author>
      <enclosure url="https://wx.soweather.com/wxapp/images/icon/hff0736_30.png" type="image/jpeg"></enclosure>
      <category>市级历史预警</category>
      <category>全市</category>
      <category>雷电黄色</category>
      <category>已解除</category>
    </item>
    <item>
      <title>【已解除】上海中心气象台发布大风蓝色预警</title>
      <description>解除时间:2026-04-09 10:20&lt;br&gt;【市预警发布中心】上海中心气象台2026年04月08日15时25分发布:预计未来24小时内,本市陆地最大阵风7-8级,沿江沿海地区8-9级,请注意防范大风对高空作业、交通出行、设施农业等的不利影响。</description>
      <link>https://wx.soweather.com/wxapp/warn.jsp#%E5%85%A8%E5%B8%82-36797-(2026)919</link>
      <guid isPermaLink="false">全市-36797-(2026)919</guid>
      <pubDate>Wed, 08 Apr 2026 07:25:00 GMT</pubDate>
      <author>上海中心气象台</author>
      <enclosure url="https://wx.soweather.com/wxapp/images/icon/hff0736_17.png" type="image/jpeg"></enclosure>
      <category>市级历史预警</category>
      <category>全市</category>
      <category>大风蓝色</category>
      <category>已解除</category>
    </item>
  </channel>
</rss>

@github-actions github-actions Bot added the auto: ready to review Manual review will come in after lint issues and merge conflicts are fixed label May 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto: ready to review Manual review will come in after lint issues and merge conflicts are fixed route

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants