def get_message_urls(content): soup = Soup(content, 'html.parser') anchors = soup.find_all('a') urls = [] for anchor in anchors: text = anchor.text if check_url(text): urls.append(text) return urls
def get_message_urls(content): soup = Soup(content, 'html.parser') anchors = soup.find_all('a') urls = [ ] for anchor in anchors: text = anchor.text if check_url(text): urls.append(text) return urls