tld extract bug fix

This commit is contained in:
usmannasir
2024-09-08 00:25:23 +05:00
parent e78cc6f485
commit 7284ab70a8
6 changed files with 25 additions and 57 deletions

View File

@@ -2859,18 +2859,11 @@ class CloudManager:
zones = cf.zones.get(params = {'per_page':100})
command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.6/site-packages/tldextract/.suffix_cache'
ProcessUtilities.executioner(command)
command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache'
ProcessUtilities.executioner(command)
command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python*/site-packages/tldextract/.suffix_cache'
ProcessUtilities.executioner(command, None, True)
for website in Websites.objects.all():
import tldextract
extractDomain = tldextract.extract(website.domain)
no_cache_extract = tldextract.TLDExtract(cache_dir=None)
extractDomain = no_cache_extract(website.domain)
topLevelDomain = extractDomain.domain + '.' + extractDomain.suffix
for zone in zones:
@@ -2920,7 +2913,8 @@ class CloudManager:
for website in ChildDomains.objects.all():
import tldextract
extractDomain = tldextract.extract(website.domain)
no_cache_extract = tldextract.TLDExtract(cache_dir=None)
extractDomain = no_cache_extract(website.domain)
topLevelDomain = extractDomain.domain + '.' + extractDomain.suffix
for zone in zones: