Skip to content

Commit

Permalink
Bug fix: don't override SearchEngineParser params if the param is Fal…
Browse files Browse the repository at this point in the history
…se-y
  • Loading branch information
msukmanowsky committed Sep 10, 2015
1 parent 038ac2d commit 05f2576
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions serpextract/serpextract.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,13 @@ def _get_search_engines():
# Default args for SearchEngineParser
args = [engine_name, defaults['extractor'],
defaults['link_macro'], defaults['charsets']]
if len(rule) >= 1:
if len(rule) >= 1 and rule[0]:
args[1] = rule[0]

if len(rule) >= 2:
if len(rule) >= 2 and rule[1]:
args[2] = rule[1]

if len(rule) == 3:
if len(rule) == 3 and rule[2]:
args[3] = rule[2]

_engines[domain] = SearchEngineParser(*args)
Expand Down

0 comments on commit 05f2576

Please sign in to comment.