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.1.tar.gz (5.3 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.1-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for novikovtv_parser_vk-1.0.1.tar.gz
Algorithm Hash digest
SHA256 a55983df2de98c096c38bd93ba083af25d57142b25b272f25b90992efefc427e
MD5 c7a5a19b646ddf8fb924dc615fda7b84
BLAKE2b-256 8cb9be6589f5b75e6596eeb41dca166df65aadb8b625e34b9b46afdefd165e5e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for novikovtv_parser_vk-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d962644f8bf95d8739a7fe5775b5a4f7871707c694f440815d4490f4ecf68f56
MD5 12f5d028858453078dd9c878351892e8
BLAKE2b-256 e2983af6a56035dec6a174322de0302296ab287e2ffe552e12a49da2ab151a83

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