misp-galaxy/tools/tidal-api/utils/extractor.py

6 lines
165 B
Python
Raw Normal View History

2024-02-21 16:24:48 +01:00
import re
def extract_links(text):
links = re.findall(r'\[([^\]]+)\]\((https?://[^\s\)]+)\)', text)
urls = set([url for text, url in links])
return urls