Closed tkrissuu closed 2 years ago
I am seeing a strange behaviour when finding URLs with indices. It is triggered when the TLD is also present earlier in the domain name. In the example below ".com" appears twice. But it will also fail with e.g. "www.dk-hostmaster.dk".
To reproduce:
from urlextract import URLExtract extractor = URLExtract() urls = extractor.find_urls("www.company.com", get_indices=True) print(urls[0])
Output is: ('www.company.com', (8, 23))
('www.company.com', (8, 23))
I would have expected: ('www.company.com', (0, 15))
('www.company.com', (0, 15))
@tkrissuu Thank you for reporting this issue. Nice catch! I know what is the issue here and I will send fix soon.
@tkrissuu It should be fixed in v1.5.0. Thanks!
@lipoja Awesome. Thanks! That was quick.
I am seeing a strange behaviour when finding URLs with indices. It is triggered when the TLD is also present earlier in the domain name. In the example below ".com" appears twice. But it will also fail with e.g. "www.dk-hostmaster.dk".
To reproduce:
Output is:
('www.company.com', (8, 23))
I would have expected:
('www.company.com', (0, 15))