diff --git a/get_fb_posts_fb_page.py b/get_fb_posts_fb_page.py index 812a074..64587bb 100644 --- a/get_fb_posts_fb_page.py +++ b/get_fb_posts_fb_page.py @@ -2,6 +2,7 @@ import datetime import csv import time +import codecs try: from urllib.request import urlopen, Request except ImportError: @@ -23,7 +24,8 @@ def request_until_succeed(url): success = False while success is False: try: - response = urlopen(req) + reader = codecs.getreader("utf-8") + response = reader(urlopen(req)) if response.getcode() == 200: success = True except Exception as e: