Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug with flag allow_mixed_case_hostname=False #151

Closed
GokulNC opened this issue Apr 19, 2023 · 4 comments
Closed

Bug with flag allow_mixed_case_hostname=False #151

GokulNC opened this issue Apr 19, 2023 · 4 comments

Comments

@GokulNC
Copy link

GokulNC commented Apr 19, 2023

Thanks for this great library!

Example issue:

>>> import urlextract
>>> url_extractor = urlextract.URLExtract()
>>> url_extractor.allow_mixed_case_hostname = False
>>> url_extractor.find_urls("main_data_site.group.popular_data_desc")
['main_data_site.group.popular_data_desc']
>>> url_extractor.allow_mixed_case_hostname = True
>>> url_extractor.find_urls("main_data_site.group.popular_data_desc")
[]

Why is there such false-positives with allow_mixed_case_hostname=False ? @lipoja

@GokulNC
Copy link
Author

GokulNC commented Apr 26, 2023

Found even more worse false-positive: @lipoja

>>> url_extractor.allow_mixed_case_hostname = False
>>> url_extractor.find_urls("144.2 MB")
['144.2']

@lipoja
Copy link
Owner

lipoja commented Apr 26, 2023

@GokulNC Thank you for reporting it. If you have time for PR that would be nice and welcome.
Otherwise I would like to ask you to keep reporting broken thing and wait a little bit for a fix from my side.
I do not have much free time right now. My guess is that I can take a look in a month :(

@GokulNC
Copy link
Author

GokulNC commented Apr 26, 2023

No problem, thanks :)

@lipoja
Copy link
Owner

lipoja commented Feb 26, 2024

Should be fixed in next release

@lipoja lipoja closed this as completed Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants