[TinyXML2]从资源站点的RSS订阅中提取下载链接

发布于:2022-12-12 ⋅ 阅读:(1039) ⋅ 点赞:(0)

在这里插入图片描述

TinyXML-2 是一个简单、小巧、高效的 C++ XML 解析器,可以轻松集成到其他程序中;
程序使用xmake自动构建工具,语法比cmake简单,值得尝试;

前言

​    常见的BT站点通常有提供RSS订阅,能够在qbittorrent等下载工具中使用。这次尝试使用TinyXML2从RSS中提取种子标题和资源链接。

项目代码

样例数据[较长 展开可能会影响阅读](Mikan Project - 莉可丽丝):

<?xml version="1.0" encoding="utf-8"?>				
<rss version="2.0">
    <channel>
        <title>Mikan Project - 莉可丽丝</title>
        <link>http://mikanani.me/RSS/Bangumi?bangumiId=2754&subgroupid=562</link>
        <description>Mikan Project - 莉可丽丝</description>
        <item>
            <guid isPermaLink="false">[NC-Raws] Lycoris Recoil 莉可丽丝 - 11 (Baha 1920x1080 AVC AAC MP4)</guid>
            <link>https://mikanani.me/Home/Episode/2d2ab25e1ec64684e170d25f63b13313e11224ef</link>
            <title>[NC-Raws] Lycoris Recoil 莉可丽丝 - 11 (Baha 1920x1080 AVC AAC MP4)</title>
            <description>[NC-Raws] Lycoris Recoil 莉可丽丝 - 11 (Baha 1920x1080 AVC AAC MP4)[530.24 MB]</description>
            <torrent
                xmlns="https://mikanani.me/0.1/">
                <link>https://mikanani.me/Home/Episode/2d2ab25e1ec64684e170d25f63b13313e11224ef</link>
                <contentLength>555996928</contentLength>
                <pubDate>2022-09-11T00:01:43.346</pubDate>
            </torrent>
            <enclosure type="application/x-bittorrent" length="555996928" url="https://mikanani.me/Download/20220911/2d2ab25e1ec64684e170d25f63b13313e11224ef.torrent"/>
        </item>
        <item>
            <guid isPermaLink="false">[NC-Raws] Lycoris Recoil - 11 (CR 1920x1080 AVC AAC MKV)</guid>
            <link>https://mikanani.me/Home/Episode/3d2aa78d0fda84301ee490e177e32bbcf3b76fc3</link>
            <title>[NC-Raws] Lycoris Recoil - 11 (CR 1920x1080 AVC AAC MKV)</title>
            <description>[NC-Raws] Lycoris Recoil - 11 (CR 1920x1080 AVC AAC MKV)[1.36 GB]</description>
            <torrent
                xmlns="https://mikanani.me/0.1/">
                <link>https://mikanani.me/Home/Episode/3d2aa78d0fda84301ee490e177e32bbcf3b76fc3</link>
                <contentLength>1460288896</contentLength>
                <pubDate>2022-09-11T00:01:19.447</pubDate>
            </torrent>
            <enclosure type="application/x-bittorrent" length="1460288896" url="https://mikanani.me/Download/20220911/3d2aa78d0fda84301ee490e177e32bbcf3b76fc3.torrent"/>
        </item>
        <item>
            <guid isPermaLink="false">[NC-Raws] Lycoris Recoil - 11 (B-Global 3840x2160 HEVC AAC MKV)</guid>
            <link>https://mikanani.me/Home/Episode/6bbbd0ff34e11189a4a00d48eb622aeee452d56d</link>
            <title>[NC-Raws] Lycoris Recoil - 11 (B-Global 3840x2160 HEVC AAC MKV)</title>
            <description>[NC-Raws] Lycoris Recoil - 11 (B-Global 3840x2160 HEVC AAC MKV)[681.25 MB]</description>
            <torrent
                xmlns="https://mikanani.me/0.1/">
                <link>https://mikanani.me/Home/Episode/6bbbd0ff34e11189a4a00d48eb622aeee452d56d</link>
                <contentLength>714342400</contentLength>
                <pubDate>2022-09-11T00:01:12.328</pubDate>
            </torrent>
            <enclosure type="application/x-bittorrent" length="714342400" url="https://mikanani.me/Download/20220911/6bbbd0ff34e11189a4a00d48eb622aeee452d56d.torrent"/>
        </item>
        <item>
            <guid isPermaLink="false">[NC-Raws] Lycoris Recoil - 10 (CR 1920x1080 AVC AAC MKV)</guid>
            <link>https://mikanani.me/Home/Episode/cb442742a2179f78216278f57d8bd2e0edf4ac83</link>
            <title>[NC-Raws] Lycoris Recoil - 10 (CR 1920x1080 AVC AAC MKV)</title>
            <description>[NC-Raws] Lycoris Recoil - 10 (CR 1920x1080 AVC AAC MKV)[1.36 GB]</description>
            <torrent
                xmlns="https://mikanani.me/0.1/">
                <link>https://mikanani.me/Home/Episode/cb442742a2179f78216278f57d8bd2e0edf4ac83</link>
                <contentLength>1460288896</contentLength>
                <pubDate>2022-09-04T00:02:38.568</pubDate>
            </torrent>
            <enclosure type="application/x-bittorrent" length="1460288896" url="https://mikanani.me/Download/20220904/cb442742a2179f78216278f57d8bd2e0edf4ac83.torrent"/>
        </item>
        <item>
            <guid isPermaLink="false">[NC-Raws] Lycoris Recoil - 10 (B-Global 3840x2160 HEVC AAC MKV)</guid>
            <link>https://mikanani.me/Home/Episode/78af368f285c2ed57f15951c4b3a985e1b34f032</link>
            <title>[NC-Raws] Lycoris Recoil - 10 (B-Global 3840x2160 HEVC AAC MKV)</title>
            <description>[NC-Raws] Lycoris Recoil - 10 (B-Global 3840x2160 HEVC AAC MKV)[570.76 MB]</description>
            <torrent
                xmlns="https://mikanani.me/0.1/">
                <link>https://mikanani.me/Home/Episode/78af368f285c2ed57f15951c4b3a985e1b34f032</link>
                <contentLength>598485248</contentLength>
                <pubDate>2022-09-04T00:01:04.492</pubDate>
            </torrent>
            <enclosure type="application/x-bittorrent" length="598485248" url="https://mikanani.me/Download/20220904/78af368f285c2ed57f15951c4b3a985e1b34f032.torrent"/>
        </item>
        <item>
            <guid isPermaLink="false">[NC-Raws] Lycoris Recoil 莉可丽丝 - 10 (Baha 1920x1080 AVC AAC MP4)</guid>
            <link>https://mikanani.me/Home/Episode/b0677967a9baf12a0eabbe43761079772502af08</link>
            <title>[NC-Raws] Lycoris Recoil 莉可丽丝 - 10 (Baha 1920x1080 AVC AAC MP4)</title>
            <description>[NC-Raws] Lycoris Recoil 莉可丽丝 - 10 (Baha 1920x1080 AVC AAC MP4)[372.07 MB]</description>
            <torrent
                xmlns="https://mikanani.me/0.1/">
                <link>https://mikanani.me/Home/Episode/b0677967a9baf12a0eabbe43761079772502af08</link>
                <contentLength>390143680</contentLength>
                <pubDate>2022-09-04T00:00:58.7</pubDate>
            </torrent>
            <enclosure type="application/x-bittorrent" length="390143680" url="https://mikanani.me/Download/20220904/b0677967a9baf12a0eabbe43761079772502af08.torrent"/>
        </item>
        <item>
            <guid isPermaLink="false">[NC-Raws] Lycoris Recoil 莉可丽丝 - 09 (Baha 1920x1080 AVC AAC MP4)</guid>
            <link>https://mikanani.me/Home/Episode/9801b1770e099a19e17b52ddc4237655eab854b9</link>
            <title>[NC-Raws] Lycoris Recoil 莉可丽丝 - 09 (Baha 1920x1080 AVC AAC MP4)</title>
            <description>[NC-Raws] Lycoris Recoil 莉可丽丝 - 09 (Baha 1920x1080 AVC AAC MP4)[361.56 MB]</description>
            <torrent
                xmlns="https://mikanani.me/0.1/">
                <link>https://mikanani.me/Home/Episode/9801b1770e099a19e17b52ddc4237655eab854b9</link>
                <contentLength>379123136</contentLength>
                <pubDate>2022-08-28T00:01:49.278</pubDate>
            </torrent>
            <enclosure type="application/x-bittorrent" length="379123136" url="https://mikanani.me/Download/20220828/9801b1770e099a19e17b52ddc4237655eab854b9.torrent"/>
        </item>
        <item>
            <guid isPermaLink="false">[NC-Raws] Lycoris Recoil - 09 (CR 1920x1080 AVC AAC MKV)</guid>
            <link>https://mikanani.me/Home/Episode/607189055639f04420a490430c7076518f3ff41f</link>
            <title>[NC-Raws] Lycoris Recoil - 09 (CR 1920x1080 AVC AAC MKV)</title>
            <description>[NC-Raws] Lycoris Recoil - 09 (CR 1920x1080 AVC AAC MKV)[1.36 GB]</description>
            <torrent
                xmlns="https://mikanani.me/0.1/">
                <link>https://mikanani.me/Home/Episode/607189055639f04420a490430c7076518f3ff41f</link>
                <contentLength>1460288896</contentLength>
                <pubDate>2022-08-28T00:01:41.732</pubDate>
            </torrent>
            <enclosure type="application/x-bittorrent" length="1460288896" url="https://mikanani.me/Download/20220828/607189055639f04420a490430c7076518f3ff41f.torrent"/>
        </item>
        <item>
            <guid isPermaLink="false">[NC-Raws] Lycoris Recoil - 09 (B-Global 3840x2160 HEVC AAC MKV)</guid>
            <link>https://mikanani.me/Home/Episode/e6da2f9745104ad9cf36855151fe48d34d0f7cb3</link>
            <title>[NC-Raws] Lycoris Recoil - 09 (B-Global 3840x2160 HEVC AAC MKV)</title>
            <description>[NC-Raws] Lycoris Recoil - 09 (B-Global 3840x2160 HEVC AAC MKV)[497.3MB]</description>
            <torrent
                xmlns="https://mikanani.me/0.1/">
                <link>https://mikanani.me/Home/Episode/e6da2f9745104ad9cf36855151fe48d34d0f7cb3</link>
                <contentLength>521456832</contentLength>
                <pubDate>2022-08-28T00:01:00</pubDate>
            </torrent>
            <enclosure type="application/x-bittorrent" length="521456832" url="https://mikanani.me/Download/20220828/e6da2f9745104ad9cf36855151fe48d34d0f7cb3.torrent"/>
        </item>
        <item>
            <guid isPermaLink="false">[NC-Raws] Lycoris Recoil 莉可丽丝 - 08 (Baha 1920x1080 AVC AAC MP4)</guid>
            <link>https://mikanani.me/Home/Episode/d96844c53c9f2637c9d4c4545e3b1fad283a4e64</link>
            <title>[NC-Raws] Lycoris Recoil 莉可丽丝 - 08 (Baha 1920x1080 AVC AAC MP4)</title>
            <description>[NC-Raws] Lycoris Recoil 莉可丽丝 - 08 (Baha 1920x1080 AVC AAC MP4)[354.72 MB]</description>
            <torrent
                xmlns="https://mikanani.me/0.1/">
                <link>https://mikanani.me/Home/Episode/d96844c53c9f2637c9d4c4545e3b1fad283a4e64</link>
                <contentLength>371950880</contentLength>
                <pubDate>2022-08-21T00:01:23.447</pubDate>
            </torrent>
            <enclosure type="application/x-bittorrent" length="371950880" url="https://mikanani.me/Download/20220821/d96844c53c9f2637c9d4c4545e3b1fad283a4e64.torrent"/>
        </item>
        <item>
            <guid isPermaLink="false">[NC-Raws] Lycoris Recoil - 08 (CR 1920x1080 AVC AAC MKV)</guid>
            <link>https://mikanani.me/Home/Episode/b4494fa61ac92ceef647561edf2294b0506b739e</link>
            <title>[NC-Raws] Lycoris Recoil - 08 (CR 1920x1080 AVC AAC MKV)</title>
            <description>[NC-Raws] Lycoris Recoil - 08 (CR 1920x1080 AVC AAC MKV)[1.37 GB]</description>
            <torrent
                xmlns="https://mikanani.me/0.1/">
                <link>https://mikanani.me/Home/Episode/b4494fa61ac92ceef647561edf2294b0506b739e</link>
                <contentLength>1471026304</contentLength>
                <pubDate>2022-08-21T00:01:19.173</pubDate>
            </torrent>
            <enclosure type="application/x-bittorrent" length="1471026304" url="https://mikanani.me/Download/20220821/b4494fa61ac92ceef647561edf2294b0506b739e.torrent"/>
        </item>
        <item>
            <guid isPermaLink="false">[NC-Raws] Lycoris Recoil - 08 (B-Global 3840x2160 HEVC AAC MKV)</guid>
            <link>https://mikanani.me/Home/Episode/7ee701011c62c8bec8ac09be1686bf7cafb40c0e</link>
            <title>[NC-Raws] Lycoris Recoil - 08 (B-Global 3840x2160 HEVC AAC MKV)</title>
            <description>[NC-Raws] Lycoris Recoil - 08 (B-Global 3840x2160 HEVC AAC MKV)[532.33 MB]</description>
            <torrent
                xmlns="https://mikanani.me/0.1/">
                <link>https://mikanani.me/Home/Episode/7ee701011c62c8bec8ac09be1686bf7cafb40c0e</link>
                <contentLength>558188480</contentLength>
                <pubDate>2022-08-21T00:00:57.892</pubDate>
            </torrent>
            <enclosure type="application/x-bittorrent" length="558188480" url="https://mikanani.me/Download/20220821/7ee701011c62c8bec8ac09be1686bf7cafb40c0e.torrent"/>
        </item>
        <item>
            <guid isPermaLink="false">[NC-Raws] Lycoris Recoil - 07 (CR 1920x1080 AVC AAC MKV)</guid>
            <link>https://mikanani.me/Home/Episode/5d3d4eca99033426828edf84b80b3bead2f384b0</link>
            <title>[NC-Raws] Lycoris Recoil - 07 (CR 1920x1080 AVC AAC MKV)</title>
            <description>[NC-Raws] Lycoris Recoil - 07 (CR 1920x1080 AVC AAC MKV)[1.36 GB]</description>
            <torrent
                xmlns="https://mikanani.me/0.1/">
                <link>https://mikanani.me/Home/Episode/5d3d4eca99033426828edf84b80b3bead2f384b0</link>
                <contentLength>1460288896</contentLength>
                <pubDate>2022-08-14T00:03:12.984</pubDate>
            </torrent>
            <enclosure type="application/x-bittorrent" length="1460288896" url="https://mikanani.me/Download/20220814/5d3d4eca99033426828edf84b80b3bead2f384b0.torrent"/>
        </item>
        <item>
            <guid isPermaLink="false">[NC-Raws] Lycoris Recoil 莉可丽丝 - 07 (Baha 1920x1080 AVC AAC MP4)</guid>
            <link>https://mikanani.me/Home/Episode/82dc6cb3f525e75e3dafc685e448aa43330edca3</link>
            <title>[NC-Raws] Lycoris Recoil 莉可丽丝 - 07 (Baha 1920x1080 AVC AAC MP4)</title>
            <description>[NC-Raws] Lycoris Recoil 莉可丽丝 - 07 (Baha 1920x1080 AVC AAC MP4)[404.22 MB]</description>
            <torrent
                xmlns="https://mikanani.me/0.1/">
                <link>https://mikanani.me/Home/Episode/82dc6cb3f525e75e3dafc685e448aa43330edca3</link>
                <contentLength>423855392</contentLength>
                <pubDate>2022-08-14T00:01:17.781</pubDate>
            </torrent>
            <enclosure type="application/x-bittorrent" length="423855392" url="https://mikanani.me/Download/20220814/82dc6cb3f525e75e3dafc685e448aa43330edca3.torrent"/>
        </item>
        <item>
            <guid isPermaLink="false">[NC-Raws] Lycoris Recoil - 07 (B-Global 3840x2160 HEVC AAC MKV)</guid>
            <link>https://mikanani.me/Home/Episode/2e40fecd098f520c49490475144eac73445b9f03</link>
            <title>[NC-Raws] Lycoris Recoil - 07 (B-Global 3840x2160 HEVC AAC MKV)</title>
            <description>[NC-Raws] Lycoris Recoil - 07 (B-Global 3840x2160 HEVC AAC MKV)[578.81 MB]</description>
            <torrent
                xmlns="https://mikanani.me/0.1/">
                <link>https://mikanani.me/Home/Episode/2e40fecd098f520c49490475144eac73445b9f03</link>
                <contentLength>606926272</contentLength>
                <pubDate>2022-08-14T00:00:48.684</pubDate>
            </torrent>
            <enclosure type="application/x-bittorrent" length="606926272" url="https://mikanani.me/Download/20220814/2e40fecd098f520c49490475144eac73445b9f03.torrent"/>
        </item>
        <item>
            <guid isPermaLink="false">[NC-Raws] Lycoris Recoil - 06 (CR 1920x1080 AVC AAC MKV)</guid>
            <link>https://mikanani.me/Home/Episode/8cf155930d1981ec2a46580f34c221475dc4f16e</link>
            <title>[NC-Raws] Lycoris Recoil - 06 (CR 1920x1080 AVC AAC MKV)</title>
            <description>[NC-Raws] Lycoris Recoil - 06 (CR 1920x1080 AVC AAC MKV)[1.36 GB]</description>
            <torrent
                xmlns="https://mikanani.me/0.1/">
                <link>https://mikanani.me/Home/Episode/8cf155930d1981ec2a46580f34c221475dc4f16e</link>
                <contentLength>1460288896</contentLength>
                <pubDate>2022-08-08T21:51:30.361</pubDate>
            </torrent>
            <enclosure type="application/x-bittorrent" length="1460288896" url="https://mikanani.me/Download/20220808/8cf155930d1981ec2a46580f34c221475dc4f16e.torrent"/>
        </item>
        <item>
            <guid isPermaLink="false">[NC-Raws] Lycoris Recoil - 06 (B-Global 3840x2160 HEVC AAC MKV)</guid>
            <link>https://mikanani.me/Home/Episode/f387db059b409f59f6c04d746368eec31d25df45</link>
            <title>[NC-Raws] Lycoris Recoil - 06 (B-Global 3840x2160 HEVC AAC MKV)</title>
            <description>[NC-Raws] Lycoris Recoil - 06 (B-Global 3840x2160 HEVC AAC MKV)[590.27 MB]</description>
            <torrent
                xmlns="https://mikanani.me/0.1/">
                <link>https://mikanani.me/Home/Episode/f387db059b409f59f6c04d746368eec31d25df45</link>
                <contentLength>618942976</contentLength>
                <pubDate>2022-08-07T00:01:20.545</pubDate>
            </torrent>
            <enclosure type="application/x-bittorrent" length="618942976" url="https://mikanani.me/Download/20220807/f387db059b409f59f6c04d746368eec31d25df45.torrent"/>
        </item>
        <item>
            <guid isPermaLink="false">[NC-Raws] Lycoris Recoil 莉可丽丝 - 06 (Baha 1920x1080 AVC AAC MP4)</guid>
            <link>https://mikanani.me/Home/Episode/18ec0f4dff396221b372ab5fb68249c3afcec254</link>
            <title>[NC-Raws] Lycoris Recoil 莉可丽丝 - 06 (Baha 1920x1080 AVC AAC MP4)</title>
            <description>[NC-Raws] Lycoris Recoil 莉可丽丝 - 06 (Baha 1920x1080 AVC AAC MP4)[433.53 MB]</description>
            <torrent
                xmlns="https://mikanani.me/0.1/">
                <link>https://mikanani.me/Home/Episode/18ec0f4dff396221b372ab5fb68249c3afcec254</link>
                <contentLength>454589152</contentLength>
                <pubDate>2022-08-07T00:01:19.967</pubDate>
            </torrent>
            <enclosure type="application/x-bittorrent" length="454589152" url="https://mikanani.me/Download/20220807/18ec0f4dff396221b372ab5fb68249c3afcec254.torrent"/>
        </item>
        <item>
            <guid isPermaLink="false">[NC-Raws] Lycoris Recoil - 06 (CR 1920x1080 AVC AAC MKV)</guid>
            <link>https://mikanani.me/Home/Episode/e9e473877255d5ef94fee5a86949eb4e9a9276a1</link>
            <title>[NC-Raws] Lycoris Recoil - 06 (CR 1920x1080 AVC AAC MKV)</title>
            <description>[NC-Raws] Lycoris Recoil - 06 (CR 1920x1080 AVC AAC MKV)[1.36 GB]</description>
            <torrent
                xmlns="https://mikanani.me/0.1/">
                <link>https://mikanani.me/Home/Episode/e9e473877255d5ef94fee5a86949eb4e9a9276a1</link>
                <contentLength>1460288896</contentLength>
                <pubDate>2022-08-07T00:01:19.818</pubDate>
            </torrent>
            <enclosure type="application/x-bittorrent" length="1460288896" url="https://mikanani.me/Download/20220807/e9e473877255d5ef94fee5a86949eb4e9a9276a1.torrent"/>
        </item>
        <item>
            <guid isPermaLink="false">[NC-Raws] Lycoris Recoil - 05 (CR 1920x1080 AVC AAC MKV)</guid>
            <link>https://mikanani.me/Home/Episode/6b3664d0c6dcca6f6155bd888085232e6f57a36e</link>
            <title>[NC-Raws] Lycoris Recoil - 05 (CR 1920x1080 AVC AAC MKV)</title>
            <description>[NC-Raws] Lycoris Recoil - 05 (CR 1920x1080 AVC AAC MKV)[1.36 GB]</description>
            <torrent
                xmlns="https://mikanani.me/0.1/">
                <link>https://mikanani.me/Home/Episode/6b3664d0c6dcca6f6155bd888085232e6f57a36e</link>
                <contentLength>1460288896</contentLength>
                <pubDate>2022-07-31T00:02:15.36</pubDate>
            </torrent>
            <enclosure type="application/x-bittorrent" length="1460288896" url="https://mikanani.me/Download/20220731/6b3664d0c6dcca6f6155bd888085232e6f57a36e.torrent"/>
        </item>
        <item>
            <guid isPermaLink="false">[NC-Raws] Lycoris Recoil 莉可丽丝 - 05 (Baha 1920x1080 AVC AAC MP4)</guid>
            <link>https://mikanani.me/Home/Episode/fcd58fcd9151727c5cce3aa441ad2b804f063aa9</link>
            <title>[NC-Raws] Lycoris Recoil 莉可丽丝 - 05 (Baha 1920x1080 AVC AAC MP4)</title>
            <description>[NC-Raws] Lycoris Recoil 莉可丽丝 - 05 (Baha 1920x1080 AVC AAC MP4)[435.81 MB]</description>
            <torrent
                xmlns="https://mikanani.me/0.1/">
                <link>https://mikanani.me/Home/Episode/fcd58fcd9151727c5cce3aa441ad2b804f063aa9</link>
                <contentLength>456979904</contentLength>
                <pubDate>2022-07-31T00:02:06.364</pubDate>
            </torrent>
            <enclosure type="application/x-bittorrent" length="456979904" url="https://mikanani.me/Download/20220731/fcd58fcd9151727c5cce3aa441ad2b804f063aa9.torrent"/>
        </item>
        <item>
            <guid isPermaLink="false">[NC-Raws] Lycoris Recoil - 05 (B-Global 3840x2160 HEVC AAC MKV)</guid>
            <link>https://mikanani.me/Home/Episode/d8f33030acad9661dd07001bea6c52af14d928e9</link>
            <title>[NC-Raws] Lycoris Recoil - 05 (B-Global 3840x2160 HEVC AAC MKV)</title>
            <description>[NC-Raws] Lycoris Recoil - 05 (B-Global 3840x2160 HEVC AAC MKV)[637.06 MB]</description>
            <torrent
                xmlns="https://mikanani.me/0.1/">
                <link>https://mikanani.me/Home/Episode/d8f33030acad9661dd07001bea6c52af14d928e9</link>
                <contentLength>668005824</contentLength>
                <pubDate>2022-07-31T00:01:39.113</pubDate>
            </torrent>
            <enclosure type="application/x-bittorrent" length="668005824" url="https://mikanani.me/Download/20220731/d8f33030acad9661dd07001bea6c52af14d928e9.torrent"/>
        </item>
        <item>
            <guid isPermaLink="false">[NC-Raws] Lycoris Recoil - 04 (CR 1920x1080 AVC AAC MKV)</guid>
            <link>https://mikanani.me/Home/Episode/26e677186eebc527fd383845b3608f1126223c42</link>
            <title>[NC-Raws] Lycoris Recoil - 04 (CR 1920x1080 AVC AAC MKV)</title>
            <description>[NC-Raws] Lycoris Recoil - 04 (CR 1920x1080 AVC AAC MKV)[1.36 GB]</description>
            <torrent
                xmlns="https://mikanani.me/0.1/">
                <link>https://mikanani.me/Home/Episode/26e677186eebc527fd383845b3608f1126223c42</link>
                <contentLength>1460288896</contentLength>
                <pubDate>2022-07-24T03:40:20.893</pubDate>
            </torrent>
            <enclosure type="application/x-bittorrent" length="1460288896" url="https://mikanani.me/Download/20220724/26e677186eebc527fd383845b3608f1126223c42.torrent"/>
        </item>
        <item>
            <guid isPermaLink="false">[NC-Raws] Lycoris Recoil - 04 (B-Global 3840x2160 HEVC AAC MKV)</guid>
            <link>https://mikanani.me/Home/Episode/e42abe7b1856d4510097f4a0adcefce565dc7192</link>
            <title>[NC-Raws] Lycoris Recoil - 04 (B-Global 3840x2160 HEVC AAC MKV)</title>
            <description>[NC-Raws] Lycoris Recoil - 04 (B-Global 3840x2160 HEVC AAC MKV)[671.67 MB]</description>
            <torrent
                xmlns="https://mikanani.me/0.1/">
                <link>https://mikanani.me/Home/Episode/e42abe7b1856d4510097f4a0adcefce565dc7192</link>
                <contentLength>704297024</contentLength>
                <pubDate>2022-07-24T00:01:36.269</pubDate>
            </torrent>
            <enclosure type="application/x-bittorrent" length="704297024" url="https://mikanani.me/Download/20220724/e42abe7b1856d4510097f4a0adcefce565dc7192.torrent"/>
        </item>
        <item>
            <guid isPermaLink="false">[NC-Raws] Lycoris Recoil 莉可丽丝 - 04 (Baha 1920x1080 AVC AAC MP4)</guid>
            <link>https://mikanani.me/Home/Episode/52b774f888a7b6bfb96703c335ffdd3bd83b01f8</link>
            <title>[NC-Raws] Lycoris Recoil 莉可丽丝 - 04 (Baha 1920x1080 AVC AAC MP4)</title>
            <description>[NC-Raws] Lycoris Recoil 莉可丽丝 - 04 (Baha 1920x1080 AVC AAC MP4)[444.22 MB]</description>
            <torrent
                xmlns="https://mikanani.me/0.1/">
                <link>https://mikanani.me/Home/Episode/52b774f888a7b6bfb96703c335ffdd3bd83b01f8</link>
                <contentLength>465798432</contentLength>
                <pubDate>2022-07-24T00:01:01.731</pubDate>
            </torrent>
            <enclosure type="application/x-bittorrent" length="465798432" url="https://mikanani.me/Download/20220724/52b774f888a7b6bfb96703c335ffdd3bd83b01f8.torrent"/>
        </item>
        <item>
            <guid isPermaLink="false">[NC-Raws] Lycoris Recoil 莉可丽丝 - 03 (Baha 1920x1080 AVC AAC MP4)</guid>
            <link>https://mikanani.me/Home/Episode/99f8c2c9875faae220eec03745584b7222585d58</link>
            <title>[NC-Raws] Lycoris Recoil 莉可丽丝 - 03 (Baha 1920x1080 AVC AAC MP4)</title>
            <description>[NC-Raws] Lycoris Recoil 莉可丽丝 - 03 (Baha 1920x1080 AVC AAC MP4)[430.13 MB]</description>
            <torrent
                xmlns="https://mikanani.me/0.1/">
                <link>https://mikanani.me/Home/Episode/99f8c2c9875faae220eec03745584b7222585d58</link>
                <contentLength>451024000</contentLength>
                <pubDate>2022-07-17T00:02:23.076</pubDate>
            </torrent>
            <enclosure type="application/x-bittorrent" length="451024000" url="https://mikanani.me/Download/20220717/99f8c2c9875faae220eec03745584b7222585d58.torrent"/>
        </item>
        <item>
            <guid isPermaLink="false">[NC-Raws] Lycoris Recoil - 03 (B-Global 3840x2160 HEVC AAC MKV)</guid>
            <link>https://mikanani.me/Home/Episode/8329f417e99b42d6757a1ad7ef13a11d36f41862</link>
            <title>[NC-Raws] Lycoris Recoil - 03 (B-Global 3840x2160 HEVC AAC MKV)</title>
            <description>[NC-Raws] Lycoris Recoil - 03 (B-Global 3840x2160 HEVC AAC MKV)[591.43 MB]</description>
            <torrent
                xmlns="https://mikanani.me/0.1/">
                <link>https://mikanani.me/Home/Episode/8329f417e99b42d6757a1ad7ef13a11d36f41862</link>
                <contentLength>620159296</contentLength>
                <pubDate>2022-07-17T00:01:05.684</pubDate>
            </torrent>
            <enclosure type="application/x-bittorrent" length="620159296" url="https://mikanani.me/Download/20220717/8329f417e99b42d6757a1ad7ef13a11d36f41862.torrent"/>
        </item>
        <item>
            <guid isPermaLink="false">[NC-Raws] Lycoris Recoil - 02 (B-Global 3840x2160 HEVC AAC MKV)</guid>
            <link>https://mikanani.me/Home/Episode/cf01b62d1fd656a26c6d0312ce12f11a49d0654b</link>
            <title>[NC-Raws] Lycoris Recoil - 02 (B-Global 3840x2160 HEVC AAC MKV)</title>
            <description>[NC-Raws] Lycoris Recoil - 02 (B-Global 3840x2160 HEVC AAC MKV)[680.46 MB]</description>
            <torrent
                xmlns="https://mikanani.me/0.1/">
                <link>https://mikanani.me/Home/Episode/cf01b62d1fd656a26c6d0312ce12f11a49d0654b</link>
                <contentLength>713514048</contentLength>
                <pubDate>2022-07-10T00:01:21.804</pubDate>
            </torrent>
            <enclosure type="application/x-bittorrent" length="713514048" url="https://mikanani.me/Download/20220710/cf01b62d1fd656a26c6d0312ce12f11a49d0654b.torrent"/>
        </item>
        <item>
            <guid isPermaLink="false">[NC-Raws] Lycoris Recoil 莉可丽丝 - 02 (Baha 1920x1080 AVC AAC MP4)</guid>
            <link>https://mikanani.me/Home/Episode/eb5a3d8b84a90a833f0aea86fa07393f848d80ab</link>
            <title>[NC-Raws] Lycoris Recoil 莉可丽丝 - 02 (Baha 1920x1080 AVC AAC MP4)</title>
            <description>[NC-Raws] Lycoris Recoil 莉可丽丝 - 02 (Baha 1920x1080 AVC AAC MP4)[441.07 MB]</description>
            <torrent
                xmlns="https://mikanani.me/0.1/">
                <link>https://mikanani.me/Home/Episode/eb5a3d8b84a90a833f0aea86fa07393f848d80ab</link>
                <contentLength>462495424</contentLength>
                <pubDate>2022-07-10T00:00:56.304</pubDate>
            </torrent>
            <enclosure type="application/x-bittorrent" length="462495424" url="https://mikanani.me/Download/20220710/eb5a3d8b84a90a833f0aea86fa07393f848d80ab.torrent"/>
        </item>
        <item>
            <guid isPermaLink="false">[NC-Raws] Lycoris Recoil 莉可丽丝 / Lycoris Recoil - 01 (Baha 1920x1080 AVC AAC MP4)</guid>
            <link>https://mikanani.me/Home/Episode/d384dac23f18628dfaa82f5258f675bad95799bb</link>
            <title>[NC-Raws] Lycoris Recoil 莉可丽丝 / Lycoris Recoil - 01 (Baha 1920x1080 AVC AAC MP4)</title>
            <description>[NC-Raws] Lycoris Recoil 莉可丽丝 / Lycoris Recoil - 01 (Baha 1920x1080 AVC AAC MP4)[388.66 MB]</description>
            <torrent
                xmlns="https://mikanani.me/0.1/">
                <link>https://mikanani.me/Home/Episode/d384dac23f18628dfaa82f5258f675bad95799bb</link>
                <contentLength>407539552</contentLength>
                <pubDate>2022-07-03T00:01:45.783</pubDate>
            </torrent>
            <enclosure type="application/x-bittorrent" length="407539552" url="https://mikanani.me/Download/20220703/d384dac23f18628dfaa82f5258f675bad95799bb.torrent"/>
        </item>
        <item>
            <guid isPermaLink="false">[NC-Raws] Lycoris Recoil / Lycoris Recoil - 01 (B-Global 3840x2160 HEVC AAC MKV)</guid>
            <link>https://mikanani.me/Home/Episode/a8bcfcc7f164f3ff22d845915d05d2379e821399</link>
            <title>[NC-Raws] Lycoris Recoil / Lycoris Recoil - 01 (B-Global 3840x2160 HEVC AAC MKV)</title>
            <description>[NC-Raws] Lycoris Recoil / Lycoris Recoil - 01 (B-Global 3840x2160 HEVC AAC MKV)[586.86 MB]</description>
            <torrent
                xmlns="https://mikanani.me/0.1/">
                <link>https://mikanani.me/Home/Episode/a8bcfcc7f164f3ff22d845915d05d2379e821399</link>
                <contentLength>615367296</contentLength>
                <pubDate>2022-07-03T00:01:04.634</pubDate>
            </torrent>
            <enclosure type="application/x-bittorrent" length="615367296" url="https://mikanani.me/Download/20220703/a8bcfcc7f164f3ff22d845915d05d2379e821399.torrent"/>
        </item>
    </channel>
</rss>

提取结果[RssAnalyser]:

在这里插入图片描述

一、相关知识

​    这里简单说明接下来会涉及到XML和RSS的内容。
    引用菜鸟教程RSS语法的示例代码,从第一行开始:

<?xml version="1.0" encoding="UTF-8" ?>			
<rss version="2.0">	                                

<channel>                                               
  <title>菜鸟教程首页</title>	                        
  <link>http://www.runoob.com</link>                    
  <description>免费编程教程</description>                
  <item>                                                
    <title>RSS 教程</title>							
    <link>http://www.runoob.com/rss</link>			 
    <description>菜鸟教程 Rss 教程</description>		  
  </item>
  <item>
    <title>XML 教程</title>
    <link>http://www.runoob.com/xml</link>
    <description>菜鸟教程 XML 教程</description>
  </item>
</channel>

</rss>

1、RSS 语法

RSS 语法
文档中的第一行:XML 声明 - 定义了文档中使用的 XML 版本和字符编码。此例子遵守 1.0 规范,并使用 UTF-8 字符集(可支持中文)。
下一行含有 < channel> 元素。此元素用于描述 RSS feed。
 
< channel > 元素有三个必需的子元素:
 
< title > - 定义频道的标题。(比如 菜鸟教程首页)
< link > - 定义到达频道的超链接。(比如 www.runoob.com)
< description > - 描述此频道(比如 免费编程教程)
每个 < channel > 元素可拥有一个或多个 < item > 元素。
 
每个 < item > 元素可定义 RSS feed 中的一篇文章或 “story”。
 
< item > 元素拥有三个必需的子元素:
 
< title > - 定义项目的标题。(比如 RSS 教程)
< link > - 定义到达项目的超链接。(比如 http://www.runoob.com/rss)
< description > - 描述此项目(比如 菜鸟教程 Rss 教程)
最后,后面的两行关闭 < channel > 和 < rss > 元素。

    一份RSS文档至少具备以下内容:

<?xml version="1.0" encoding="UTF-8" ?>			<!-- XML 声明 -->
<rss version="2.0">	                            <!-- RSS 声明(XML根元素) -->

<channel>                             <!-- channel元素 -->
  <title>...</title>	              <!-- title(必须):定义频道的标题 -->
  <link>...</link>                    <!-- link(必须):定义到达频道的超链接 -->
  <description>...</description>      <!-- description(必须):描述此频道 -->
  <item>                              <!-- item元素 一个channel通常有一或多个该元素 -->
    <title>...</title>							
    <link>...</link>			 
    <description>.../description>		  
  </item>
  <item>
	...
  </item>
</channel>

</rss>								  <!-- 所有的元素必须拥有关闭标签 -->

2、XML 声明

XML 声明
XML 声明文件的可选部分,如果存在需要放在文档的第一行,如下所示:

<?xml version="1.0" encoding="utf-8"?>

以上实例包含 XML 版本UTF-8 也是 HTML5, CSS, JavaScript, PHP, 和 SQL 的默认编码。

​    RSS(2.0)的本质还是XML文档,样例与描述中一样,TinyXML2能够正确处理UTF-8编码,通常情况下不需要额外进行处理;

3、XML 文档必须有根元素(RootElement)

XML 文档必须有根元素
XML 必须包含根元素,它是所有其他元素的父元素,比如以下实例中 root 就是根元素:

<root>
 <child>
   <subchild>.....</subchild>
 </child>
</root>

3.1 RSS 声明

    观察一下样例文档,在XML声明后一行的内容:

<?xml version="1.0" encoding="UTF-8" ?>			<!-- XML 声明 -->
<rss version="2.0">	                                <!-- RSS 声明 -->
...
</rss>												<!-- RSS 元素结尾 -->

    RSS声明是其实是XML元素,同时也是文档中的根元素,接下来解释什么是XML的元素、属性;

4、XML 元素(Element)

什么是 XML 元素?
XML 元素指的是从(且包括)开始标签直到(且包括)结束标签的部分。
一个元素可以包含:其他元素、文本、属性、或混合以上所有…

    开始与结束标签在样例中有两种写法。
    常见的元素由两对尖括号组成,以斜杠开头的是结束标签。enclosure是一个特殊的元素,存放媒体文件信息,由一对尖括号组成并以斜杠结尾。
     下面的代码块中XML元素是红色的 ,文本(Text)是黑色的;

<!-- 样例1(常见) -->
<title>菜鸟教程首页</title>
<!-- 样例2(enclosure 元素) -->
<enclosure type="application/x-bittorrent" length="615367296" url="https://mikanani.me/Download/20220703/a8bcfcc7f164f3ff22d845915d05d2379e821399.torrent"/>

    一个元素中可以包括其他元素,例如这个item元素中还包含title、link、description等三个元素:

  <item>
    <title>XML 教程</title>
    <link>http://www.runoob.com/xml</link>
    <description>菜鸟教程 XML 教程</description>
  </item>

4.1 XML 属性(Attribute)

    属性是一段特殊的文本,必须带有引号。
    以先前的enclosure元素为例,它具有type、length、url三个元素。
    代码块中XML属性是屎黄色的 (懒得找色号) ,绿色的是属性的内容:

<enclosure type="application/x-bittorrent" length="615367296" url="https://mikanani.me/Download/20220703/a8bcfcc7f164f3ff22d845915d05d2379e821399.torrent"/>

二、使用TinyXML2提取信息

1、需要提取的内容

    截取部分样例:

<?xml version="1.0" encoding="utf-8"?>				
<rss version="2.0">
    <channel>
        <title>Mikan Project - 莉可丽丝</title>
        <link>http://mikanani.me/RSS/Bangumi?bangumiId=2754&subgroupid=562</link>
        <description>Mikan Project - 莉可丽丝</description>
        <item>
            <guid isPermaLink="false">[NC-Raws] Lycoris Recoil 莉可丽丝 - 11 (Baha 1920x1080 AVC AAC MP4)</guid>
            <link>https://mikanani.me/Home/Episode/2d2ab25e1ec64684e170d25f63b13313e11224ef</link>
            <title>[NC-Raws] Lycoris Recoil 莉可丽丝 - 11 (Baha 1920x1080 AVC AAC MP4)</title>
            <description>[NC-Raws] Lycoris Recoil 莉可丽丝 - 11 (Baha 1920x1080 AVC AAC MP4)[530.24 MB]</description>
            <torrent
                xmlns="https://mikanani.me/0.1/">
                <link>https://mikanani.me/Home/Episode/2d2ab25e1ec64684e170d25f63b13313e11224ef</link>
                <contentLength>555996928</contentLength>
                <pubDate>2022-09-11T00:01:43.346</pubDate>
            </torrent>
            <enclosure type="application/x-bittorrent" length="555996928" url="https://mikanani.me/Download/20220911/2d2ab25e1ec64684e170d25f63b13313e11224ef.torrent"/>
        </item>
    </channel>
</rss>

需要提取
channel元素下:
  title 元素的 文本内容;
  link 元素的 文本内容;

  所有item元素下:
    title 元素的 文本内容;
    enclosure 元素中
      type 属性的 文本内容;
      url    属性的 文本内容;

1.1 存储结构

    在明确需要获取的信息后,设计两个结构体来存放信息;

/*在C++11中using与typedef均可用于设置别名*/
/*存储RSS的Item元素信息*/
using EleItem = struct {
    std::string title;
    std::string enclosureUrl;
    std::string enclosureType;
};

/*存储RSS的channel元素信息*/
using EleChannel = struct {
    std::string title;
    std::string link;
    std::vector<EleItem> vecItem;
};

2、导入TinyXML2

    使用TinyXML2只要导入两个文件[tinyxml2.h、tinyxml2.cpp]。xmltest.cpp包含了样例代码可以作为参考;
在这里插入图片描述

2.1 直接添加文件(xmake)

    以项目中的xmake构建脚本为例,LibRssAnalyser是项目中的静态工具类。

方法1:添加为项目文件

add_includedirs( )将导入项目/src/include路径下所有的头文件[将tinyxml2.h复制到include目录下];
add_files( )添加需要进行构建的资源文件[将tinyxml2.cpp复制到src目录下]

-- 导入头文件
add_includedirs("/src/include")
-- 静态库(LibRssAnalyser)
target("LibRssAnalyser")
	set_kind("static")
	add_files("src/LibRssAnalyser.cpp")
	add_files("src/tinyxml2.cpp")

方法2:将TinyXML2构建成静态库

    可以先将TinyXML2构建成库,并给LibRssAnalyser添加依赖,此处提供静态库样例;
1、将tinyxml2-master文件夹直接扔到项目路径下
2、对先前的构建脚本进行修改

-- 导入头文件
add_includedirs("/src/include")
add_includedirs("/tinyxml2-master")
-- 静态库(LibRssAnalyser)
target("LibRssAnalyser")
	set_kind("static")
	add_files("src/LibRssAnalyser.cpp")
	add_deps("TinyXML2")
-- 静态库(TinyXML2)
target("TinyXML2")
	set_kind("static")
	add_files("tinyxml2-master/tinyxml2.cpp") --不要使用"tinyxml2-master/*.c" 会将xmltest.cpp导入

2.2 使用依赖包管理(xmake)

方法3:使用依赖包管理

    除了直接添加文件外,xmake带有包管理器,如果仓库中有则会自动下载。项目中使用的便是该方法;

--外部依赖 --
--使用镜像加速依赖包的下载
function mirror(url)
    return url:gsub("github.com", "hub.fastgit.org")
end
--tinyxml2 | https://github.com/leethomason/tinyxml2 |解析xml|Zlib license
add_requires("tinyxml2")

-- 导入头文件
add_includedirs("/src/include")
-- 静态库(LibRssAnalyser)
target("LibRssAnalyser")
	set_kind("static")
	add_files("src/LibRssAnalyser.cpp")
	add_packages("tinyxml2")

默认,没设置版本号,xmake 会选取最近版本的包,等价于 add_requires(“tinyxml2 latest”)

3、使用TinyXML2

    使用TinyXML2需要引入头文件,为了方便测试在资源文件中导入tinyxml2和、std命名空间。样例程序Tinyxml2Demo仅将结果输出至命令窗口;
原始资源文件rssanalyser.cpp:

#include "librssanalyser.h"

using namespace tinyxml2;	//TinyXML2的命名空间
using namespace std;

int main()
{
    return 0;
}

头文件librssanalyser.h相关内容:

#ifndef LIBRSSANALYSER_H
#define LIBRSSANALYSER_H

#include <string>
#include <memory>
#include <vector>
#include <iostream>
#include <fstream>
#include <tinyxml2.h>	//TinyXML2的头文件

/*存储RSS的Item元素信息*/
using EleItem = struct {
    std::string title;
    std::string enclosureUrl;
    std::string enclosureType;
};

/*存储RSS的channel元素信息*/
using EleChannel = struct {
    std::string title;
    std::string link;
    std::vector<EleItem> vecItem;
};

/*命名空间的内容演示程序不需要,所以没发出来*/
#endif

3.1 打开RSS文档

    首先接触到的TinyXML2的类XMLDocument,这个类提供了**LoadFile( )**方法用来从文件中获取XML文档;
    这个方法允许传入两种类型的参数:
在这里插入图片描述
在这里插入图片描述
    这里选择传入文件名的方法,将要打开的文件mikan.rss的文件名传入 ;
XML_SUCCESS是TinyXML2在枚举enum XMLError中定义的返回值,对应数值为0

int main()
{
    const char *const DOC_FILE = "mikan.rss";	//文件名mikan.rss
    XMLDocument doc;
	
    if(doc.LoadFile(DOC_FILE) == XML_SUCCESS)
        cout << "Open File Succeed!" << endl;

    return 0;
}

    将构建后的程序复制到对应目录下运行,第一步完成;
在这里插入图片描述

3.2 获得文档中的根元素(RootElement)

    打开文件对XMLDocument使用 RootElement( ) 方法得到根元素;
在这里插入图片描述
    XMLElement 是接触到的第二个类,这里先不过多讲解,修改程序获得根元素:

int main()
{
    const char *const DOC_FILE = "mikan.rss";
    XMLDocument doc;
    const XMLElement * rootEle;             //一个XML文档只有一个根节点

    if(doc.LoadFile(DOC_FILE) == XML_SUCCESS) {
        cout << "Open File Succeed!" << endl;
        /*获取XML根节点*/
        rootEle = doc.RootElement();		//有获得空指针的风险
        if(rootEle != nullptr)              //正常的XML文档会有根节点,注意C++11中NULL和nullptr不同
            cout << "Get RootElement Succeed!" << endl;
    }
    return 0;
}

测试:
在这里插入图片描述

3.3 从channel元素中获取文本信息

    继续修改程序,获取当前元素之后的元素使用FirstChildElement( ) 方法;
在这里插入图片描述
传入的参数是字符串类型元素的名称(“channel”),返回channel元素的指针:

/*越来越长了*/
int main()
{
    const char *const DOC_FILE = "mikan.rss";//文件名mikan.rss
    XMLDocument doc;
    const XMLElement * rootEle;             //一个XML文档只有一个根节点
	const XMLElement * channelEle;

    if(doc.LoadFile(DOC_FILE) == XML_SUCCESS) {
        cout << "Open File Succeed!" << endl;
        /*获取XML根节点*/
        rootEle = doc.RootElement();        //有获得空指针的风险
        if(rootEle != nullptr) {            //正常的XML文档会有根节点,注意C++11中NULL和nullptr不同
            cout << "Get RootElement Succeed!" << endl;

            /*查找<channel元素>,假定只有一个*/
            channelEle = rootEle->FirstChildElement("channel");
            if(channelEle != nullptr){
                cout << "Get ChannelElement Succeed!" << endl;
                /*从channel中获取title*/
                tempEle = channelEle->FirstChildElement("title");
                if(tempEle != nullptr)
                    cout <<"Channel Title:" << tempEle->GetText() <<endl;
                /*从channel中获取link*/
                tempEle = channelEle->FirstChildElement("link");
                if(tempEle != nullptr)
                    cout <<"Channel Link:" << tempEle->GetText() <<endl;
            }

        }
    }
    return 0;
}

    对一个XMLElement使用GetText() 方法能够获得这个元素的文本

<title>Mikan Project - 莉可丽丝</title>
<link>http://mikanani.me/RSS/Bangumi?bangumiId=2754&subgroupid=562</link>

执行效果:
在这里插入图片描述

3.4 遍历item元素获得属性(Attribute)

    与提取文本信息类似,对XMLElement对象使用Attribute( ) 方法可以获得属性内容;

            /*循环遍历<item元素>*/
            itemEle = channelEle->FirstChildElement("item");
            while(itemEle != nullptr){
                cout <<endl;
                /*获取item元素的title,和上面一样*/
                tempEle = itemEle->FirstChildElement("title");
                if(tempEle != nullptr)
                    cout <<"Item Title:" << tempEle->GetText() <<endl;
                /*获取enclosure元素的url和type属性*/
                tempEle = itemEle->FirstChildElement("enclosure");
                if(tempEle != nullptr ) {
                    if(tempEle ->Attribute("url") != nullptr)
                        cout << "Item enclosure url:" << tempEle->Attribute("url") << endl;
                    if(tempEle ->Attribute("type") != nullptr)
                        cout << "Item enclosure type:" << tempEle->Attribute("type") << endl;
                }

                itemEle = itemEle->NextSiblingElement();//查找下一个item
            }

3.5测试

    由于输出格式为UTF-8编码,需要先输入chcp65001否则可能为乱码;
在这里插入图片描述


网站公告

今日签到

点亮在社区的每一天
去签到