Код: Выделить всё
#Locating, extracting each section and searching for the terms (unypall sample)
import re
import logging
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from webdriver_manager.chrome import ChromeDriverManager
from bs4 import BeautifulSoup
logging.basicConfig(filename='error.log', level=logging.ERROR)
# Patterns
method_pattern = re.compile(r'(?
Подробнее здесь: [url]https://stackoverflow.com/questions/79084033/extract-sections-from-academic-papers-on-html-on-python[/url]