M E M E D E N S I T Y
Tells you the approximate amount of memes in your facebook newsfeed.
Since April 2016, Facebook has been automatically adding alt tags to all images with keywords representing the content of the images:
<img csrc="https://facebook.com/some-url.jpg" alt="Image may contain: golf, grass, outdoor and nature" width="316" height="237">
On one hand, this is really great. It improves accessibility for blind users who depend on screen readers which are only capable of processing text. But raises privacy concerns too.
ageitgey for originally finding out about this.Thank you
Anyhow, this script uses this addition by Facebook to it's advantage. MemeDensity reads alt tags of the images in your newsfeed and lets you know the quantity of memes on your feed.
Since Facebook doesn't directly allow fetching the newsfeed from its API, this script uses Selenium and PhantomJS to simulate a surf through the newsfeed.
PhantomJS or any other webdriver.
brew install phantomjs
sudo apt-get install phantomjs
Check out the latest release
$ git clone https://github.com/kalbhor/MemeDensity $ cd MemeDensity $ python setup.py install
$ pip install memedensity
If you'll be using a different webdriver (Not PhantomJS), simply edit MemeDensity/command_line.py and add your webdriver
driver = webdriver.PhantomJS()
optional arguments: -h, --help show this help message and exit -C, --count How many times to scroll newsfeed (default = 5) -L, --login Input login credentials -v, --verbose Shows meme urls
Currently this project is in its infancy and issues are bound to arise. If the script throws an exception, please make sure to check your running processes to see whether the webdriver has been closed or not. To contribute, post issues without hesitation and open pull requests to add/improve features.