redTube

RedTube json Python

In [10]:
import requests
import json
import random

import getpass
#import couchdb
import pickle
import getpass
#!flask/bin/python
#from flask import Flask, jsonify
In [11]:
myusr = getpass.getuser()
In [12]:
print(myusr)
pi
In [2]:
#couch = couchdb.Server()
In [36]:
with open('/home/{}/prn.pickle'.format(myusr), 'rb') as handle:
    prnlis = pickle.load(handle)
In [13]:
#db = couch.create('redtube')    
In [14]:
#db = couch['redtube']

Requests and json are the two main modules used for this. Random can also be handy

In [15]:
payload = {'output' : 'json', 'data' : 'redtube.Videos.searchVideos', 'page' : 1}
In [16]:
getprn = requests.get('http://api.redtube.com/', params = payload)
In [17]:
daprn = getprn.json()
In [18]:
levid = len(daprn['videos'])
In [19]:
porndick = dict()
In [ ]:
 
In [47]:
#for lev in range(0, levid):
#    print(daprn['videos'][lev]['video'])
#    prntit = (daprn['videos'][lev]['video']['title'])
#    prnnow = prntit.replace(' ', '-')
#    prnlow = prnnow.lower()
#    print(prnlow)
#    try:
#        somelis = list()
#        for dapr in daprn['videos'][lev]['video']['tags']:
#            print(dapr['tag_name'])
#            somelis.append(dapr['tag_name'])
#            porndick.update({daprn['videos'][lev]['video']['video_id'] : {'tags' : ", ".join(str(x) for x in somelis)}})
            #db.save(porndick)
            #try:
            #    db = couch.create(prnlow)
            #except PreconditionFailed:
            #    db = couch[prnlow]
            #db.save({daprn['videos'][lev]['video']['video_id'] : {'tags' : ", ".join(str(x) for x in somelis)}})
            
#    except KeyError:
#        continue
In [18]:
#for i in db:
#    print(i)
b4bd99ab29c1300495b1c1e6dd001590
In [45]:
#db.save(porndick)

#for i in db:
#    print(db[i])
In [54]:
#print(pornd['tags'])
HD
In [8]:
#loaPrn = json.loads(getPrn.text)
#print loaUrl

Convert it into readable text that you can work with

In [28]:
lenvid = len(daprn[u'videos'])
In [29]:
lenvid
Out[29]:
20
In [25]:
#aldic = dict()
In [42]:
with open('/home/{}/prn3.pickle'.format(myusr), 'rb') as handles:
    aldic = pickle.load(handles)
In [26]:
import shutil
In [46]:
for napn in range(0, lenvid):
    print(daprn[u'videos'][napn]['video']['url'])
    print(daprn[u'videos'][napn]['video']['title'])
    try:
        letae = len(daprn[u'videos'][napn]['video']['tags'])
        tagna = (daprn[u'videos'][napn]['video']['tags'])
        reqbru = requests.get('http://api.giphy.com/v1/gifs/translate?s={}&api_key=dc6zaTOxFJmzC'.format(tagna))
        brujsn = reqbru.json()
        print(brujsn['data']['images']['fixed_width']['url'])
        gurl = (brujsn['data']['images']['fixed_width']['url'])
        gslug = (brujsn['data']['slug'])
        #fislg = gslug.repl
        
        try:
            somelis = list()
            for dapr in daprn['videos'][lev]['video']['tags']:
                print(dapr['tag_name'])
                somelis.append(dapr['tag_name'])
                porndick.update({daprn['videos'][lev]['video']['video_id'] : {'tags' : ", ".join(str(x) for x in somelis)}})
 

        except KeyError:
            continue
        
        aldic.update({gslug : gurl})
        #print(gurl)
        '''
        with open('/home/pi/redtube/posts/{}.meta'.format(gslug), 'w') as blmet:
            blmet.write('.. title: ' + glug + ' \n' + '.. slug: ' + nameofblogpost + ' \n' + '.. date: ' + str(nowtime) + ' \n' +  '.. tags: ' + tagblog + '\n' + '.. link:\n.. description:\n.. type: text')
     
        response = requests.get(gurl, stream=True)#
        response
        with open('/home/pi/redtube/galleries/{}.gif'.format(gslug), 'wb') as out_file:
            shutil.copyfileobj(response.raw, out_file)
            del response
            
            tan = tagna.replace(' ', '-')
            tanq = tan.lower()
            print(tanq)
            
        '''
    except KeyError:
         continue                                                                                                                                                                                                                                                                                                                  
https://www.redtube.com/2553368
Two Lusty Brunettes Are Taking No Prisoners
https://media2.giphy.com/media/ftWOFe1fwGPK0/200w.gif
Amateur
Big Cock
Blonde
Blowjob
Cum Shot
HD
Teen
Verified Amateurs
https://www.redtube.com/2553359
Mexican patrol Suspect was seen on CCTV
https://media1.giphy.com/media/BXorYDutuBZ84/200w.gif
Amateur
Big Cock
Blonde
Blowjob
Cum Shot
HD
Teen
Verified Amateurs
https://www.redtube.com/2553353
Hot red head big tits Crazy slut brought in
https://media0.giphy.com/media/lnGoIzwfI3ja/200w.gif
Amateur
Big Cock
Blonde
Blowjob
Cum Shot
HD
Teen
Verified Amateurs
https://www.redtube.com/2411894
18VR Two Rocky Dicks For Alexis Crystal VR Porn
https://media0.giphy.com/media/DhLHlUF8tFJPG/200w.gif
Amateur
Big Cock
Blonde
Blowjob
Cum Shot
HD
Teen
Verified Amateurs
https://www.redtube.com/2194970
Spiked heeled tease and suck
https://media2.giphy.com/media/3PNJqxf3Gfknm/200w.gif
Amateur
Big Cock
Blonde
Blowjob
Cum Shot
HD
Teen
Verified Amateurs
https://www.redtube.com/2553364
Fat man handjob xxx We are the Law my
https://media0.giphy.com/media/KnM6RQ9Dl6wNy/200w.gif
Amateur
Big Cock
Blonde
Blowjob
Cum Shot
HD
Teen
Verified Amateurs
https://www.redtube.com/2553360
POV Deepthroat Blowjob with my Teen StepSister till Facial
https://media2.giphy.com/media/3PNJqxf3Gfknm/200w.gif
Amateur
Big Cock
Blonde
Blowjob
Cum Shot
HD
Teen
Verified Amateurs
https://www.redtube.com/2553358
Wife Eva turns into anal slut
https://media0.giphy.com/media/t2AesNogfAeXK/200w.gif
Amateur
Big Cock
Blonde
Blowjob
Cum Shot
HD
Teen
Verified Amateurs
https://www.redtube.com/2553357
Night fucking doggy
https://media1.giphy.com/media/pp3voGwFpfYS4/200w.gif
Amateur
Big Cock
Blonde
Blowjob
Cum Shot
HD
Teen
Verified Amateurs
https://www.redtube.com/2553356
Bikini Goddess Bexxy Gives an Awesome Handjob with Huge Cumshot
https://media3.giphy.com/media/B08TIKuS9DK4U/200w.gif
Amateur
Big Cock
Blonde
Blowjob
Cum Shot
HD
Teen
Verified Amateurs
https://www.redtube.com/2553355
Baby Girl Swallows Daddy's Cum For Breakfast
https://media2.giphy.com/media/1gwx36stVpSFi/200w.gif
Amateur
Big Cock
Blonde
Blowjob
Cum Shot
HD
Teen
Verified Amateurs
https://www.redtube.com/2553354
Teen Gets Her Pussy & Throat Stretched
https://media3.giphy.com/media/8NSNUBsKux8u4/200w.gif
Amateur
Big Cock
Blonde
Blowjob
Cum Shot
HD
Teen
Verified Amateurs
https://www.redtube.com/2553352
Thick Pawg wife gets massive Facial
https://media2.giphy.com/media/ftWOFe1fwGPK0/200w.gif
Amateur
Big Cock
Blonde
Blowjob
Cum Shot
HD
Teen
Verified Amateurs
https://www.redtube.com/2553351
Fucking my tight ass
https://media1.giphy.com/media/2ClUBE8YazoeQ/200w.gif
Amateur
Big Cock
Blonde
Blowjob
Cum Shot
HD
Teen
Verified Amateurs
https://www.redtube.com/2553350
Sperm Diet Episode 1 - First Time Oral Creampie And Swallow
https://media3.giphy.com/media/11txuXecP6oQJa/200w.gif
Amateur
Big Cock
Blonde
Blowjob
Cum Shot
HD
Teen
Verified Amateurs
https://www.redtube.com/2553349
College teen outdoor multiple orgasm - Made in Canarias
https://media2.giphy.com/media/ftWOFe1fwGPK0/200w.gif
Amateur
Big Cock
Blonde
Blowjob
Cum Shot
HD
Teen
Verified Amateurs
https://www.redtube.com/2553348
Fucking my GF in her new sexy outfit
https://media1.giphy.com/media/OpwqitsZKzRqU/200w.gif
Amateur
Big Cock
Blonde
Blowjob
Cum Shot
HD
Teen
Verified Amateurs
https://www.redtube.com/2553347
Bondage Punishment
https://media3.giphy.com/media/VNh3XsWCN5Dfq/200w.gif
Amateur
Big Cock
Blonde
Blowjob
Cum Shot
HD
Teen
Verified Amateurs
https://www.redtube.com/2553346
Caught my Sister's Husband Smelling my Panties and Fuck him
https://media1.giphy.com/media/2ClUBE8YazoeQ/200w.gif
Amateur
Big Cock
Blonde
Blowjob
Cum Shot
HD
Teen
Verified Amateurs
https://www.redtube.com/2553345
Insta Girl gets Fucked Hard - Amateur Couple LeoLulu
https://media3.giphy.com/media/yR4ttMO5adaw/200w.gif
Amateur
Big Cock
Blonde
Blowjob
Cum Shot
HD
Teen
Verified Amateurs
In [ ]:
with open('/home/{}/prn.pickle'.format(myusr), 'wb') as handle:
    pickle.dump(porndick, handle, protocol=pickle.HIGHEST_PROTOCOL)
In [41]:
with open('/home/{}/prn3.pickle'.format(myusr), 'wb') as handle:
    pickle.dump(aldic, handle, protocol=pickle.HIGHEST_PROTOCOL)
In [44]:
#db.save(aldic)

Comments

Comments powered by Disqus