You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This Issue is simply resolved by changing "with open('%s_facebook_posts.csv' % page_id, 'wb') as file:" to "with open('%s_facebook_posts.csv' % page_id, 'w') as file:"
This code was written in python2 while you are using python3. Python2 takes input as a byte while python3 takes as str. So change the parameter 'wb' to 'w' while opening the csv (in scrape_facebook_page function). hope you got the point.
Hi,
I'm trying to execute the scraper on my machine (MacBook Pro - 10.15.1). I'm using Jupyter notebook (6.0.2) and Python 3.7.3.
When I try to execute the notebook I get following error:
TypeError: a bytes-like object is required, not 'str'
I also uploaded the respective output as a screenshot. Can anyone advise here?
The text was updated successfully, but these errors were encountered: