minimaxir / facebook-page-post-scraper

Data scraper for Facebook Pages, and also code accompanying the blog post How to Scrape Data From Facebook Page Posts for Statistical Analysis
2.12k stars 663 forks source link

codec can't encode character #81

Closed Thunderbolt1989 closed 6 years ago

Thunderbolt1989 commented 6 years ago

Hi, I'm trying out this facebook scraper but am facing some issues

page_id = "ChannelNewsAsia"

Traceback (most recent call last): File "C:\Users\E044008\My Documents\LiClipse Workspace\FB Scraper\Page Scraper.py", line 184, in scrapeFacebookPageFeedStatus(page_id, access_token, since_date, until_date) File "C:\Users\E044008\My Documents\LiClipse Workspace\FB Scraper\Page Scraper.py", line 166, in scrapeFacebookPageFeedStatus w.writerow(status_data + reactions_data + (num_special,)) File "C:\Users\E044008\AppData\Local\Programs\Python\Python36-32\lib\encodings\cp1252.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_table)[0] UnicodeEncodeError: 'charmap' codec can't encode character '\U0001f98f' in position 101: character maps to

I'm facing similar issues with some other pages I would like to scrape. Is it a problem where I have to update the codecs?

Thank you!

dsynkov commented 6 years ago

This sounds the same as issue #74.

Thunderbolt1989 commented 6 years ago

Hi @dmitriy5 , thank you for pointing me into the correct direction!