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

Uploaded Python 3

File details

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

File metadata

  • Download URL: novikovtv_parser_vk-1.0.0.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.0.tar.gz
Algorithm Hash digest
SHA256 7b7d6cb2b4b57ed2d0c23a34ac5f0edfa80c1ee35d83d1a6906c3d026ae5a10b
MD5 9a792fea851d3ff3765bd32e0d4f5cd5
BLAKE2b-256 dbf2f2d8b32e65f89790ba3654bf7b9580565c9d835d9990a9f59118f8a88b13

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for novikovtv_parser_vk-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 84b7cdde0a784fcf750871c63c0cf1e65ff38e89e78d7b1bf797f4165ab6c80a
MD5 32afd1b1d22eff07679627681c506fe1
BLAKE2b-256 9435e8858760c335c4c58bdf5167a6c28f7a67b38cbb8fd9296f0526f36d37a3

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