From bb599b888030495cd0eca156c3b49684c69780f0 Mon Sep 17 00:00:00 2001 From: Ilia Miheev Date: Mon, 5 May 2025 15:39:11 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D0=BC=D0=B5=D1=82=D0=BE=D0=B4=20pprint=20=D0=B2=20?= =?UTF-8?q?=D0=BA=D0=BB=D0=B0=D1=81=D1=81=D1=8B=20JsonManager=20=D0=B8=20C?= =?UTF-8?q?svManager=20=D0=B4=D0=BB=D1=8F=20=D0=BF=D0=BE=D0=BA=D0=B0=D0=B7?= =?UTF-8?q?=D0=B0=20=D1=81=D0=BE=D0=B4=D0=B5=D1=80=D0=B6=D0=B8=D0=BC=D0=BE?= =?UTF-8?q?=D0=B3=D0=BE=20=D0=B2=D0=BB=D0=BE=D0=B6=D0=B5=D0=BD=D1=8B=D1=85?= =?UTF-8?q?=20=D0=BF=D0=B5=D1=80=D0=B5=D0=BC=D0=B5=D0=BD=D1=8B=D1=85=20?= =?UTF-8?q?=D0=B2=20=D1=87=D0=B8=D1=82=D0=B0=D0=B5=D0=BC=D0=BE=D0=BC=20?= =?UTF-8?q?=D1=84=D0=BE=D1=80=D0=BC=D0=B0=D1=82=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ipars/module.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ipars/module.py b/ipars/module.py index b1c7806..d98d192 100644 --- a/ipars/module.py +++ b/ipars/module.py @@ -1,8 +1,9 @@ from selenium.webdriver.chrome.options import Options -import requests from selenium import webdriver from bs4 import BeautifulSoup +from pprint import pprint from time import sleep +import requests import json import csv @@ -15,6 +16,9 @@ class CsvManager: self.encoding = encoding self.delimiter = delimiter + def pprint(self, data:any): + pprint(data) + def writerow(self, file_path:str, mode:str, row:list): '''Записываем строку в csv файл''' with open(file_path, mode=mode, newline=self.newline, encoding=self.encoding) as file: @@ -45,6 +49,9 @@ class JsonManager: def __init__(self, encoding:str='utf8'): self.encoding = encoding + def pprint(self, data:any): + pprint(data) + def load(self, pathToJsonFile:str): '''Получаем данные из json файла''' with open(pathToJsonFile, encoding=self.encoding) as jsonFile: