User:Lidia.Pereira/PNM/Fluffying

From XPUB & Lens-Based wiki

Replacing "fucking" with fluffy verbs on the comments for the Top Rated YouTube videos.

only-you-can-stop-cyber-bullying.gif

import urllib2
import json
import random

feed = urllib2.urlopen("http://gdata.youtube.com/feeds/api/standardfeeds/top_rated?v=2&alt=jsonc")

data = json.load(feed)

topRated = data['data'] ['items']
fluffyVerbs = ["baking","combing","cuddling","babysitting","braiding","weaving"]

for i in topRated:
    print i['title']
    url = "http://gdata.youtube.com/feeds/api/videos/"+i['id']+"/comments?alt=json" #url generator
    feed2 = urllib2.urlopen(url) 
    data2 = json.load(feed2) 
    for c in data2 ['feed']['entry']: 
        content = c['content']['$t']
        if "fucking" in content:
            print content.replace("fucking",fluffyVerbs[random.randint(0,5)])

Here are some of my favourites:

Evolution of Dance - By Judson Laipply

he babysitting rocks the robot dance omg

Jeff Dunham - Achmed the Dead Terrorist

If you want to see her weaving check out : rihanna-new-sextape.eu.pn

Nicki Minaj - Super Bass

The girl was baking a black NBA player.

To do next: Add more innapropriate words to a list and replace them with innocuous ones.