URLExtract icon indicating copy to clipboard operation
URLExtract copied to clipboard

VCS/Git remote URLs not found

Open jayvdb opened this issue 4 years ago • 2 comments

[email protected]:snowplow/snowplow-python-tracker.git is not found

This can be found at https://pypi.org/project/minimal-snowplow-tracker/

>>> import urlextract
>>> e = urlextract.urlextract_core.URLExtract()
>>> e.find_urls('[email protected]:snowplow/snowplow-python-tracker.git')
[]

A good list of sample VCS links can be found at https://github.com/coala/git-url-parse/blob/master/test/conftest.py

jayvdb avatar Apr 05 '20 00:04 jayvdb

Also worth noting that pip VCS branch support @ causes no result if there is no path

>>> e.find_urls(' git+https://git.foobar.com@branch ')
[]
>>> e.find_urls(' git+https://git.foobar.com/@foo ')
['git+https://git.foobar.com/@foo']

jayvdb avatar Apr 05 '20 01:04 jayvdb

Hi @jayvdb or @lipoja I am interested to work on this issue.

So the expected result, we should return the git URL in this condition:

>>> e.find_urls('[email protected]:snowplow/snowplow-python-tracker.git')
['[email protected]:snowplow/snowplow-python-tracker.git']

Re: https://github.com/coala/git-url-parse/blob/master/test/conftest.py should we copy the URLs to test/unit/conftest.py?

za avatar Oct 22 '21 06:10 za