From 8839910e8eb9488e46ba1ca35c5f65f3206a645a Mon Sep 17 00:00:00 2001 From: Ilyaz Date: Sat, 21 Sep 2019 15:23:14 +0400 Subject: [PATCH] Update main.py Fix error: UnicodeEncodeError: 'ascii' codec can't encode characters in position 38-41: ordinal not in range(128) --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index b9f3ea9..307159e 100644 --- a/main.py +++ b/main.py @@ -79,7 +79,7 @@ def get_games(): if last_div: game_cost = last_div.getText().replace('(', '').replace(')', '').replace('P', '') - game_name = item.find('a', {'class': 'giveaway__heading__name'}).text + game_name = item.find('a', {'class': 'giveaway__heading__name'}).text.encode('utf-8') if int(points) - int(game_cost) < 0: print('Not enough points to enter: ' + game_name)