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

two part domain names #1235

Closed
simonmcnair opened this issue May 5, 2022 · 2 comments
Closed

two part domain names #1235

simonmcnair opened this issue May 5, 2022 · 2 comments

Comments

@simonmcnair
Copy link
Contributor

simonmcnair commented May 5, 2022

please can #353 be reopened as pynamecheap is no longer used and there are issues with handling two part domains such as .co.uk

I suspect this won't just apply to namecheap ?

Thanks :-)

@simonmcnair simonmcnair changed the title namecheap issues two part domain names May 6, 2022
@simonmcnair
Copy link
Contributor Author

I have got this working, I think by modifying /usr/local/lib/python3.9/site-packages/lexicon/providers/namecheap.py ( https://github.com/AnalogJ/lexicon/blob/master/lexicon/providers/namecheap.py)

I added:

import tldextract

and then replacing all the occurrences of:

    sld, tld = domain.split(".")

with:

    extracted = tldextract.extract(domain)
    sld = extracted.domain
    tld = extracted.suffix

@adferrand
Copy link
Collaborator

Closed by #1237

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants