fbk_utils, a repository of general-purpose Facebook utilities. I write these types of utilites, mostly in Python, to fulfill a particular need, and only sparingly do I use them. They can be somewhat useful, and while they are horribly un-documented, I am aiming to change a lot of this by publishing it publicly.
For this public release, I'm releasing all code under an MIT license, that is, do whatever you would like to with the code, including using it for commercial purposes, but I will not be responsible for damages.
-
config.json
A sample (optional) configuration file, which is used by all scripts. Normally, this can reside in a .fbk directory in one's home directory ( ~/.fbk ). Alternatively, each of the utilities should support a -f runtime parameter to allow specifying the configuration file on the command line, e.g. $ ./fbk_fetch_3.py -f /some/absolute/path/config.json
-
fbk_sanitize.py
The original sanitization script. While this script is not currently available, the _sanitize script is the original inspiration for this project.
This script will become available if necessary, or if/when time allows.
-
fbk_sanitize_3.py
I re-wrote _sanitize under Python 3. That is this particular version.
-
fbk_fetch_3.py
Realizing that certain data is no longer available using the data downloader, I re-wrote _sanitize_3 a bit to do Graph API calls instead. The code has more than a few dependencies, which will be fleshed out over the course of this project.
I'm releasing 1.1, which is a much cleaner version of fbk_fetch_3.py.
-
fbk_publish_3.py
Publishes content to output files (currently only supports HTML in a rigid format). NOTE: This supports a hybrid output format, which combines the original output from _sanitize with the source from the local cache. Tread carefully when using the hybrid output, because it doesn't work well and should be re-written.
-
fbk_scrape_likes_3.py
Adds "like" data to the local db. This is a separate table that includes post_id and user_id. NOTE: In order for this data to be generated, fbk_fetch_3 must be run first.
-
fbk_cache.db
Automagically generated by fbk_fetch_3.py. This stores the raw data from Graph API locally so other utilities may act upon it. Some scripts (_publish_3.py) will not work properly if this file doesn't exist.
2016:
* Updated fbk_publish to support BS4.
* Added fbk_scrape_likes_3, to pull "likes". NOTE:
fbk_publish_3 must be run before scrape_likes.
* Cleaned up fbk_publish_3
Tim Wright 2011–16