We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python 版本: 3.11.0b4
模块版本: 16.3.0
运行环境: Windows
[Request][2024-11-27 17:18:12,759] Api(url='https://hd.biliplus.com/api/cidinfo', method='GET', comment='获取 cid 对应的视频', wbi=False, verify=False, no_csrf=False, json_body=False, ignore_code=False, data={}, params={'cid': 733266843}, files={}, headers={}, credential=<bilibili_api.utils.credential.Credential object at 0x0000029C5C307A50>) bilibili_api.exceptions.ResponseCodeException.ResponseCodeException: 接口返回错误代码:-404,信息:cid无记录。 {'code': -404, 'message': 'cid无记录'}
https://hd.biliplus.com/api/cidinfo?cid=733266843
上面CID对应的视频链接:https://www.bilibili.com/video/BV1kY411u7iK。
获取私人笔记,调用note.fetch_content()报错。
note.fetch_content()
import bilibili_api as bili from bilibili_api import sync note_id,aid = "","" def main(): credential = bili.Credential( sessdata=SESSDATA, bili_jct=BILI_JCT, buvid3=BUVID3) note = bili.note.Note( note_type=bili.note.NoteType.PRIVATE, note_id=note_id, aid=aid, credential=credential) # FIXME await note.fetch_content() note_markdown = note.markdown() if __name__ == "__main__": sync(main())
The text was updated successfully, but these errors were encountered:
class VideoCardNode(Node): def __init__(self): self.aid = 0 def markdown(self): return f"[视频 av{self.aid}](https://www.bilibili.com/av{self.aid})\n\n" def json(self): return {"type": "VideoCardNode", "aid": self.aid}
这里cid是错的,得用aid。
class Note: async def fetch_content(self) -> None: """ 获取并解析笔记内容 该返回不会返回任何值,调用该方法后请再调用 `self.markdown()` 或 `self.json()` 来获取你需要的值。 """ def parse_note(data: List[dict]): for field in data: if not isinstance(field["insert"], str): if "tag" in field["insert"].keys(): node = VideoCardNode() # FIXME # node.aid = get_cid_info_sync(field["insert"]["tag"]["cid"])[ # "cid" # ] # node.aid = get_cid_info_sync(field["insert"]["tag"]["cid"])[ "aid" ] self.__children.append(node)
Sorry, something went wrong.
No branches or pull requests
Python 版本: 3.11.0b4
模块版本: 16.3.0
运行环境: Windows
日志
https://hd.biliplus.com/api/cidinfo?cid=733266843
上面CID对应的视频链接:https://www.bilibili.com/video/BV1kY411u7iK。
复现代码
获取私人笔记,调用
note.fetch_content()
报错。疑问/解决
note.fetch_content()
功能恢复正常。是否能够在API库中内置这个功能?The text was updated successfully, but these errors were encountered: