url = "https://www.pravda.com.ua/rus/news/"
headers = {'User-Agent':"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 OPR/93.0.0.0"}
response = requests.get(url, headers=headers)
soup = BeautifulSoup(response.text, "lxml")
link = soup.find('div', class_="container_sub_news_list_wrapper mode1").find('div', class_= "article_header")
def get_url(string: str) -> str:
url = string[string.find('https') : string.find('" target')]
return url