This is the TenChat search engine parser
Project description
VK Parser
Пример
import os
from enum import Enum
from dotenv import load_dotenv
from pydantic import BaseModel
from novikovtv_parser_tenchat.main import make_csv_file
class ParserAPIType(int, Enum):
"""Перечисление типов парсера API."""
Deferred = 0 # Отложенный парсинг
Day = 1 # Дневной парсинг
Night = 2 # Ночной парсинг
class ParserRequest(BaseModel):
"""Модель запроса на парсинг."""
tg_user_id: int
query: str
type: ParserAPIType
async def vk(parser_request: ParserRequest):
"""Выполняет парсинг TenChat по запросу пользователя."""
load_dotenv()
login = os.getenv("LOGIN_TENCHAT")
password = os.getenv("PASSWORD_TENCHAT")
max_communities = int(os.getenv("MAX_COMMUNITIES_TENCHAT"))
search_query = parser_request.query
csv_text = await make_csv_text(login, password, search_query, max_communities)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file novikovtv_parser_tenchat-1.0.6.tar.gz.
File metadata
- Download URL: novikovtv_parser_tenchat-1.0.6.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81e2f8a4d633424f54ca329cd81657c9ab75f747b7de6cc5e61226f86e8addd2
|
|
| MD5 |
d5938d3b2ce1e2d4e1c3876d2dbfcb7f
|
|
| BLAKE2b-256 |
e0ee7d1ba039d13df47fcb17f7353eed13927be870499f8d2a48281bce5a5897
|
File details
Details for the file novikovtv_parser_tenchat-1.0.6-py3-none-any.whl.
File metadata
- Download URL: novikovtv_parser_tenchat-1.0.6-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a39da11392a36e766d4c555ac143228428c70bfaef07ba711bf7ee057e2b9dc
|
|
| MD5 |
ee735e159c1d3872b357f0337280d7ae
|
|
| BLAKE2b-256 |
6348cd882e2e67ac9c0a4e0063beae110df938cda8f743ac08a80c66fb57e25d
|