question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[request] URLExtract.has_url

See original GitHub issue

Thanks for the package. I was very happy to find it. For runtime efficiency, I would like to request a has_url(text) method. The point is that in this use case, I only need to know if there is at least one URL in the input string, and so I want a boolean value returned. I am currently using find_urls(text) and this works, but this is obviously less efficient in the case of a large input string.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
lipojacommented, Jun 26, 2017

Thank you for using this package. I will try add this feature: detect if the text contains at least one URL as fast as possible. I would like to ask you if you could test it before it goes to master branch. I will tell you when the code is ready. Thank you.

0reactions
impredicativecommented, Jul 4, 2017

urlextract 0.4 works well. 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

URLExtract class — urlextract 1.7.1 documentation
print(urls) # prints: ['example.com'] # Another way is to get a generator over found URLs in text: for url in extractor.gen_urls(example_text): print(url) ...
Read more >
urlextract
URLExtract is python class for collecting (extracting) URLs from given text based on locating TLD. ... Or you can get generator over URLs...
Read more >
extracting all the urls from a website using urlextract
So I came across this package called as urlextract ...
Read more >
How to use the urlextract.URLExtract function in urlextract
To help you get started, we've selected a few urlextract.URLExtract examples, based on popular ways it is used in public projects.
Read more >
How can I extract URL in website with begin of https://edge
I want your help to check this code below, I try to create a program which can help me to extract the URL...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found