mirror of
https://github.com/hwchase17/langchain
synced 2024-11-10 01:10:59 +00:00
3d3cc71287
- **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>
16 lines
449 B
Python
16 lines
449 B
Python
from langchain_community.document_loaders import BiliBiliLoader
|
|
|
|
|
|
def test_bilibili_loader() -> None:
|
|
"""Test Bilibili Loader."""
|
|
loader = BiliBiliLoader(
|
|
[
|
|
"https://www.bilibili.com/video/BV1xt411o7Xu/",
|
|
"https://www.bilibili.com/video/av330407025/",
|
|
]
|
|
)
|
|
docs = loader.load()
|
|
assert len(docs) == 2
|
|
assert docs[0].metadata["aid"] == 34218168
|
|
assert docs[1].metadata["videos"] == 1
|