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.3.tar.gz (5.6 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.3-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: novikovtv_parser_vk-1.0.3.tar.gz
  • Upload date:
  • Size: 5.6 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.3.tar.gz
Algorithm Hash digest
SHA256 7e21d3b86b74564ffbded6b9a9ccfdfa8ccd4ff475426b3f2c92072a08625e79
MD5 3ab24786f382c26bb0b34e39655bb164
BLAKE2b-256 11c6c4dad3986e46f3727d3f65c28a697a460553722eef3268f8d0d0912842d0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for novikovtv_parser_vk-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 625e160a83fa4cb4a50cec1cda3d6e86602c9dc1dc7a17e514748008447ff8dc
MD5 b806a519f477e8e75cedbd638dd2114b
BLAKE2b-256 f4c9b2272137caa03e6e738e9c2e374a95774dca9d7abc4541af1d694a4f8d92

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