Skip to content

Instantly share code, notes, and snippets.

@esterTion
Last active October 19, 2023 09:02
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save esterTion/3c0020edf678785766c710283f56e690 to your computer and use it in GitHub Desktop.
Save esterTion/3c0020edf678785766c710283f56e690 to your computer and use it in GitHub Desktop.
b站新动态 api

API:
new https://app.bilibili.com/x/feed/external/dynamic/new
history https://app.bilibili.com/x/feed/external/dynamic/history

Query parameters:

access_key=xxxxxx
actionKey=appkey
appkey=27eb53fc9058f8c3
build=6090
device=phone
mobi_app=iphone
platform=ios
sign=d30bfb128af70506c0a77fbed8ef4317
ts=1506487037
type=268435455 (0xffffff)
uid=5282663
offset_dynamic_id(?)=32098270583257859

动态type:
加载可指定0xffffff(全部),8,32
1 转发
2 消息(有图片)
4 消息(无图片)
8 视频投稿
16 小视频(含playurl地址)
32 番剧更新
64 专栏
256 音频
512 番剧更新(含详细信息)

用例数据(card):
type1

{
	"user": {
		"uid": 4132025,
		"uname": "叉叉xxlonge",
		"face": "http://i1.hdslb.com/bfs/face/86e317c9ef8e80bd9f9940397338e506bef16b78.jpg"
	},
	"item": {
		"rp_id": 32842167509664772,
		"uid": 4132025,
		"content": "转发动态",
		"orig_dy_id": 32797401065850584,
		"pre_dy_id": 32797401065850584,
		"timestamp": 1506485063,
		"reply": 0,
		"orig_type": 2,
		"dynamic_id": 32842167508932680
	},
	"origin": "{ \"item\": { \"id\": 302766, \"title\": \"\", \"description\": \"月色真美box都发售了,可是飞狗在油管上把全部集数都无料放出了呀……\\n\\n个人认为是4月最好看的良心作品,安利安利\", \"category\": \"daily\", \"role\": [ ], \"source\": [ ], \"pictures\": [ { \"img_src\": \"http:\\/\\/i0.hdslb.com\\/bfs\\/vc\\/9d2103e30c5c6ef487c16b0914a2fa01f60b5969.jpg\", \"img_width\": 1080, \"img_height\": 581, \"img_size\": 126 } ], \"pictures_count\": 1, \"upload_time\": 1506474639, \"at_control\": \"\", \"reply\": 0 }, \"user\": { \"uid\": 5662973, \"head_url\": \"http:\\/\\/i1.hdslb.com\\/bfs\\/face\\/d77e1aa4d4e2a6db256362a28a27e5dacf9db0b0.jpg\", \"name\": \"私は吃蛋挞を愛してる\" } }"
}

type2

{
	"item": {
		"id": 303262,
		"title": "",
		"description": "自己家的粉丝群,唯一指定,规矩很多,极度排外,经常开车,慎入,群号码:622096909",
		"category": "daily",
		"role": [],
		"source": [],
		"pictures": [
			{
				"img_src": "http://i0.hdslb.com/bfs/vc/27f94a0462b187e6d01dcaddde534008382dd9a6.jpg",
				"img_width": 720,
				"img_height": 613,
				"img_size": 298
			}
		],
		"pictures_count": 1,
		"upload_time": 1506481485,
		"at_control": "",
		"reply": 45
	},
	"user": {
		"uid": 16450,
		"head_url": "http://i0.hdslb.com/bfs/face/a2824f0c5e5ead28a7fd89cce53f030933da9017.jpg",
		"name": "神威鬼鸣"
	}
}

type4

{
	"user": {
		"uid": 16450,
		"uname": "神威鬼鸣",
		"face": "http://i0.hdslb.com/bfs/face/a2824f0c5e5ead28a7fd89cce53f030933da9017.jpg"
	},
	"item": {
		"rp_id": 32608229229934760,
		"uid": 16450,
		"content": "wryyyyyyyyyyyyyyy",
		"orig_dy_id": 0,
		"pre_dy_id": 0,
		"timestamp": 1506430595,
		"reply": 213,
		"dynamic_id": 32608229232332944
	}
}

type8

{
	"aid": 14834724,
	"videos": 1,
	"tid": 172,
	"tname": "手机游戏",
	"copyright": 1,
	"pic": "http://i0.hdslb.com/bfs/archive/0f03f01c85f695d68ca45223b3fe72c960cd14b9.jpg",
	"title": "阴阳师周年庆500抽",
	"pubdate": 1506483938,
	"ctime": 1506483940,
	"desc": "阴阳师周年庆,首个ssr未收录,前3个ssr概率3倍,一共500抽11ssr",
	"state": 0,
	"attribute": 49152,
	"duration": 4086,
	"rights": {
		"bp": 0,
		"elec": 0,
		"download": 0,
		"movie": 0,
		"pay": 0,
		"hd5": 0,
		"no_reprint": 0
	},
	"owner": {
		"mid": 2859372,
		"name": "名作之壁吧",
		"face": "http://i2.hdslb.com/bfs/face/dd4dd291d3e099038faa94408de06f3c8121ea46.jpg"
	},
	"stat": {
		"aid": 14834724,
		"view": 5802,
		"danmaku": 214,
		"reply": 201,
		"favorite": 35,
		"coin": 76,
		"share": 29,
		"now_rank": 0,
		"his_rank": 0,
		"like": 6
	}
}

type 16

{
	"user": {
		"uid": "168598",
		"head_url": "http://i2.hdslb.com/bfs/face/d0dad8800774a4903547b1326d1fd927df47b4e9.jpg",
		"is_vip": 0,
		"name": "逍遥散人"
	},
	"item": {
		"id": 734340,
		"cover": {
			"default": "http://i0.hdslb.com/bfs/vc/7b13a3664196f74ff9b33204604f71681bdc6bf3.jpg@500w.jpg"
		},
		"tags": [
			"美食"
		],
		"description": "美食寻觅之杭州行",
		"video_time": 219,
		"upload_time_text": "5小时前",
		"upload_time": "2017-09-27 08:44:16",
		"at_control": "",
		"video_playurl": "http://upos-hz-mirrorwcs.acgvideo.com/dspxcode/g170927116ht6pt1ri5l0p176d4qpjw8.mp4?um_deadline=1506503407&rate=500000&oi=2130706433&um_sign=fc698e31075af293012b1491a9561614&gen=dsp&wsTime=1506503407",
		"vdieo_size": "27030957",
		"verify_status": "1",
		"verify_status_text": "审核通过",
		"reply": 357,
		"width": 404,
		"height": 720
	}
}

type 32

{
	"bgm_type": 1,
	"cover": "http://i0.hdslb.com/bfs/bangumi/5190b555298eb99c7d7f62eb2ca3891389bd00f8.jpg",
	"is_finish": 1,
	"new_ep": {
		"cover": "http://i1.hdslb.com/bfs/archive/335bc7538e4d983928868143188a1c7384fda453.jpg",
		"dm": 11446,
		"episode_id": 113279,
		"index": "12",
		"index_title": "请大家赏脸购买",
		"play": 138935,
		"url": "http://bangumi.bilibili.com/anime/6330/play#113279"
	},
	"season_id": 6330,
	"title": "NEW GAME!!",
	"total_count": 12,
	"ts": 1506434400
}

type 64

{
	"id": 19973,
	"category": {
		"id": 4,
		"parent_id": 2,
		"name": "番剧"
	},
	"categories": [
		{
			"id": 2,
			"parent_id": 0,
			"name": "动画"
		},
		{
			"id": 4,
			"parent_id": 2,
			"name": "番剧"
		}
	],
	"title": "09月25日Amazon七月新番BD/DVD排名 PRPR爆发",
	"summary": "许多动画将要在本周发售【七月新番】七月排名(总排名) 作品名 首卷发售日 制作公司01(6)战姬绝唱Symphogear AXZ 09.27 SATELIGHT 02(9)Princess Princ",
	"banner_url": "https://i0.hdslb.com/bfs/article/da1057f97c1721d7be4de332bc87c2a30be07bfd.jpg",
	"template_id": 4,
	"state": 0,
	"author": {
		"mid": 4132025,
		"name": "叉叉xxlonge",
		"face": "http://i0.hdslb.com/bfs/face/86e317c9ef8e80bd9f9940397338e506bef16b78.jpg",
		"pendant": {
			"pid": 0,
			"name": "",
			"image": "",
			"expire": 0
		},
		"official_verify": {
			"type": -1,
			"desc": ""
		}
	},
	"reprint": 0,
	"image_urls": [
		"https://i0.hdslb.com/bfs/article/da1057f97c1721d7be4de332bc87c2a30be07bfd.jpg@0-43-719-211a"
	],
	"publish_time": 1506344783,
	"ctime": 1506344451,
	"stats": {
		"view": 534,
		"favorite": 2,
		"like": 25,
		"dislike": 0,
		"reply": 28,
		"share": 0,
		"coin": 3
	},
	"tags": [
		{
			"tid": 4332826,
			"name": "实时榜"
		},
		{
			"tid": 2519374,
			"name": "Amazon"
		},
		{
			"tid": 13959,
			"name": "七月新番"
		}
	],
	"words": 3042
}

type 256

{
	"id": 37660,
	"upId": 5160539,
	"title": "Rubber Human - 橡胶人",
	"upper": "德法小u",
	"cover": "http://i0.hdslb.com/bfs/music/1eb48a9a0348dc2256186f9add839fbf703ceff5.jpg@.webp",
	"author": "momocashew · 德法小u",
	"ctime": 1506674004000,
	"replyCnt": 0,
	"intro": "测试一下B站新的音频投稿~\nMili一生爱~",
	"schema": "bilibili://music/detail/37660?name=Rubber+Human+-+%E6%A9%A1%E8%83%B6%E4%BA%BA&uperName=%E5%BE%B7%E6%B3%95%E5%B0%8Fu&cover_url=http%3A%2F%2Fi0.hdslb.com%2Fbfs%2Fmusic%2F1eb48a9a0348dc2256186f9add839fbf703ceff5.jpg%40.webp&upperId=5160539&author=momocashew+%C2%B7+%E5%BE%B7%E6%B3%95%E5%B0%8Fu",
	"typeInfo": "音乐 · 人声演唱",
	"upperAvatar": "http://i1.hdslb.com/bfs/face/733a4f5ba7224fe4c8749185bde8bc1bedad0d85.jpg"
}

type 512

{
	"cover": "http://i1.hdslb.com/bfs/archive/a4514b629143f088d8a3afac13bcb527b43a58f4.jpg",
	"episode_id": 114971,
	"index": "6",
	"index_title": "黑色暴牛",
	"url": "http://bangumi.bilibili.com/anime/6422/play#114971",
	"aid": 16109446,
	"reply_count": 0,
	"play_count": 267,
	"bullet_count": 44998,
	"pub_time": {
		"dayOfWeek": "TUESDAY",
		"dayOfYear": 311,
		"year": 2017,
		"month": "NOVEMBER",
		"monthValue": 11,
		"dayOfMonth": 7,
		"hour": 18,
		"minute": 25,
		"second": 0,
		"nano": 0,
		"chronology": {
			"calendarType": "iso8601",
			"id": "ISO"
		}
	},
	"apiSeasonInfo": {
		"bgm_type": 1,
		"season_id": 6422,
		"title": "黑色四叶草",
		"cover": "http://i0.hdslb.com/bfs/bangumi/c345335f3cc395f7cfbe7e7e0a4913f9b1671fe2.jpg",
		"is_finish": 0,
		"ts": 2017,
		"total_count": 51
	}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment