Notes and activities from a Google+ page

After searching for a Google+ page and visualizing the results in a web GUI, we will proceed to download a list of activities for a given page. Activities are the Google+ equivalent of Facebook posts. By default, an activity is considered to be a note, that is, a piece of text shared on Google+.

The following script, gplus_get_page_activities.py, is used to collect a list of activities from a Google+ page:

# Chap05/gplus_get_page_activities.py import os import json from argparse import ArgumentParser from apiclient.discovery import build def get_parser(): parser = ArgumentParser() parser.add_argument('--page') parser.add_argument('--max-results', type=int, default=100) return parser if __name__ == '__main__': ...

Get Mastering Social Media Mining with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.