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.4.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.4-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: novikovtv_parser_vk-1.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 81269c8a83fcd21716063f0f96d463b52eccedd9d40046b088d56c2d3cbec8ad
MD5 57155ed425ef37a4c410a45d1724a002
BLAKE2b-256 86defaf26715e659fbc1ed6ba667be7ae66556325bce9cf68727eea8cc25b5a0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for novikovtv_parser_vk-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1a99f9eda9c0459bd90d6d1cbf5fdb98c6e256335d9308e30388f80ced44a98b
MD5 12c2dd07022aceb97c18a4a38f538fe4
BLAKE2b-256 6677d2295eb8640d502a52b4c211ad806d7baf8e21449268ed2a04ed21e8fe60

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