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.

Doesn't checks for valid termination

See original GitHub issue

For the following input:

from urlextract import URLExtract

extractor = URLExtract()
text="""
http://httpbin.org/status/204, http://httpbin.org/status/204.
"""
urls = extractor.find_urls(text)
print(urls)

The output generated is: ['http://httpbin.org/status/204,', 'http://httpbin.org/status/204.']

The set [.,?!-] are not valid terminal symbols for the url and thus should be checked.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
lipojacommented, Apr 9, 2018

OK, thanks. I will look to all your reported issues.

0reactions
karlicosscommented, Feb 26, 2019

In the meantime, one can hack (at least commas) via

    u = URLExtract()
    u._stop_chars_right |= {','}
    u._stop_chars_left  |= {','}

Perhaps sensible default is treating unconventional special characters as forbidden in url and adding a nicer constructor argument to allow to configure that if someone really wants them in URL?

Read more comments on GitHub >

github_iconTop Results From Across the Web

'Employment at Will' Isn't a Blank Check to Terminate ... - SHRM
Many small employers and, especially, their CEOs believe "employment at will" allows them to fire a worker for just about any reason.
Read more >
Final Paycheck Rules by State - LawInfo
For contract employees, the final paycheck amount cannot be determined until the contract is officially terminated. Once that occurs, the ...
Read more >
12 Things Everyone Should Know About Employment Law
A termination that is unfair is not necessarily illegal. In most circumstances, employers can terminate employees “at will,” meaning at any time for...
Read more >
Arizona Labor Laws on Termination Pay and Final Paychecks
If an employee is laid off, the employer is required to dispense their final paycheck within seven business days or by the next...
Read more >
Employee Terminations - MRSC
What are the Grounds for Which an Employee May Not Be Terminated? · The Termination May Not Be Based on the Employee's Age,...
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