Skip to content

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

refactor: use or branching instead of if-else

cthulhu-irl40739265e8c0
diff --git a/autoscraper/auto_scraper.py b/autoscraper/auto_scraper.py
index b33cf78..c57a9de 100644
--- a/autoscraper/auto_scraper.py
+++ b/autoscraper/auto_scraper.py
@@ -28,7 +28,7 @@ class AutoScraper(object):
@classmethod
def _get_soup(cls, url=None, html=None, request_args=None):
- request_args = request_args if request_args else {}
+ request_args = request_args or {}
if html:
return BeautifulSoup(html, 'lxml')