Giter Club home page Giter Club logo

persine's Introduction

Documentation Status

Persine, the Persona Engine

Persine is an automated tool to study and reverse-engineer algorithmic recommendation systems. It has a simple interface and encourages reproducible results. You tell Persine to drive around YouTube and it gives back a spreadsheet of what else YouTube suggests you watch!

Persine => Pers[ona Eng]ine

For example!

People have suggested that if you watch a few lightly political videos, YouTube starts suggesting more and more extreme content – but does it really?

The theory is difficult to test since it involves a lot of boring clicking and YouTube already knows what you usually watch. Persine to the rescue!

  1. Persine starts a new fresh-as-snow Chrome
  2. You provide a list of videos to watch and buttons to click (like, dislike, "next up" etc)
  3. As it watches and clicks more and more, YouTube customizes and customizes
  4. When you're all done, Persine will save your winding path and the video/playlist/channel recommendations to nice neat CSV files.

Beyond analysis, these files can be used to repeat the experiment again later, seeing if recommendations change by time, location, user history, etc.

If you didn't quite get enough data, don't worry – you can resume your exploration later, picking up right where you left off. Since each "persona" is based on Chrome profiles, all your cookies and history will be safely stored until your next run.

An actual example

See Persine in action on Google Colab.

Includes a few examples for analysis, too.

Installation

pip install persine

Persine will automatically install Selenium and BeautifulSoup for browsing/scraping, pandas for data analysis, and pillow for processing screenshots.

You will need to manually install chromedriver to allow Selenium to control Chrome. See details here

Quickstart

In this example, we start a new session by visiting a YouTube video and clicking the "next up" video three times to see where it leads us. We then save the results for later analysis.

from persine import PersonaEngine

engine = PersonaEngine(headless=False)

with engine.persona() as persona:
    persona.run("https://www.youtube.com/watch?v=hZw23sWlyG0")
    persona.run("youtube:next_up#3")
    persona.history.to_csv("history.csv")
    persona.recommendations.to_csv("recs.csv")

We turn off headless mode because it's fun to watch!

More examples, more features, more everything

Find the complete documentation here

persine's People

Contributors

jsoma avatar

Stargazers

Zakhar Loginov avatar KWhite avatar Nikolaus Schlemm avatar Ben Elliott avatar Deblina Mukherjee avatar  avatar  avatar Aaron Schaffer avatar Naren Gogineni avatar Spe Chen  avatar  avatar Dom Haase avatar  avatar Dipak Saraf avatar M avatar Rosso avatar jerad fields avatar Max Harlow avatar Aric Chokey avatar Pratheek Rebala avatar ting avatar Michael Leitner avatar Joanne Kuai avatar Chris Stock avatar Terra Ciolfe avatar Surya Mattu avatar Jack Bandy avatar Diego Gómez Zará avatar Kat Huang avatar  avatar Volkan Unsal avatar  avatar Minn Soe avatar Kosti avatar Jeremies Pérez avatar Ben Jemaa avatar Jonathon Marolf avatar Twishmay Shankar avatar Julian Xhokaxhiu avatar Márk Bartos avatar Thomas Trapp avatar Sarath avatar Nick Vazquez avatar  avatar  avatar Mark Josef avatar Jon Chun avatar  avatar gaurav patel avatar Geoffrey Juma avatar ZenithCobra avatar Ben Morin avatar  avatar  avatar Mike Brave avatar Robertus Suhendro avatar  avatar Jaimy Emmanuel avatar Eugene Siow avatar Cyril Vandenberghe avatar Ido Rosen avatar Adrienne Franke avatar Tomás B avatar Guilherme Mota avatar  avatar Irfan Shah avatar CIH avatar Harald Wartig avatar aku avatar Rajeev Karamcheti avatar Sharon Woo avatar Rodolfo Trevino avatar Michael R. Bock avatar Diego Veralli avatar sean rice avatar Raye Kimmerer avatar Salvador Guzman avatar Chris Lonardo avatar Alex Espinoza avatar odomojuli avatar  avatar wei shi avatar Luke Holman avatar Sean Stevens avatar Gabriel Nunes avatar Sawyer Click avatar Coral avatar Aaron Williams avatar Jason Kao avatar

Watchers

 avatar Dipak Saraf avatar ZenithCobra avatar  avatar

persine's Issues

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.