Coder Social home page Coder Social logo

bilireq's Introduction

counter

SK-415's GitHub stats

Top Langs

bilireq's People

Contributors

djkcyl avatar hbgodseeker avatar noahzark avatar numbersir avatar sk-415 avatar well2333 avatar wosiwq 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  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

bilireq's Issues

bilibili api 返回值有点问题

04-22 22:21:31 [SUCCESS] nonebot | OneBot V11 524168349 | [message.group.normal]: Message 945430398 from 3076823485@[群:1105946125] '[at:qq=524168349] 关注 1915025515'
04-22 22:21:31 [INFO] nonebot | Event will be handled by Matcher(type='message', module=haruka_bot.utils)
{"code":-509,"message":"请求过于频繁,请稍后再试","ttl":1}{"code":0,"message":"0","ttl":1,"data":{"mid":1915025515,"name":"小哥Da打胶","sex":"保密","face":"https://i1.hdslb.com/bfs/face/e084d322d0f2d8f37d552efe3d88bfac9c71398c.jpg","face_nft":0,"face_nft_type":0,"sign":"关注小号【小哥chao爱Da胶】怕你们找不到回家打胶的路,更新日常生活。小哥唯一B哩打胶号:小哥Da打胶,打得一手好胶。","rank":10000,"level":6,"jointime":0,"moral":0,"silence":0,"coins":0,"fans_badge":true,"fans_medal":{"show":true,"wear":true,"medal":{"uid":1915025515,"target_id":91542133,"medal_id":158591,"level":3,"medal_name":"KARASU","medal_color":6067854,"intimacy":499,"next_intimacy":500,"day_limit":1500,"medal_color_start":6067854,"medal_color_end":6067854,"medal_color_border":6067854,"is_lighted":1,"light_status":1,"wearing_status":1,"score":1000}},"official":{"role":1,"title":"bilibili 知名UP主","desc":"","type":0},"vip":{"type":1,"status":1,"due_date":1684598400000,"vip_pay_type":1,"theme_type":0,"label":{"path":"","text":"大会员","label_theme":"vip","text_color":"#FFFFFF","bg_style":1,"bg_color":"#FB7299","border_color":"","use_img_label":true,"img_label_uri_hans":"","img_label_uri_hant":"","img_label_uri_hans_static":"https://i0.hdslb.com/bfs/vip/3788b674c69072f1ee252b79a31ecc8c43af3039.png","img_label_uri_hant_static":"https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/jwXBWRVwa5.png"},"avatar_subscript":1,"nickname_color":"#FB7299","role":1,"avatar_subscript_url":"","tv_vip_status":0,"tv_vip_pay_type":0},"pendant":{"pid":0,"name":"","image":"","expire":0,"image_enhance":"","image_enhance_frame":""},"nameplate":{"nid":1,"name":"黄金殿堂","image":"https://i1.hdslb.com/bfs/face/82896ff40fcb4e7c7259cb98056975830cb55695.png","image_small":"https://i2.hdslb.com/bfs/face/627e342851dfda6fe7380c2fa0cbd7fae2e61533.png","level":"稀有勋章","condition":"单个自制视频总播放数\u003e=100万"},"user_honour_info":{"mid":0,"colour":null,"tags":[]},"is_followed":false,"top_photo":"http://i1.hdslb.com/bfs/space/cb1c3ef50e22b6096fde67febe863494caefebad.png","theme":{},"sys_notice":{},"live_room":{"roomStatus":1,"liveStatus":0,"url":"https://live.bilibili.com/25662649?broadcast_type=0\u0026is_room_feed=1","title":"bilibili主播的直播间","cover":"http://i0.hdslb.com/bfs/live/user_cover/790f58dc096b67e392158567ed73f4534d29d768.jpg","roomid":25662649,"roundStatus":0,"broadcast_type":0,"watched_show":{"switch":true,"num":1,"text_small":"1","text_large":"1人看过","icon":"https://i0.hdslb.com/bfs/live/a725a9e61242ef44d764ac911691a7ce07f36c1d.png","icon_location":"","icon_web":"https://i0.hdslb.com/bfs/live/8d9d0f33ef8bf6f308742752d13dd0df731df19c.png"}},"birthday":"01-01","school":{"name":""},"profession":{"name":"","department":"","title":"","is_show":0},"tags":null,"series":{"user_upgrade_status":3,"show_upgrade_window":false},"is_senior_member":0,"mcn_info":null,"gaia_res_type":0,"gaia_data":null,"is_risk":false,"elec":{"show_info":{"show":true,"state":2,"title":" 为TA充电","icon":"","jump_url":"https://www.bilibili.com/h5/upower/index?mid=1915025515\u0026navhide=1"}},"contract":null}}
04-22 22:21:32 [INFO] nonebot | Matcher(type='message', module=haruka_bot.utils) running complete
04-22 22:21:32 [ERROR] nonebot | Running Matcher(type='message', module=haruka_bot.utils) failed.
Traceback (most recent call last):
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\bot\qqbot\venv\virtualenvs\nb2-oneclick-UnZoRd4v-py3.10\Scripts\nb.exe\__main__.py", line 7, in <module>
    sys.exit(main())
  File "C:\bot\qqbot\venv\virtualenvs\nb2-oneclick-UnZoRd4v-py3.10\lib\site-packages\click\core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "C:\bot\qqbot\venv\virtualenvs\nb2-oneclick-UnZoRd4v-py3.10\lib\site-packages\click\core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "C:\bot\qqbot\venv\virtualenvs\nb2-oneclick-UnZoRd4v-py3.10\lib\site-packages\click\core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\bot\qqbot\venv\virtualenvs\nb2-oneclick-UnZoRd4v-py3.10\lib\site-packages\click\core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\bot\qqbot\venv\virtualenvs\nb2-oneclick-UnZoRd4v-py3.10\lib\site-packages\click\core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "C:\bot\qqbot\venv\virtualenvs\nb2-oneclick-UnZoRd4v-py3.10\lib\site-packages\nb_cli\commands\main.py", line 30, in run
    run_bot(file, app)
  File "C:\bot\qqbot\venv\virtualenvs\nb2-oneclick-UnZoRd4v-py3.10\lib\site-packages\nb_cli\handlers\deploy.py", line 23, in run_bot
    nonebot.run()
  File "C:\bot\qqbot\venv\virtualenvs\nb2-oneclick-UnZoRd4v-py3.10\lib\site-packages\nonebot\__init__.py", line 273, in run
    get_driver().run(*args, **kwargs)
  File "C:\bot\qqbot\venv\virtualenvs\nb2-oneclick-UnZoRd4v-py3.10\lib\site-packages\nonebot\drivers\fastapi.py", line 187, in run
    uvicorn.run(
  File "C:\bot\qqbot\venv\virtualenvs\nb2-oneclick-UnZoRd4v-py3.10\lib\site-packages\uvicorn\main.py", line 569, in run
    server.run()
  File "C:\bot\qqbot\venv\virtualenvs\nb2-oneclick-UnZoRd4v-py3.10\lib\site-packages\uvicorn\server.py", line 60, in run
    return asyncio.run(self.serve(sockets=sockets))
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 636, in run_until_complete
    self.run_forever()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\windows_events.py", line 321, in run_forever
    super().run_forever()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 603, in run_forever
    self._run_once()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 1906, in _run_once
    handle._run()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "C:\bot\qqbot\venv\virtualenvs\nb2-oneclick-UnZoRd4v-py3.10\lib\site-packages\nonebot\message.py", line 141, in _check_matcher
    await _run_matcher(Matcher, bot, event, state, stack, dependency_cache)
> File "C:\bot\qqbot\venv\virtualenvs\nb2-oneclick-UnZoRd4v-py3.10\lib\site-packages\nonebot\message.py", line 187, in _run_matcher
    await matcher.run(bot, event, state, stack, dependency_cache)
  File "C:\bot\qqbot\venv\virtualenvs\nb2-oneclick-UnZoRd4v-py3.10\lib\site-packages\nonebot\internal\matcher\matcher.py", line 732, in run
    await self.simple_run(bot, event, state, stack, dependency_cache)
  File "C:\bot\qqbot\venv\virtualenvs\nb2-oneclick-UnZoRd4v-py3.10\lib\site-packages\nonebot\internal\matcher\matcher.py", line 707, in simple_run
    await handler(
  File "C:\bot\qqbot\venv\virtualenvs\nb2-oneclick-UnZoRd4v-py3.10\lib\site-packages\nonebot\dependencies\__init__.py", line 108, in __call__
    return await cast(Callable[..., Awaitable[R]], self.call)(**values)
  File "C:\bot\qqbot\venv\virtualenvs\nb2-oneclick-UnZoRd4v-py3.10\lib\site-packages\haruka_bot\plugins\sub\add_sub.py", line 35, in _
    name = (await get_user_info(uid, reqtype="web", proxies=PROXIES))["name"]
  File "C:\bot\qqbot\venv\virtualenvs\nb2-oneclick-UnZoRd4v-py3.10\lib\site-packages\bilireq\user\__init__.py", line 12, in get_user_info
    return await get(url, params=params, auth=auth, reqtype=reqtype, **kwargs)
  File "C:\bot\qqbot\venv\virtualenvs\nb2-oneclick-UnZoRd4v-py3.10\lib\site-packages\bilireq\utils\__init__.py", line 100, in get
    return await request("GET", url, **kwargs)
  File "C:\bot\qqbot\venv\virtualenvs\nb2-oneclick-UnZoRd4v-py3.10\lib\site-packages\bilireq\utils\__init__.py", line 87, in request
    raw_json: Dict[str, Any] = raw.json()
  File "C:\bot\qqbot\venv\virtualenvs\nb2-oneclick-UnZoRd4v-py3.10\lib\site-packages\httpx\_models.py", line 756, in json
    return jsonlib.loads(self.text, **kwargs)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\json\__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\json\decoder.py", line 340, in decode
    raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 1 column 47 (char 46)

image

API调用中auth参数应当传递什么类型的值?

bilireq版本:0.2.3.post0

请问在API调用中的auth参数应该传递什么类型的值呢?

我通过Login.qrcode_login获取到了一个dict,并用其创建了一个auth: Auth实例,我尝试了传递auth=auth, auth.cookie, auth.tokens, auth.access_token,但是请求都会返回code -412,应该是auth没有生效。

调用的API为bilireq.live.get_room_info_by_uid

非常感谢!

grpc获取直播间信息错误

调用bilireq.grpc.live.grpc_get_room_info方法报了以下错误,请问是接口还没完成,还是我使用的方式不对

ImportError: cannot import name 'StudioListStub' from 'bilireq.grpc.protos.bilibili.live.app.room.v1.room_pb2_grpc'

0.2.12版本无法正常使用

将bilireq升级到0.2.12版本后运行报错
相关插件
HibiKier/zhenxun_bot#1518
https://github.com/HibiKier/zhenxun_bot
日志如下
The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/pc/桌面/zhenxun_bot-main/bot.py", line 21, in
nonebot.run()
File "/home/pc/.cache/pypoetry/virtualenvs/zhenxun-bot-PY0IqCSM-py3.10/lib/python3.10/site-packages/nonebot/init.py", line 333, in run
get_driver().run(*args, **kwargs)
File "/home/pc/.cache/pypoetry/virtualenvs/zhenxun-bot-PY0IqCSM-py3.10/lib/python3.10/site-packages/nonebot/drivers/fastapi.py", line 199, in run
uvicorn.run(
File "/home/pc/.cache/pypoetry/virtualenvs/zhenxun-bot-PY0IqCSM-py3.10/lib/python3.10/site-packages/uvicorn/main.py", line 587, in run
server.run()
File "/home/pc/.cache/pypoetry/virtualenvs/zhenxun-bot-PY0IqCSM-py3.10/lib/python3.10/site-packages/uvicorn/server.py", line 61, in run
return asyncio.run(self.serve(sockets=sockets))
File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/home/pc/.cache/pypoetry/virtualenvs/zhenxun-bot-PY0IqCSM-py3.10/lib/python3.10/site-packages/nonebot/message.py", line 467, in check_and_run_matcher
await _run_matcher(

File "/home/pc/.cache/pypoetry/virtualenvs/zhenxun-bot-PY0IqCSM-py3.10/lib/python3.10/site-packages/nonebot/message.py", line 419, in _run_matcher
await matcher.run(bot, event, state, stack, dependency_cache)
File "/home/pc/.cache/pypoetry/virtualenvs/zhenxun-bot-PY0IqCSM-py3.10/lib/python3.10/site-packages/nonebot/internal/matcher/matcher.py", line 759, in run
await self.simple_run(bot, event, state, stack, dependency_cache)
File "/home/pc/.cache/pypoetry/virtualenvs/zhenxun-bot-PY0IqCSM-py3.10/lib/python3.10/site-packages/nonebot/internal/matcher/matcher.py", line 734, in simple_run
await handler(
File "/home/pc/.cache/pypoetry/virtualenvs/zhenxun-bot-PY0IqCSM-py3.10/lib/python3.10/site-packages/nonebot/dependencies/init.py", line 108, in call
return await cast(Callable[..., Awaitable[R]], self.call)(**values)
File "/home/pc/桌面/zhenxun_bot-main/plugins/bilibiliParse/init.py", line 120, in msgParse
vd_info, live_info, vd_url, live_url, image_info, image_url = await parse_bili_url(get_url, information_container)
File "/home/pc/桌面/zhenxun_bot-main/plugins/bilibiliParse/parse_bili_url.py", line 39, in parse_bili_url
vd_info = await video.get_video_base_info(vid)
File "/home/pc/.cache/pypoetry/virtualenvs/zhenxun-bot-PY0IqCSM-py3.10/lib/python3.10/site-packages/bilireq/video/init.py", line 11, in get_video_base_info
return await get(url, params=params)
File "/home/pc/.cache/pypoetry/virtualenvs/zhenxun-bot-PY0IqCSM-py3.10/lib/python3.10/site-packages/bilireq/utils/init.py", line 184, in get
return await request("GET", url, **kwargs)
File "/home/pc/.cache/pypoetry/virtualenvs/zhenxun-bot-PY0IqCSM-py3.10/lib/python3.10/site-packages/bilireq/utils/init.py", line 159, in request
resp = await _request(method, url, **kwargs)
File "/home/pc/.cache/pypoetry/virtualenvs/zhenxun-bot-PY0IqCSM-py3.10/lib/python3.10/site-packages/bilireq/utils/init.py", line 139, in _request
cookies.update(await get_homepage_cookies(proxies))
File "/home/pc/.cache/pypoetry/virtualenvs/zhenxun-bot-PY0IqCSM-py3.10/lib/python3.10/site-packages/bilireq/utils/init.py", line 33, in get_homepage_cookies
resp = await client.request(
File "/home/pc/.cache/pypoetry/virtualenvs/zhenxun-bot-PY0IqCSM-py3.10/lib/python3.10/site-packages/httpx/_client.py", line 1533, in request
return await self.send(request, auth=auth, follow_redirects=follow_redirects)
File "/home/pc/.cache/pypoetry/virtualenvs/zhenxun-bot-PY0IqCSM-py3.10/lib/python3.10/site-packages/httpx/_client.py", line 1620, in send
response = await self._send_handling_auth(
File "/home/pc/.cache/pypoetry/virtualenvs/zhenxun-bot-PY0IqCSM-py3.10/lib/python3.10/site-packages/httpx/_client.py", line 1648, in _send_handling_auth
response = await self._send_handling_redirects(
File "/home/pc/.cache/pypoetry/virtualenvs/zhenxun-bot-PY0IqCSM-py3.10/lib/python3.10/site-packages/httpx/_client.py", line 1685, in _send_handling_redirects
response = await self._send_single_request(request)
File "/home/pc/.cache/pypoetry/virtualenvs/zhenxun-bot-PY0IqCSM-py3.10/lib/python3.10/site-packages/httpx/_client.py", line 1722, in _send_single_request
response = await transport.handle_async_request(request)
File "/home/pc/.cache/pypoetry/virtualenvs/zhenxun-bot-PY0IqCSM-py3.10/lib/python3.10/site-packages/httpx/_transports/default.py", line 352, in handle_async_request
with map_httpcore_exceptions():
File "/usr/lib/python3.10/contextlib.py", line 153, in exit
self.gen.throw(typ, value, traceback)
File "/home/pc/.cache/pypoetry/virtualenvs/zhenxun-bot-PY0IqCSM-py3.10/lib/python3.10/site-packages/httpx/_transports/default.py", line 77, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.ConnectError: All connection attempts failed

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.