semvec/pypi-packages huggingface dataset:
bdclient 0.4.2
An unofficial Python client for Bright Data APIs.
Requires Python: >=3.12

# BDClient

An unofficial Python client for Bright Data APIs.

Features:

- Scraper API
  - Google News
  - Google SERP
  - YouTube Videos
- SERP API
  - Google Search
- Unlocker API

## Installation

Installing using pip:

```bash
pip install bdclient
```

Installing using uv:

```bash
uv add bdclient
```

## Usage

Example Scraper API usage:

```python
import asyncio

from bdclient.scraper.youtube_videos import DiscoverByKeyword, DiscoverByKeywordQuery


async def main():
    scraper = DiscoverByKeyword(api_key="your_bright_data_api_key")
    query = DiscoverByKeywordQuery(keyword="How to make pizza")

    results = await scraper.scrape([query])
    for result in results:
        print(result.model_dump_json(indent=4))


if __name__ == "__main__":
    asyncio.run(main())
```

Example SERP API usage:

```python
import asyncio

from bdclient.serp.google_search import GoogleSearch


async def main():
    google_search = GoogleSearch(
        api_key="your_bright_data_api_key",
        zone="your_serp_zone",
    )
    result = await google_search.search(keyword="Pizza toppings")
    print(result)


if __name__ == "__main__":
    asyncio.run(main())
```

Example Unlocker API usage:

```python
import asyncio

from bdclient.unlocker import Unlocker


async def main():
    unlocker = Unlocker(
        api_key="your_bright_data_api_key",
        zone="your_unlocker_zone",
    )

    result = await unlocker.unlock("https://www.bbc.com/news/articles/c8ex2l58en4o")
    print(result)


if __name__ == "__main__":
    asyncio.run(main())
```
bili-scraper 0.1.2
Bilibili website crawler that can download videos, dm, comments, articles, and more.
Requires Python: >=3.8


# bili-scraper

Bilibili website crawler that can download videos, dm, comments, articles, and more.

This project is for learning purposes only, **please don’t use it for commercial purposes**.

本项目仅用于学习目的，**请勿用于商业用途**。

## License

[![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/Guoziqi329/bili-scraper/blob/main/LICENSE)



## Author

- [@Guoziqi329](https://github.com/Guoziqi329)
- [@su7-ran](https://github.com/su7-ran)

## start

You can install it using the ```pip install bili-scraper``` command

### Demo

``` python
from bili_scraper import BiliScraper
import json

if __name__ == '__main__':
    with open("cookie.json", "r", encoding="utf-8") as f:
        cookie = json.load(f)['cookie']

    bilibili = BiliScraper(cookie)

    # Get video
    bilibili.getVideo('BV1Jd1oB3EGD')

    # Get video comments
    comments = bilibili.getVideoComments('BV1Jd1oB3EGD', 'img', 1)
    with open("test.json", "w", encoding="utf-8") as f:
        json.dump(comments, f, ensure_ascii=False)
    
    # Get video Dm
    print(bilibili.getVideoDm("BV1vxPReEERx"))

    # Get Article
    bilibili.getArticle("1102463389176692741", 'doc', 'doc.docx', 'img/test/')
```



## Thanks
This project uses code from:
- [bilibili-API-collect](https://github.com/SocialSisterYi/bilibili-API-collect) by [@SocialSisterYi], licensed under [CC-BY-NC 4.0](https://github.com/SocialSisterYi/bilibili-API-collect/blob/master/LICENSE)


## feedback

If you have any feedback, please contact us：guoziqi329@gmail.com