Skip to content

Commit

Permalink
removed eval from search cli method
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-pavlov committed Oct 27, 2022
1 parent 5755105 commit 29d5b1f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/searchor/main.py
Expand Up @@ -29,9 +29,7 @@ def cli():
@click.argument("query")
def search(engine, query, open, copy):
try:
url = eval(
f"Engine.{engine}.search('{query}', copy_url={copy}, open_web={open})"
)
url = Engine[engine].search(query, copy_url=copy, open_web=open)
click.echo(url)
searchor.history.update(engine, query, url)
if open:
Expand Down

0 comments on commit 29d5b1f

Please sign in to comment.