Skip to content

A Smart, Automatic, Fast and Lightweight Web Scraper for Python

Update auto_scraper.py

Alireza Mika9e6fc574e262
diff --git a/autoscraper/auto_scraper.py b/autoscraper/auto_scraper.py
index 736057e..1dd546b 100644
--- a/autoscraper/auto_scraper.py
+++ b/autoscraper/auto_scraper.py
@@ -45,7 +45,7 @@ class AutoScraper(object):
@staticmethod
def _get_valid_attrs(item):
return {
- k: v if v is not [] else '' for k, v in item.attrs.items() if k in {'class', 'style'}
+ k: v if v != [] else '' for k, v in item.attrs.items() if k in {'class', 'style'}
}
def _child_has_text(self, child, text):