soup = BeautifulSoup(data, 'html.parser') soup_en = BeautifulSoup(data_en, 'html.parser') result = [] for result_table in soup.find_all('li', class_='b_algo'): big_title = result_table.find("h2") title = big_title.get_text() res_url = r"(?<=href=\").+?(?=\")|(?<=href=\').+?(?=\')" link = re.findall(res_url, str(big_title), re.I | re.S | re.M)[0] details = result_table.find("p")