Skip to content

cannot parse github url #43

@nasifimtiazohi

Description

@nasifimtiazohi

fails to parse 'https://github.com/rubygems/rubygems/'. The issue arises from having a / character at the end.

>>> from giturlparse import parse
>>> s = 'https://github.com/rubygems/rubygems/'
>>> p = parse(s)
>>> p.host
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/nasifimtiaz/Library/Caches/pypoetry/virtualenvs/package-locator-2SDQOXag-py3.9/lib/python3.9/site-packages/giturlparse/result.py", line 43, in host
    return self.domain
AttributeError: 'GitUrlParsed' object has no attribute 'domain'
>>> p.owner
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'GitUrlParsed' object has no attribute 'owner'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions