Skip to content

Commit

Permalink
add data
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabrielolobo committed Jun 1, 2023
1 parent 68c2b39 commit eb0280d
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions crawley/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@

# Calls crawler results
def main(args):
output_callable = get_output(args.output)
output_callable = get_output(args.output, args.data)

all_results = []
for crawler in AVAILABLE_CRAWLERS.values():
results = crawler.run()
all_results.extend(results)
crawler = AVAILABLE_CRAWLERS[args.crawler]
results = crawler.run()

output_callable(all_results)
output_callable(results)


if __name__ == "__main__":
Expand All @@ -24,7 +22,7 @@ def main(args):
)

cli_parser.add_argument(
'output', choices=['print', 'save json', 'save csv'])
'output', choices=['print', 'save_json', 'save_csv'])

args = cli_parser.parse_args()
main(args)

0 comments on commit eb0280d

Please sign in to comment.