change
url_find('.')
to url_rfind('.')
will give you what you wantOutput:>>> url = 'wikipedia.com'
>>> print(url[:url.rfind('.')])
wikipedia
>>> url = 'en.wikipedia.com'
>>> print(url[:url.rfind('.')])
en.wikipedia
I welcome all feedback.
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags