Closed danielk56 closed 4 years ago
It's really easy, you could do it with pandas Dataframe, just load the Dataframe with the result and export it as csv.
Update to the latest commit, now you can export to CSV, Excel and JSON:
from FacebookPostsScraper import FacebookPostsScraper as Fps
from pprint import pprint as pp
# Enter your Facebook email and password
email = 'YOUR_EMAIL'
password = 'YOUR_PASWORD'
# Instantiate an object
fps = Fps(email, password, post_url_text='Full Story')
# Example with single profile
single_profile = 'https://www.facebook.com/BillGates'
fps.get_posts_from_profile(single_profile)
fps.posts_to_csv('my_posts') # You can export the posts as CSV document
fps.posts_to_excel('my_posts') # You can export the posts as Excel document
fps.posts_to_json('my_posts') # You can export the posts as JSON document
How would I be able to convert the results into a CSV file?