Files
osint_parser_ada/config.py
T
ada 12d5c6eaff feat: Add data models for disciplinary actions, organizations, and training centers
- Implemented DisciplinaryAction model for tracking disciplinary measures.
- Created Organization model to represent auditing organizations with relevant details.
- Developed TrainingCenter model for educational and methodological centers.
- Added methods to convert models to dictionaries for easy export.

feat: Implement parsers for auditors and organizations

- Developed AuditorsParser to scrape and parse auditor registry data.
- Created OrganizationsParser for scraping auditing organizations' registry.
- Implemented GenericRegistryParser for handling generic tabular data.

chore: Set up base parser functionality

- Established BaseParser class with common methods for making requests and parsing HTML.
- Added pagination handling and detailed page parsing capabilities.

feat: Implement Excel export functionality

- Created ExcelExporter class for exporting data to Excel files with formatting options.
- Added support for exporting multiple sheets and organization data specifically.

chore: Add logging utilities

- Implemented setup_logger function for consistent logging across the application.
- Configured logging to output to both console and file.

chore: Update requirements and scripts

- Added necessary dependencies for parsing, Excel handling, and logging.
- Created run.sh and run.fish scripts for easy execution of the parser.
2025-10-25 20:31:45 +03:00

107 lines
4.6 KiB
Python

"""
Конфигурационный файл парсера СРО ААС
"""
# Базовые настройки
BASE_URL = "https://sroaas.ru"
# URL реестров
REGISTRIES = {
# Реестры действительных членов и выданных аттестатов
"auditors": {
"name": "Реестр членов — аудиторов и индивидуальных аудиторов",
"url": f"{BASE_URL}/reestr/auditory/",
"active": True,
},
"organizations": {
"name": "Реестр членов — аудиторских организаций",
"url": f"{BASE_URL}/reestr/organizatsiy/",
"active": True,
},
"certificates": {
"name": "Реестр выданных СРО ААС квалификационных аттестатов аудитора",
"url": f"{BASE_URL}/reestr/reestr-vydannykh-sro-aas-kvalifikatsionnykh-attestatov-auditora/",
"active": True,
},
"individual_auditors": {
"name": "Перечень индивидуальных аудиторов",
"url": f"{BASE_URL}/reestr/ia/",
"active": True,
},
"training_centers": {
"name": "Реестр учебно-методических центров",
"url": f"{BASE_URL}/reestr/umc/",
"active": True,
},
"oppk_confirmation": {
"name": "Сведения о подтверждении ОППК аудиторами",
"url": f"{BASE_URL}/reestr/oppk/",
"active": True,
},
"ozo_training": {
"name": "Сведения о прохождении ПК руководителем аудита ОЗО ФР",
"url": f"{BASE_URL}/reestr/pcozo/",
"active": True,
},
# Реестры исключенных членов и аннулированных аттестатов
"excluded_auditors": {
"name": "Реестр аудиторов, прекративших членство в СРО ААС",
"url": f"{BASE_URL}/reestr/reestr-auditorov-prekrativshikh-chlenstvo-v-sro-aas/",
"active": True,
},
"excluded_organizations": {
"name": "Реестр аудиторских организаций, прекративших членство в СРО ААС",
"url": f"{BASE_URL}/reestr/reestr-auditorskikh-organizatsiy-prekrativshikh-chlenstvo-v-sro-aas/",
"active": True,
},
"cancelled_certificates": {
"name": "Реестр аннулированных СРО ААС квалификационных аттестатов аудитора",
"url": f"{BASE_URL}/reestr/reestr-annulirovannykh-sro-aas-kvalifikatsionnykh-attestatov-auditora/",
"active": True,
},
"excluded_training_centers": {
"name": "УМЦ, исключенные из реестра СРО ААС",
"url": f"{BASE_URL}/reestr/umc-prekrativshikh-chlenstvo/",
"active": True,
},
# Реестры дисциплинарных мер
"disciplinary_auditors": {
"name": "Меры дисциплинарного воздействия к членам СРО ААС - аудиторам",
"url": f"{BASE_URL}/reestr/mery-distsiplinarnogo-vozdeystviya-k-chlenam-sro-aas/",
"active": True,
},
"disciplinary_organizations": {
"name": "Меры дисциплинарного воздействия к членам СРО – аудиторским организациям",
"url": f"{BASE_URL}/reestr/mery-distsiplinarnogo-vozdeystviya-k-chlenam-sro-aas-organizatsiy/",
"active": True,
},
# Перечень сетей
"audit_networks": {
"name": "Перечень российских и международных сетей аудиторских организаций",
"url": f"{BASE_URL}/reestr/seti-auditorskikh-organizatsiy",
"active": True,
},
}
# Настройки парсера
PARSER_CONFIG = {
"timeout": 30, # таймаут запроса в секундах
"delay_between_requests": 1, # задержка между запросами в секундах
"max_retries": 3, # максимальное количество попыток
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
}
# Настройки экспорта
EXPORT_CONFIG = {
"output_dir": "data/exports/",
"date_format": "%Y-%m-%d_%H-%M-%S",
"encoding": "utf-8",
}
# Настройки логирования
LOGGING_CONFIG = {
"level": "INFO",
"format": "%(asctime)s - %(name)s - %(levelname)s - %(message)s",
"log_dir": "logs/",
}