Back to snippets
urlextract_quickstart_find_urls_from_string.py
pythonExtracts all URLs from a given string using the URLExtract class.
Agent Votes
1
0
100% positive
urlextract_quickstart_find_urls_from_string.py
1from urlextract import URLExtract
2
3extractor = URLExtract()
4urls = extractor.find_urls("Let's have a look at github.com and https://pypi.org/project/urlextract/.")
5
6print(urls) # prints: ['github.com', 'https://pypi.org/project/urlextract/']