RSS订阅挂件无法解析mikanRSS的时间 #377

Open
opened 3 weeks ago by mjft · 4 comments
mjft commented 3 weeks ago

详细描述 / Description

<item>
<guid isPermaLink="false">[Up to 21°C] 夜晚的水母不会游泳 / Yoru no Kurage wa Oyogenai - 01 (Sentai 1920x1080 AVC AAC MKV)</guid>
<link>https://mikanime.tv/Home/Episode/2445d7b67091cd7c9d781d29f3377221c7112cc7</link>
<title>[Up to 21°C] 夜晚的水母不会游泳 / Yoru no Kurage wa Oyogenai - 01 (Sentai 1920x1080 AVC AAC MKV)</title>
<description>[Up to 21°C] 夜晚的水母不会游泳 / Yoru no Kurage wa Oyogenai - 01 (Sentai 1920x1080 AVC AAC MKV)[927.81 MB]</description>
<torrent xmlns="https://mikanime.tv/0.1/">
<link>https://mikanime.tv/Home/Episode/2445d7b67091cd7c9d781d29f3377221c7112cc7</link>
<contentLength>972879296</contentLength>
<pubDate>2024-04-07T00:46:58.557</pubDate>
</torrent>
<enclosure type="application/x-bittorrent" length="972879296" url="https://mikanime.tv/Download/20240407/2445d7b67091cd7c9d781d29f3377221c7112cc7.torrent"/>
</item>

在第二层

## 详细描述 / Description ``` <item> <guid isPermaLink="false">[Up to 21°C] 夜晚的水母不会游泳 / Yoru no Kurage wa Oyogenai - 01 (Sentai 1920x1080 AVC AAC MKV)</guid> <link>https://mikanime.tv/Home/Episode/2445d7b67091cd7c9d781d29f3377221c7112cc7</link> <title>[Up to 21°C] 夜晚的水母不会游泳 / Yoru no Kurage wa Oyogenai - 01 (Sentai 1920x1080 AVC AAC MKV)</title> <description>[Up to 21°C] 夜晚的水母不会游泳 / Yoru no Kurage wa Oyogenai - 01 (Sentai 1920x1080 AVC AAC MKV)[927.81 MB]</description> <torrent xmlns="https://mikanime.tv/0.1/"> <link>https://mikanime.tv/Home/Episode/2445d7b67091cd7c9d781d29f3377221c7112cc7</link> <contentLength>972879296</contentLength> <pubDate>2024-04-07T00:46:58.557</pubDate> </torrent> <enclosure type="application/x-bittorrent" length="972879296" url="https://mikanime.tv/Download/20240407/2445d7b67091cd7c9d781d29f3377221c7112cc7.torrent"/> </item> ``` <pubDate>在第二层
Owner

我想想,mikan 这个 pubDate 是种子的发布时间,我不确定应不应该去曲解非标准 RSS 的发布日期。

我想想,mikan 这个 pubDate 是种子的发布时间,我不确定应不应该去曲解非标准 RSS 的发布日期。
Owner

或者你先尝试联系 admin@mikanani.me 看看他们肯不肯在 item 节点加上发布日期?

或者你先尝试联系 admin@mikanani.me 看看他们肯不肯在 item 节点加上发布日期?
Poster

我想对于item中只有一个pubDate的情况是不存在曲解的,因为在RSS订阅挂件中并没有对时间这一项做描述,仅是按时间排序。

我想对于item中只有一个pubDate的情况是不存在曲解的,因为在RSS订阅挂件中并没有对时间这一项做描述,仅是按时间排序。
Owner

再三考虑,决定还是不要去乱改 RSS 标准。
作为替代,下个版本更新会加入「过滤脚本」功能(玩家自己改)。

附件为「桌面网页挂件扩展」1.2.2 版的补丁,解压到 SAO Utils 2/Packages/com.gpbeta.widget.web 目录覆盖同名文件即可抢先测试此功能。

右键挂件 - RSS 订阅挂件 - Filter Script...
粘贴以下代码,当条目没有提供时间时将读取的种子发布时间:

if (item.date.getTime())
    return true;

const tor = element.getElementsByTagName("torrent")[0];

if (tor) {
    const pub = tor.getElementsByTagName("pubDate")[0];
    if (pub)
        item.date = new Date(pub.firstChild.wholeText);
}

return true;
再三考虑,决定还是不要去乱改 RSS 标准。 作为替代,下个版本更新会加入「过滤脚本」功能(玩家自己改)。 附件为「桌面网页挂件扩展」1.2.2 版的补丁,解压到 `SAO Utils 2/Packages/com.gpbeta.widget.web` 目录覆盖同名文件即可抢先测试此功能。 右键挂件 - RSS 订阅挂件 - Filter Script... 粘贴以下代码,当条目没有提供时间时将读取的种子发布时间: ``` if (item.date.getTime()) return true; const tor = element.getElementsByTagName("torrent")[0]; if (tor) { const pub = tor.getElementsByTagName("pubDate")[0]; if (pub) item.date = new Date(pub.firstChild.wholeText); } return true; ```
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.