コード例 #1
0
ファイル: chat_message.py プロジェクト: marchon/frappe_old2
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
ファイル: chat_message.py プロジェクト: ESS-LLP/frappe
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