{"action":"created","issue":{"url":"https://api.github.com/repos/wxt2005/bangumi-list/issues/4","labels_url":"https://api.github.com/repos/wxt2005/bangumi-list/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/wxt2005/bangumi-list/issues/4/comments","events_url":"https://api.github.com/repos/wxt2005/bangumi-list/issues/4/events","html_url":"https://github.com/wxt2005/bangumi-list/issues/4","id":105026994,"number":4,"title":"关于 B 站放送地址的规范与统一","user":{"login":"weizhenye","id":1879224,"avatar_url":"https://avatars.githubusercontent.com/u/1879224?v=3","gravatar_id":"","url":"https://api.github.com/users/weizhenye","html_url":"https://github.com/weizhenye","followers_url":"https://api.github.com/users/weizhenye/followers","following_url":"https://api.github.com/users/weizhenye/following{/other_user}","gists_url":"https://api.github.com/users/weizhenye/gists{/gist_id}","starred_url":"https://api.github.com/users/weizhenye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weizhenye/subscriptions","organizations_url":"https://api.github.com/users/weizhenye/orgs","repos_url":"https://api.github.com/users/weizhenye/repos","events_url":"https://api.github.com/users/weizhenye/events{/privacy}","received_events_url":"https://api.github.com/users/weizhenye/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-05T13:21:11Z","updated_at":"2015-09-06T10:39:03Z","closed_at":null,"body":"不知道每个季度的放送地址你是手动添加的还是跑程序爬的?\r\n目前 B 站一部番的专辑页面有两种, 以__迷糊餐厅第三季__为例, 一种是 sp 专题页面, 链接形式为 [http://www.bilibili.com/sp/WORKING!!迷糊餐厅#S-1960](http://www.bilibili.com/sp/WORKING!!迷糊餐厅#S-1960), 另一种是 bangumi 番剧页面, 链接形式为 [http://www.bilibili.com/bangumi/WORKING!!迷糊餐厅%20第三季/](http://www.bilibili.com/bangumi/WORKING!!迷糊餐厅%20第三季/). bgmlist 目前的数据绝大多数是 sp 的链接, 且早期的链接中很多都没有 `#S-1960` 这样的 hash 来区分季度, 对于多季度的番剧 B 站的 sp 页面似乎是默认显示最新季度的, 这就造成等这部番有了新一季动画后链接指向就不准确了.  bangumi 番剧的链接应该不会有这种情况, 第几季度直接写在 URL 里了, 就是不知道会不会一部新番一开始链接为 `/bangumi/番剧名称`, 等有二季后一季链接改成 `/bangumi/番剧名称 第一季` 这样, 不过我猜就算改动应该也会做重定向的吧.\r\n事实上有更保险的链接, sp 专题对应 [http://www.bilibili.com/sp/spid/50438#S-1960](http://www.bilibili.com/sp/spid/50438#S-1960), bangumi 番剧对应 [http://www.bilibili.com/bangumi/i/2587/](http://www.bilibili.com/bangumi/i/2587/), 其中前者会自动重定向到含番剧名称的链接. 这两个链接可通过 API 获得: [http://app.bilibili.com/bangumi/avseason/2592280.ver](http://app.bilibili.com/bangumi/avseason/2592280.ver), 其中 `2592280` 为番剧中任意一集的 av 号. 前者直接是 `share_url`, 后者的 ID 为 `season_id`.\r\n我个人建议是将所有链接统一为 `/bangumi/i/:season_id/` 这种形式. 如果可以的话我之后写个程序把之前的全改了. 对于之后的数据如 201510, B 站应该是有[相关 API](http://app.bilibili.com/bangumi/timeline_v2) 来获取整集度的番剧列表的, 用程序来统一链接也方便的, 可能在名称的对应上会有些麻烦."},"comment":{"url":"https://api.github.com/repos/wxt2005/bangumi-list/issues/comments/138065660","html_url":"https://github.com/wxt2005/bangumi-list/issues/4#issuecomment-138065660","issue_url":"https://api.github.com/repos/wxt2005/bangumi-list/issues/4","id":138065660,"user":{"login":"wxt2005","id":3823149,"avatar_url":"https://avatars.githubusercontent.com/u/3823149?v=3","gravatar_id":"","url":"https://api.github.com/users/wxt2005","html_url":"https://github.com/wxt2005","followers_url":"https://api.github.com/users/wxt2005/followers","following_url":"https://api.github.com/users/wxt2005/following{/other_user}","gists_url":"https://api.github.com/users/wxt2005/gists{/gist_id}","starred_url":"https://api.github.com/users/wxt2005/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wxt2005/subscriptions","organizations_url":"https://api.github.com/users/wxt2005/orgs","repos_url":"https://api.github.com/users/wxt2005/repos","events_url":"https://api.github.com/users/wxt2005/events{/privacy}","received_events_url":"https://api.github.com/users/wxt2005/received_events","type":"User","site_admin":false},"created_at":"2015-09-06T10:39:03Z","updated_at":"2015-09-06T10:39:03Z","body":"暂时是手动添加的。\r\n\r\nB 站专题页面的链接变更我之前也注意到了，主要我之前不太确定是否所有过往番组都已有对应新版页面，所以暂时没有作变更，只在新增的时候尽量使用新版页面（番剧页面）。如果能在保证链接有效性的前提下，将 SP 形式的链接格式转换为新版格式，那是再好不过了。\r\n\r\n今年 10 月及之后的番组应该都会使用 `/bangumi/i/:season_id/` 的形式来添加，感谢提供 API 地址。"}}