From 2396e23ae4c42ce05dd56a139650f4f8b30575d0 Mon Sep 17 00:00:00 2001 From: eric Date: Mon, 25 Mar 2019 12:46:20 -0400 Subject: [PATCH] fix missing lang string --- core/loaders/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/loaders/__init__.py b/core/loaders/__init__.py index e47ca29b..c43ed6e7 100755 --- a/core/loaders/__init__.py +++ b/core/loaders/__init__.py @@ -55,6 +55,7 @@ def add_by_sitemap(url, maxnum=None): def scrape_language(url): scraper = get_scraper(url) - return scraper.metadata.get('language') + language = scraper.metadata.get('language') + return language if language else 'xx'