URLExtract

1.9.0 · active · verified Sun Apr 12

URLExtract is a Python library for collecting and extracting URLs from a given text based on locating Top-Level Domains (TLDs). It is currently at version 1.9.0 and is actively maintained, with regular updates to its TLD list and ongoing Python version compatibility.

Warnings

Install

Imports

Quickstart

Initializes the URLExtract class and uses the `find_urls` method to extract all URLs from a given text string.

from urlextract import URLExtract

extractor = URLExtract()
text = "Check out our website: example.com or find us at https://www.another-example.org/path?query=1"
urls = extractor.find_urls(text)

print(urls)
# Expected output: ['example.com', 'https://www.another-example.org/path?query=1']

view raw JSON →