Added a new attribute when searching for URLs to return the URLs as well as beginning and ending indices: solve #71.
extractor = URLExtract()
example_text = "Text with URLs. Let's have URL janlipovsky.cz as an example."
for url in extractor.gen_urls(example_text, get_indices=True):
print(url) # prints: ('janlipovsky.cz', (31, 45))
By default, get_indices=False for code compatibility.
Added a new attribute when searching for URLs to return the URLs as well as beginning and ending indices: solve #71.
By default,
get_indices=False
for code compatibility.