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

Failed to parse URL correctly #38

Closed
ninoseki opened this issue Feb 14, 2020 · 2 comments · Fixed by #45
Closed

Failed to parse URL correctly #38

ninoseki opened this issue Feb 14, 2020 · 2 comments · Fixed by #45
Assignees
Projects

Comments

@ninoseki
Copy link
Contributor

A URL which is surrounded by Japanese characters is not parsed correctly.

print(list(iocextract.extract_urls('『http://example.com』あああああ')))
# => ['http://example.com』あああああ']

# My expectation is ['http://example.com']

I'm not sure how to fix it. But I think checking TLD might work well.

@cmmorrow cmmorrow self-assigned this May 22, 2020
@cmmorrow cmmorrow added this to To do in Issues via automation May 22, 2020
@cmmorrow
Copy link
Contributor

Hello @ninoseki, I'll take a look at this and see if I can adjust the regular expression to get this to work.

@cmmorrow
Copy link
Contributor

I think I have a solution. This works:

echo "『http://example.com』インコ\u1f99c" | python iocextract.py
http://example.com

@cmmorrow cmmorrow linked a pull request May 23, 2020 that will close this issue
Issues automation moved this from To do to Done Jul 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Issues
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants