Skip to main content

This is the VK search engine parser

Project description

VK Parser

Пример

import os
from enum import Enum

from dotenv import load_dotenv
from pydantic import BaseModel


class ParserAPIType(int, Enum):
    """Перечисление типов парсера API."""
    Deferred = 0  # Отложенный парсинг
    Day = 1  # Дневной парсинг
    Night = 2  # Ночной парсинг


class ParserRequest(BaseModel):
    """Модель запроса на парсинг."""
    tg_user_id: int
    query: str
    type: ParserAPIType


async def main(parser_request: ParserRequest):
    load_dotenv()
    login = os.getenv("LOGIN")
    password = os.getenv("PASSWORD")
    max_communities = int(os.getenv("MAX_COMMUNITIES"))
    web_driver_path = os.getenv("WEB_DRIVER_PATH")
    chrome_path = os.getenv("CHROME_PATH")
    search_query = parser_request.query

    csv_text = await make_csv_text(web_driver_path, chrome_path, 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_vk-1.0.2.tar.gz (5.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_vk-1.0.2-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file novikovtv_parser_vk-1.0.2.tar.gz.

File metadata

  • Download URL: novikovtv_parser_vk-1.0.2.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.5

File hashes

Hashes for novikovtv_parser_vk-1.0.2.tar.gz
Algorithm Hash digest
SHA256 667247e39c265cc13540286a56b4dcb1ae30ef1b5022bc8143e43671ee29982e
MD5 272b64d7923db8a8d86dfd32e62ee689
BLAKE2b-256 2d69b713f8a23ee9036add9cf25638283d8829a59389468828758fb3466649ca

See more details on using hashes here.

File details

Details for the file novikovtv_parser_vk-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for novikovtv_parser_vk-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ce8eaeb41c4c774fd7c161a3327870e19aba985b3fbf139ff729a9211832e44a
MD5 edcbbcb90f2e19d374fa679dd7019154
BLAKE2b-256 87d686c2b345535811958c5ae03cc98a2dc900c5f082934ce69ca0c9f4fe3a19

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