From 33f4b75417ae4ed79db7c2788414c618a6ba1d3c Mon Sep 17 00:00:00 2001 From: eric Date: Thu, 4 Jan 2018 16:53:29 -0500 Subject: [PATCH] stricter RE --- core/loaders/scrape.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/loaders/scrape.py b/core/loaders/scrape.py index 5dafa685..04a40e70 100644 --- a/core/loaders/scrape.py +++ b/core/loaders/scrape.py @@ -91,7 +91,7 @@ class BaseScraper(object): value = '' list_mode = attrs.pop('list_mode', 'longest') for meta_name in meta_list: - attrs['name'] = re.compile(meta_name, flags=re.I) + attrs['name'] = re.compile('^{}$'.format(meta_name), flags=re.I) metas = self.doc.find_all('meta', attrs=attrs) if len(metas) == 0: # some sites put schema.org metadata in metas