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(route): xueqiu snb.js #10281

Merged
merged 2 commits into from Jul 30, 2022
Merged

fix(route): xueqiu snb.js #10281

merged 2 commits into from Jul 30, 2022

Conversation

lzq2357
Copy link

@lzq2357 lzq2357 commented Jul 20, 2022

该 PR 相关 Issue / Involved issue

Close #8846

完整路由地址 / Example for the proposed route(s)

/xueqiu/snb/ZH1288184

新 RSS 检查列表 / New RSS Script Checklist

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

说明 / Note

更新snb获取数据的方式和解析数据的正则表达式

@github-actions github-actions bot added the Auto: Route Test Complete Auto route test has finished on given PR label Jul 20, 2022
@github-actions
Copy link
Contributor

Successfully generated as following:

http://localhost:1200/xueqiu/snb/ZH1288184 - Success
<?xml version="1.0" encoding="UTF-8"?>
<rss  xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"
>
    <channel>
        <title><![CDATA[xjbg 的调仓历史]]></title>
        <link>https://xueqiu.com/p/ZH1288184</link>
        <atom:link href="http://localhost:1200/xueqiu/snb/ZH1288184" rel="self" type="application/rss+xml" />
        <description><![CDATA[xjbg 的调仓历史 - 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>Wed, 20 Jul 2022 08:07:54 GMT</lastBuildDate>
        <ttl>5</ttl>
        <item>
            <title><![CDATA[xjbg 的上一笔调仓]]></title>
            <description><![CDATA[京东方A from 21.43 to 27,
]]></description>
            <pubDate>Wed, 06 May 2020 01:31:07 GMT</pubDate>
            <guid isPermaLink="false">xueqiu::snb::ZH1288184::1588728667365</guid>
            <link>https://xueqiu.com/p/ZH1288184</link>
        </item>
    </channel>
</rss>

@github-actions
Copy link
Contributor

Successfully generated as following:

http://localhost:1200/xueqiu/snb/ZH1288184 - Success
<?xml version="1.0" encoding="UTF-8"?>
<rss  xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"
>
    <channel>
        <title><![CDATA[xjbg 的调仓历史]]></title>
        <link>https://xueqiu.com/p/ZH1288184</link>
        <atom:link href="http://localhost:1200/xueqiu/snb/ZH1288184" rel="self" type="application/rss+xml" />
        <description><![CDATA[xjbg 的调仓历史 - 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>Wed, 20 Jul 2022 08:13:11 GMT</lastBuildDate>
        <ttl>5</ttl>
        <item>
            <title><![CDATA[xjbg 的上一笔调仓]]></title>
            <description><![CDATA[京东方A from 21.43 to 27,
]]></description>
            <pubDate>Wed, 06 May 2020 01:31:07 GMT</pubDate>
            <guid isPermaLink="false">xueqiu::snb::ZH1288184::1588728667365</guid>
            <link>https://xueqiu.com/p/ZH1288184</link>
        </item>
    </channel>
</rss>

@@ -8,12 +8,15 @@ module.exports = async (ctx) => {
const response = await got({
method: 'get',
url,
headers: {
"User-Agent": "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.53 Mobile Safari/537.36 Edg/103.0.1264.37"
Copy link
Collaborator

Choose a reason for hiding this comment

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

const UA = require('@/utils/rand-user-agent')({ browser: 'chrome', os: 'android', device: 'mobile' });
Suggested change
"User-Agent": "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.53 Mobile Safari/537.36 Edg/103.0.1264.37"
"User-Agent": UA

@TonyRL TonyRL changed the title fix:snb.js fix(route): xueqiu snb.js Jul 20, 2022
@github-actions github-actions bot added the Route: v2 v2 route related label Jul 30, 2022
@github-actions
Copy link
Contributor

Successfully generated as following:

http://localhost:1200/xueqiu/snb/ZH1288184 - Success
<?xml version="1.0" encoding="UTF-8"?>
<rss  xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"
>
    <channel>
        <title><![CDATA[xjbg 的调仓历史]]></title>
        <link>https://xueqiu.com/p/ZH1288184</link>
        <atom:link href="http://localhost:1200/xueqiu/snb/ZH1288184" rel="self" type="application/rss+xml" />
        <description><![CDATA[xjbg 的调仓历史 - 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>Sat, 30 Jul 2022 20:14:05 GMT</lastBuildDate>
        <ttl>5</ttl>
        <item>
            <title><![CDATA[xjbg 的上一笔调仓]]></title>
            <description><![CDATA[京东方A from 21.43 to 27,
]]></description>
            <pubDate>Wed, 06 May 2020 01:31:07 GMT</pubDate>
            <guid isPermaLink="false">xueqiu::snb::ZH1288184::1588728667365</guid>
            <link>https://xueqiu.com/p/ZH1288184</link>
        </item>
    </channel>
</rss>

@TonyRL TonyRL merged commit 840cfeb into DIYgod:master Jul 30, 2022
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 Route: v2 v2 route related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

雪球组合最新调仓信息无法订阅
2 participants