Tags markup stabilization

This commit is contained in:
Soxoj
2021-05-08 00:59:54 +03:00
parent 158f739a59
commit f77d7d307a
4 changed files with 192 additions and 236 deletions
+9 -9
View File
@@ -37,15 +37,15 @@ def get_rank(domain_to_query, site, print_errors=True):
try:
#Get ranking for this site.
site.alexa_rank = int(root.find('.//REACH').attrib['RANK'])
country = root.find('.//COUNTRY')
if not country is None and country.attrib:
country_code = country.attrib['CODE']
tags = set(site.tags)
if country_code:
tags.add(country_code.lower())
site.tags = sorted(list(tags))
if site.type != 'username':
site.disabled = False
# country = root.find('.//COUNTRY')
# if not country is None and country.attrib:
# country_code = country.attrib['CODE']
# tags = set(site.tags)
# if country_code:
# tags.add(country_code.lower())
# site.tags = sorted(list(tags))
# if site.type != 'username':
# site.disabled = False
except Exception as e:
if print_errors:
logging.error(e)