Skip to content
New issue

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

BiliBiliLoader Credential No Sessdata error #14213

Open
2 of 14 tasks
Jiaaming opened this issue Dec 4, 2023 · 4 comments
Open
2 of 14 tasks

BiliBiliLoader Credential No Sessdata error #14213

Jiaaming opened this issue Dec 4, 2023 · 4 comments
Labels
🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature Ɑ: doc loader Related to document loader module (not documentation)

Comments

@Jiaaming
Copy link
Contributor

Jiaaming commented Dec 4, 2023

System Info

Mac os
Python3.9

Who can help?

@Jiaaming
I'm working on this issue.

Information

  • The official example notebooks/scripts
  • My own modified scripts

Related Components

  • LLMs/Chat Models
  • Embedding Models
  • Prompts / Prompt Templates / Prompt Selectors
  • Output Parsers
  • Document Loaders
  • Vector Stores / Retrievers
  • Memory
  • Agents / Agent Executors
  • Tools / Toolkits
  • Chains
  • Callbacks/Tracing
  • Async

Reproduction

when you run the BiliBiliLoader example from the official docs

loader = BiliBiliLoader(
        [
            "https://www.bilibili.com/video/BV1g84y1R7oE/",
        ]
    )
docs = loader.load()
print(docs)

will get

bilibili_api.exceptions.CredentialNoSessdataException.CredentialNoSessdataException: Credential 类未提供 sessdata 或者为空。

Process finished with exit code 1

The is because the original bilibili_api require a Credential to fetch the info from the video

Expected behavior

Should return a Document object

[Document(page_content="Video Title:...,description:....)]
Copy link

dosubot bot commented Dec 4, 2023

🤖

Hello @Jiaaming! 👋

I'm Dosu, a friendly bot here to assist you with your LangChain concerns while we wait for a human maintainer. I'm designed to help solve bugs, answer questions, and guide you in becoming a contributor.

Looking forward to assisting you! 😊

Based on the current LangChain codebase, the BiliBiliLoader does not support the use of credentials for authentication. The BiliBiliLoader class, as it stands, only accepts a list of video URLs and fetches the video information and subtitles without any authentication process. You can confirm this by checking the BiliBiliLoader class in the bilibili.py file.

As for your question about plans to update the BiliBiliLoader to support the use of credentials, I couldn't find any information about this in the repository. It's possible that there might be plans for this feature in future updates, but without confirmation, it's hard to say for sure.

If you have the necessary permissions, you could potentially modify the BiliBiliLoader class to accept and use credentials for authentication. However, please be aware that this might have implications for other parts of the codebase, so it's important to thoroughly test any changes you make.

If you need further assistance or have more questions, feel free to ask.

Sources


This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

@dosubot dosubot bot added Ɑ: doc loader Related to document loader module (not documentation) 🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature labels Dec 4, 2023
@Jiaaming
Copy link
Contributor Author

Jiaaming commented Dec 4, 2023

Already open a pull request [#18036 ]

@Shengguang-Zhou
Copy link

It's still not been solved

@fenghuoliansanyue
Copy link

Modify the following file:
\Lib\site-packages\langchain_community\document_loaders\bilibili.py

Add the following in the call library function area:

from bilibili_api import Credential
sessdata = ""
bili_jct = ""
buvid3 = ""
credential = Credential(sessdata=sessdata, bili_jct=bili_jct, buvid3=buvid3)

See this link below for more information:
https://geekdaxue.co/read/bilibili-api-docs/docs-get-credential.md
then,find the following code:
v = video.Video(bvid=bvid.group())
change to:
v = video.Video(bvid=bvid.group(), credential=credential)
then,it will be ok!
Do not disclose the above information to others!!!

baskaryan added a commit that referenced this issue Mar 28, 2024
- **Description:** 
1. Fix the BiliBiliLoader that can receive cookie parameters, it
requires 3 other parameters to run. The change is backward compatible.
  2. Add test;      
  3. Add example in docs

- **Issue:** [#14213]

Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
bechbd pushed a commit to bechbd/langchain that referenced this issue Mar 29, 2024
- **Description:** 
1. Fix the BiliBiliLoader that can receive cookie parameters, it
requires 3 other parameters to run. The change is backward compatible.
  2. Add test;      
  3. Add example in docs

- **Issue:** [langchain-ai#14213]

Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
gkorland pushed a commit to FalkorDB/langchain that referenced this issue Mar 30, 2024
- **Description:** 
1. Fix the BiliBiliLoader that can receive cookie parameters, it
requires 3 other parameters to run. The change is backward compatible.
  2. Add test;      
  3. Add example in docs

- **Issue:** [langchain-ai#14213]

Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
marlenezw pushed a commit to marlenezw/langchain that referenced this issue Apr 2, 2024
- **Description:** 
1. Fix the BiliBiliLoader that can receive cookie parameters, it
requires 3 other parameters to run. The change is backward compatible.
  2. Add test;      
  3. Add example in docs

- **Issue:** [langchain-ai#14213]

Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
hinthornw pushed a commit that referenced this issue Apr 26, 2024
- **Description:** 
1. Fix the BiliBiliLoader that can receive cookie parameters, it
requires 3 other parameters to run. The change is backward compatible.
  2. Add test;      
  3. Add example in docs

- **Issue:** [#14213]

Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature Ɑ: doc loader Related to document loader module (not documentation)
Projects
None yet
Development

No branches or pull requests

3 participants