ddg-scraper-2.0.1
توضیحات
Easy to use asynchronous and synchronous DuckDuckGo search engine scraper.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | ddg-scraper-2.0.1 |
| نام | ddg-scraper |
| نسخه کتابخانه | 2.0.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | m-y-x-i |
| ایمیل نویسنده | myxi@duck.com |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/ddg-scraper/ |
| مجوز | MIT |
# Asynchronous and Synchronous DuckDuckGo Search Engine Scraper
Scrapes the [duckduckgo](https://duck.com) search engine.
# Asynchronous Example
```py
from ddg_scraper import DuckScraper
import trio
duck_scraper = DuckScraper()
async def main():
async with duck_scraper.search("python") as results:
async for result in results:
...
trio.run(main)
```
# Synchronous Example
```py
from ddg_scraper import DuckScraper
duck_scraper = DuckScraper()
with duck_scraper.search("python") as results:
for result in results:
...
```
In both examples, `result` is [`ddg_scraper.SearchResult`](https://github.com/m-y-x-i/duckduckgo-scraper/blob/master/ddg_scraper/structs.py)
# Attributes and Methods of [`ddg_scraper.SearchResult`](https://github.com/m-y-x-i/duckduckgo-scraper/blob/master/ddg_scraper/structs.py)
Attributes
- `title`
- `url`
- `favicon`
- `snippet`
# How To Install
- **Using pip:** `pip install ddg-scraper`
- **Manual:**
- Clone the folder somewhere
- CD to the location
- Install the packages listed in [`requirements.txt`](https://github.com/m-y-x-i/duckduckgo-scraper/blob/master/requirements.txt) (`pip install -r requirements.txt`)
- Copy the folder, [ddg_scraper](https://github.com/m-y-x-i/duckduckgo-scraper/blob/master/ddg_scraper) where you want to use it.
نیازمندی
| مقدار | نام |
|---|---|
| ==1.2.2 | arrow |
| ==0.22.0 | httpx |
| ==0.3.6 | selectolax |
| ==0.19.0 | trio |
| ==1.6.3 | yarl |
نحوه نصب
نصب پکیج whl ddg-scraper-2.0.1:
pip install ddg-scraper-2.0.1.whl
نصب پکیج tar.gz ddg-scraper-2.0.1:
pip install ddg-scraper-2.0.1.tar.gz