Skip to main content

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

novikovtv_parser_tenchat-1.0.6.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

novikovtv_parser_tenchat-1.0.6-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file novikovtv_parser_tenchat-1.0.6.tar.gz.

File metadata

File hashes

Hashes for novikovtv_parser_tenchat-1.0.6.tar.gz
Algorithm Hash digest
SHA256 81e2f8a4d633424f54ca329cd81657c9ab75f747b7de6cc5e61226f86e8addd2
MD5 d5938d3b2ce1e2d4e1c3876d2dbfcb7f
BLAKE2b-256 e0ee7d1ba039d13df47fcb17f7353eed13927be870499f8d2a48281bce5a5897

See more details on using hashes here.

File details

Details for the file novikovtv_parser_tenchat-1.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for novikovtv_parser_tenchat-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 6a39da11392a36e766d4c555ac143228428c70bfaef07ba711bf7ee057e2b9dc
MD5 ee735e159c1d3872b357f0337280d7ae
BLAKE2b-256 6348cd882e2e67ac9c0a4e0063beae110df938cda8f743ac08a80c66fb57e25d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page