Skip to content

Commit

Permalink
refactor: avoid superfluous conditionnal check
Browse files Browse the repository at this point in the history
  • Loading branch information
s-pace committed Sep 3, 2020
1 parent d74eac3 commit d175070
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions scraper/src/strategies/default_strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,8 @@ def get_records_from_dom(self, current_page_url=None):

if name == "version":
version = str(content)
# When version is a comma-separated tokens
if ',' in version:
record[name] = [token.strip() for token in version.split(",")]
else:
record[name] = version
# Handle version as comma-separated tokens
record[name] = [token.strip() for token in version.split(",")]

if current_page_url is not None:
# Add variables to the record
Expand Down

0 comments on commit d175070

Please sign in to comment.