minimaxir/facebook-page-post-scraper

codec can't encode character

Thunderbolt1989 opened this issue · 2 comments

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!

This sounds the same as issue #74.

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