Git Product home page Git Product logo

animereminder's Introduction

Instruction Manual of Ricter Z

Whoami

  • Cat's slave, 猫猫天下第一!
  • A hacker, a programmer and a hentai
  • An independent securirty researcher foucs on large scale softwares

Blog

Games

  • FFXIV
  • World of Warships
  • Majsoul
  • Watch Dogs serial, Nier Automata serial, Far Cry serail, Cyberpunk 2077, osu, ...

animereminder's People

Contributors

madimo avatar ricterz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

animereminder's Issues

首页 404

启动的是 ar-django 分支,syncdb 后打开首页是 404。。。

目前進度以及 API 接口

  • 用戶的訂閱操作

獲取用戶訂閱列表,請求/rest/subscriptions/,得到形如如下的列表。

[
    {
        "anime": 75886, 
        "is_read": false, 
        "currently_read": 0, 
        "group": 1, 
        "id": 5
    }, 
    {
        "anime": 75889, 
        "is_read": false, 
        "currently_read": 0, 
        "group": 1, 
        "id": 6
    }
]

以 DELETE 方式請求/rest/subscription/{id}/將會刪除此訂閱。
以 PUT 方式請求/rest/subscription/{id}/,將會更新訂閱。

{
    "is_read": true,
    "currently_read": 2,
    "group": 1
}

以 POST 方式請求/rest/subscriptions/將會創建訂閱,請求內容如下:

{
    "anime": 75889, //動漫的id
    "is_read": false,  //是否為已讀,默認為false
    "currently_read": 0, //當前已讀集數
    "group": 1 //動漫分組
}
  • 動漫信息獲取

以 GET 方式請求/rest/anime/,得到最近更新的動漫列表,形如:

[
    {
        "aid": 75886,  //aid,動漫的唯一標識id
        "name": "\u6f06\u9ed1\u7684\u5b50\u5f39",  //動漫名稱
        "intro": "....",  //簡介
        "is_end": false,  //是否完結
        "episode": 9,  //集數
        "poster_link": "/1157/c946a9e4a5721537db10c8f51f8b46f2.jpg", //封面 
        "updated_time": "2014-06-04T02:56:20.508Z" //最近更新時間
    }, 
    {
        "aid": 75882, 
        "name": "\u6781\u9ed1\u7684\u5e03\u4f26\u5e0c\u5c14\u7279", 
        "intro": "....", 
        "is_end": false, 
        "episode": 9, 
        "poster_link": "/1115/dc31ed2d76785c1acb589fff515fe3e3.jpg", 
        "updated_time": "2014-06-04T02:56:19.615Z"
    }
]

以 GET 方式請求/rest/anime/{aid}/,會得到動漫的詳細信息,形如:

{
    "aid": 75886, 
    "name": "\u6f06\u9ed1\u7684\u5b50\u5f39", 
    "intro": "....", 
    "is_end": false, 
    "episode": 9, 
    "poster_link": "/1157/c946a9e4a5721537db10c8f51f8b46f2.jpg", 
    "updated_time": "2014-06-04T02:56:20.508Z"
}

B站新番视频列表API

#4 里面提到用 http://api.bilibili.tv/sp 获取视频 season_id 。

我找到另外一个接口
http://api.bilibili.cn/spview?spid={spid}&season_id={season_id}&bangumi=1
直接获取某个spid、season_id对应的番剧列表。

可以免去 http://www.bilibili.tv/sppage/bangumi-{spid}-{season_id}-1.html 处理的一些问题。
或许效果会好一些。

例如《中二病》第二季: http://api.bilibili.cn/spview?spid=5691&season_id=705&bangumi=1

返回的结果是:

{
    "code": 0,
    "count": 12,
    "results": 12,
    "list": {
        "0": {
            "aid": 1029608,
            "cover": "http:\/\/i0.hdslb.com\/u_f\/7037fc28de020747dd7c4c9af0cce27a.jpg",
            "title": "【完结\/1月】 中二病也要谈恋爱!恋 12",
            "click": 197459,
            "page": 0,
            "episode": "12"
        },
        "1": {
            "aid": 1018251,
            "cover": "http:\/\/i2.hdslb.com\/u_f\/e5ffed8d5e0d33a7d64a62bb2e66da20.jpg",
            "title": "【1月】 中二病也要谈恋爱!恋 11",
            "click": 207757,
            "page": 0,
            "episode": "11"
        },
        "2": {
            "aid": 1007311,
            "cover": "http:\/\/i2.hdslb.com\/u_f\/050ed964f7adfe2b6c7525cbfdb91731.jpg",
            "title": "【1月】 中二病也要谈恋爱!恋 10",
            "click": 220755,
            "page": 0,
            "episode": "10"
        },
        "3": {
            "aid": 996261,
            "cover": "http:\/\/i0.hdslb.com\/u_f\/7037fc28de020747dd7c4c9af0cce27a.jpg",
            "title": "【1月】 中二病也要谈恋爱!恋 09",
            "click": 423548,
            "page": 0,
            "episode": "9"
        },
        "4": {
            "aid": 985844,
            "cover": "http:\/\/i0.hdslb.com\/u_f\/7037fc28de020747dd7c4c9af0cce27a.jpg",
            "title": "【1月】 中二病也要谈恋爱!恋 08",
            "click": 512858,
            "page": 0,
            "episode": "8"
        },
        "5": {
            "aid": 974535,
            "cover": "http:\/\/i0.hdslb.com\/u_f\/7037fc28de020747dd7c4c9af0cce27a.jpg",
            "title": "【1月】 中二病也要谈恋爱!恋 07",
            "click": 516988,
            "page": 0,
            "episode": "7"
        },
        "6": {
            "aid": 961162,
            "cover": "http:\/\/i0.hdslb.com\/u_f\/7037fc28de020747dd7c4c9af0cce27a.jpg",
            "title": "【1月】 中二病也要谈恋爱!恋 06",
            "click": 537419,
            "page": 0,
            "episode": "6"
        },
        "7": {
            "aid": 947569,
            "cover": "http:\/\/i0.hdslb.com\/u_f\/7037fc28de020747dd7c4c9af0cce27a.jpg",
            "title": "【1月】 中二病也要谈恋爱!恋 05",
            "click": 589129,
            "page": 0,
            "episode": "5"
        },
        "8": {
            "aid": 936059,
            "cover": "http:\/\/i0.hdslb.com\/u_f\/7037fc28de020747dd7c4c9af0cce27a.jpg",
            "title": "【1月】 中二病也要谈恋爱!恋 04",
            "click": 643093,
            "page": 0,
            "episode": "4"
        },
        "9": {
            "aid": 924075,
            "cover": "http:\/\/i0.hdslb.com\/u_f\/7037fc28de020747dd7c4c9af0cce27a.jpg",
            "title": "【1月】 中二病也要谈恋爱!恋 03",
            "click": 690154,
            "page": 0,
            "episode": "3"
        },
        "10": {
            "aid": 913562,
            "cover": "http:\/\/i0.hdslb.com\/u_f\/7037fc28de020747dd7c4c9af0cce27a.jpg",
            "title": "【1月】 中二病也要谈恋爱!恋 02",
            "click": 722333,
            "page": 0,
            "episode": "2"
        },
        "11": {
            "aid": 903936,
            "cover": "http:\/\/i0.hdslb.com\/u_f\/7037fc28de020747dd7c4c9af0cce27a.jpg",
            "title": "【1月】 中二病也要谈恋爱!恋 01",
            "click": 1047695,
            "page": 0,
            "episode": "1"
        }
    }
}

(特别注意那个API中的第三个参数 bangumi ,这个参数不在官方提供的手册里面,目前只是通过截取数据包可以看到……)

解析B站动漫的方法

记录一下。
http://api.bilibili.tv/sp这个api比较屌,然后可以模糊搜索。比如:
http://api.bilibili.tv/sp?title=野良神http://api.bilibili.tv/sp?title=流浪神差是同一个,很方便。

{
    "spid": 18199,
    "title": "野良神",
    "pubdate": 1385551172,
    "create_at": "2013-11-27 19:19",
    "lastupdate": 1394982326,
    "lastupdate_at": "2014-03-16 23:05",
    "alias": "ノラガミ,流浪神差",
    "cover": "http://i2.hdslb.com/sp/3f/3f8d63d24a843ca3a8c1a2aea4413636.jpg",
    "isbangumi": 1,
    "isbangumi_end": 0,
    "bangumi_date": "2014-01-06",
    "description": "《流浪神差》是由日本漫画家安达渡嘉作画的漫画。 神明的世界,居然也像人类世界一样竞争激烈!没有神社供奉(公司)、缺少香火(资本)的落魄神明夜斗,因为性格缺陷,导致手下的神器(员工)纷纷跳槽。怀抱“受万民景仰”这个伟大梦想的他,只好只身在此岸与彼岸间徘徊,为五块钱的香油钱(五斗米)折腰,接受上至斩妖除魔、下至修东修西的各类委托…… 超贴近现实社会的新神明物语!",
    "view": 617541,
    "favourite": 23508,
    "attention": 8982,
    "count": 29
}

这个是野良神的,因为只有第一季,所以这里没有season这个key。默认调用API地址_应该_就是http://www.bilibili.tv/sppage/bangumi-18199-1.html
参见#3
这个是中二病的。

{
    "spid": 5691,
    "title": "中二病也要谈恋爱!",
    "pubdate": 1344442303,
    "create_at": "2012-08-09 00:11",
    "lastupdate": 1395285123,
    "lastupdate_at": "2014-03-20 11:12",
    "alias": "中二病でも恋がしたい!,中二病でも恋がしたい,中二病也要谈恋爱,中二病也想谈恋爱",
    "cover": "http://i1.hdslb.com/sp/4c/4c07ee742fa570216f3f0b07db9f7a49.jpg",
    "isbangumi": 1,
    "isbangumi_end": 1,
    "bangumi_date": "2012-10-04",
    "description": "2011年12月28日宣布动画化,2012年7月5日动画官网开启,动画预定在2012年秋季放送。",
    "view": 1682429,
    "favourite": 30135,
    "attention": 13445,
    "count": 99,
    "season": {
        "0": {
            "season_id": 91,
            "season_name": "第一季",
            "default": false
        },
        "1": {
            "season_id": 92,
            "season_name": "第一季 Lite",
            "default": false
        },
        "2": {
            "season_id": 705,
            "season_name": "第二季",
            "default": true
        },
        "3": {
            "season_id": 915,
            "season_name": "第二季 Lite",
            "default": false
        }
    }
}

可见这个要指定season id。调用api地址如下:http://www.bilibili.tv/sppage/bangumi-5691-705-1.html
705是当前季数id。
目测后面的-1是第几页的样子。嘛,不过#3的模块获取第一个动漫的集数就是总集数了没必要翻页。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.