From cca9c3024ae72e9000d762677a44ce3eef2f1f40 Mon Sep 17 00:00:00 2001 From: zein Date: Mon, 3 Nov 2025 00:07:07 +0300 Subject: [PATCH] =?UTF-8?q?=D0=92=D1=80=D0=BE=D0=B4=D0=B5=20=D0=B1=D1=8B?= =?UTF-8?q?=20=D0=BA=D0=B0=D0=BA=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=B0?= =?UTF-8?q?=D0=B5=D1=82.=20=D0=94=D0=BE=D0=BB=D0=B6=D0=BD=D0=B0=20=D0=B1?= =?UTF-8?q?=D1=80=D0=B0=D1=82=D1=8C=20=D0=BF=D0=BE=D1=81=D0=BB=D0=B5=D0=B4?= =?UTF-8?q?=D0=BD=D0=B8=D0=B9=20id=20=D0=B8=D0=B7=20=D0=BC=D0=BE=D0=BD?= =?UTF-8?q?=D0=B3=D0=BE,=20=D0=B8=D0=B4=D1=82=D0=B8=20=D0=BD=D0=B0=20?= =?UTF-8?q?=D1=81=D0=B0=D0=B9=D1=82=20=D0=B8=20=D0=BF=D0=B0=D1=80=D1=81?= =?UTF-8?q?=D0=B8=D0=B8=D1=82=D1=8C=20=D0=BC=D0=B0=D0=BD=D0=B3=D1=83=20?= =?UTF-8?q?=D0=BF=D0=BE=D0=BA=D0=B0=20=D0=BD=D0=B5=20=D0=BD=D0=B0=D1=82?= =?UTF-8?q?=D0=BA=D0=BD=D0=B5=D1=82=D1=8C=D1=81=D1=8F=20=D0=BD=D0=B0=20?= =?UTF-8?q?=D1=8D=D1=82=D0=BE=D1=82=20id.=20=D0=BF=D0=BE=D1=82=D0=BE=D0=BC?= =?UTF-8?q?=20=D1=81=D0=BE=D0=B1=D0=B8=D1=80=D0=B0=D1=82=D1=8C=20=D0=B2?= =?UTF-8?q?=D1=81=D0=B5=20=D0=B2=20=D1=84=D0=B0=D0=B9=D0=BB,=20=D0=B0=20?= =?UTF-8?q?=D0=BF=D0=BE=D1=82=D0=BE=D0=BC=20=D0=BF=D1=83=D1=88=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20=D0=B2=20=D0=B1=D0=B0=D0=B7=D1=83.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Serch_H.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Serch_H.py b/Serch_H.py index c940d1f..300b509 100644 --- a/Serch_H.py +++ b/Serch_H.py @@ -2,12 +2,13 @@ from bs4 import BeautifulSoup as bs import requests import HBD -link = 'https://x3.h-chan.me/manga/newest?offset=' +link = 'https://x8.h-chan.me/manga/newest?offset=' #https://x8.h-chan.me/manga/ result = HBD.find_doc_with_max_id(HBD.connect_to_mongo()) max_id = '51196' max_num = 29915 + def form_date(date_str): months = { "января": "01", @@ -47,7 +48,7 @@ def try_request(link, max_retries=50): except: retries += 1 -def pars(link, flag): +def pars(link, flag, count): data_hantai = {} response = try_request(link) @@ -93,16 +94,22 @@ def pars(link, flag): 'original_id' : ID, } + print(f'стр - {count}', data_hantai) + + for i, j in data_hantai.items(): + print('-'*10, i, j['manga_link']) - print(data_hantai) return data_hantai, flag def get_data(): data = {} + count = 1 for i in range(0, 5000, 20): + flag = False - data_hantai, flag = pars(link + str(i), flag) + data_hantai, flag = pars(link + str(i), flag, count) + count +=1 data.update(data_hantai)