An open API service indexing awesome lists of open source software.

https://github.com/daniilak/ru_mvd_search_wanted

Поиск в базе данных Розыска МВД
https://github.com/daniilak/ru_mvd_search_wanted

Last synced: 2 months ago
JSON representation

Поиск в базе данных Розыска МВД

Awesome Lists containing this project

README

        

# API MVD Search Wanted Client

> Поиск указанного человека в базе данных [Розыск МВД](https://xn--b1aew.xn--p1ai/wanted)

Requirements:

- Python 3.7+
- [httpx](https://pypi.org/project/httpx/)
- [beautifulsoup4](https://pypi.org/project/beautifulsoup4/)
- [fake-useragent](https://pypi.org/project/fake-useragent/)

## Installation

```sh
pip install ru_mvd_search_wanted
```

## Usage

Import client:

```python
from ru_mvd_search_wanted.sync import MVDParser
```

Set proxy:

```python
proxy = "user:pass@host:port"
```

Use `with MVDParser()` if you want a context-managed client:

```python

with MVDParser(
"Фамилия", "Имя", "Отчество", "YYYY", "MM", "DD", "[email protected]", proxy
) as mvd:
captcha_base64 = mvd.initialize()

# solve captcha
# captcha_word = solve(captcha_base64)
result = mvd.get_result(captcha_word)

print(result)

```

## Usage (async)

Import client:

```python
from ru_mvd_search_wanted.asynchr import MVDParserAsync
```

Set proxy:

```python
proxy = "user:pass@host:port"
```

Use `async with MVDParserAsync()` Example:

```python

import asyncio

proxy = "user:pass@host:port"

async def main():
async with MVDParserAsync(
"Фамилия",
"Имя",
"Отчество",
"YYYY",
"MM",
"DD",
"[email protected]",
proxy
) as mvd:
captcha_base64 = await mvd.initialize()

# solve captcha
# captcha_word = await solve(captcha_base64)
result = await mvd.get_result(captcha_word)

print(result)

loop = asyncio.get_event_loop()
loop.run_until_complete(main())
```