Skip to content

Commit

Permalink
args.word list converted to str
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp Jonczyk committed Apr 26, 2019
1 parent 14b034e commit d53dc08
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dictcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,14 @@ def parse_suggestions(html):
return data

def main(args):
c = request(' '.join(args.word), args.prim, args.sec)
words = ' '.join(args.word)
c = request(words, args.prim, args.sec)
data = parse_response(c)

if data:
print(tabulate(data, [args.prim, args.sec], tablefmt='orgtbl'))
else:
print(' '.join(["No translation found for:", args.word]))
print(' '.join(["No translation found for:", words]))
suggestions = parse_suggestions(c)
print('\nHere are suggestions given by dict.cc:')
for s in suggestions:
Expand Down

0 comments on commit d53dc08

Please sign in to comment.