Code Monkey home page Code Monkey logo

memedensity's Introduction

M E M E   D E N S I T Y

Tells you the approximate amount of memes in your facebook newsfeed.

alt tag

Preface

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">

They are labeling the images using a Deep ConvNet built by Facebook's FAIR team team.

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.

Thank you ageitgey for originally finding out about this.
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.

Dependencies

PhantomJS or any other webdriver.

MacOS

brew install phantomjs

Linux

sudo apt-get install phantomjs

Windows

Download and set in environment variables

Installing

From Source:

Check out the latest release

or
$ git clone https://github.com/kalbhor/MemeDensity
$ cd MemeDensity
$ python setup.py install

From PyPI:

$ 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()

Options

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

Usage

$ memedensity

Contributing

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.

License

memedensity's People

Contributors

kalbhor avatar tkellogg avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.