示例#1
0
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
示例#2
0
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