change block

This commit is contained in:
2024-11-18 13:38:24 +03:30
parent e6348b0c52
commit a7f31416b4

View File

@@ -32,7 +32,7 @@ def make_message(html: str) -> str:
soup = BeautifulSoup(html, 'html.parser') soup = BeautifulSoup(html, 'html.parser')
# table = soup.find('table', id='ctl01_ctl00_myDataList') # table = soup.find('table', id='ctl01_ctl00_myDataList')
block_needle = 'بلوک A2' block_needle = 'بلوک A4'
try: try:
paragraphs = soup.find_all('p') paragraphs = soup.find_all('p')
block = soup.find('p', string=lambda text: isinstance(text, str) and block_needle in text) block = soup.find('p', string=lambda text: isinstance(text, str) and block_needle in text)