Exemplo n.º 1
0
 def get(self, request, *args, **kwargs):
     title = kwargs["title"]
     results = search(title)
     if results:
         movie = results[0]
         if movie["title"].lower() == title.lower():
             is_streaming = streaming(movie["_id"])
             if "netflix_instant" in is_streaming:
                 return JsonResponse({"netflix": True})
         else:
             return JsonResponse({"netflix": "unknown"})
     return JsonResponse({"netflix": False})
Exemplo n.º 2
0
from canistreamit import streaming, search, rental

import sys, json

movie_info = search(sys.argv[1])

if (len(movie_info) > 0):

  movie = movie_info[0];

  stream_list = streaming(movie['_id'])

  dump = json.dumps(stream_list)

  print dump

  print json.dumps(rental(movie['_id']))

else:
  
  print []

Exemplo n.º 3
0
import re
from os import listdir
from canistreamit import search, streaming, xfinity

regex = re.compile("^(.*)\(.*$")
for f in listdir("/media/epeters/Seagate Backup Plus Drive/MacGyver_1/TiVo Recordings"):
    match = regex.match(f)
    if match:
        search_list = search(match.group(1))
        for movie in search_list:
            print movie['title']
            stream_result = streaming(movie['_id'])
            if "amazon_prime_instant_video" in stream_result:
                print "\tAmazon Instant"
            if "netflix_instant" in stream_result:
                print "\tNetflix Instant"
            xfinity_result = xfinity(movie['_id'])
            if "streampix" in xfinity_result:
                print "\tXfinity Streampix"
minfo     = pd.read_csv(os.path.join(filepath, 'MovieInfo.txt'), sep = '|', dtype = {'imdbid': object})
sresults  = {'imdbid':[], 'netflix':[], 'netflix_link':[], 'amazon':[], 'amazon_link':[], 'hulu':[], 'hulu_link':[]}
notfound  = []

# lookup available streaming options for each movie
#--------------------------------------------------

for row in minfo.itertuples():
    
    try: 

        title  = row[1]
        imdbid = row[7]
        
        print("Current Search Title: {0} ({1})".format(title, imdbid))
        slist = search(title)
        movie = None
        
        if slist:
            for res in slist:
                try:
                    matchid = res['links']['imdb'].split("/")[-2].replace("tt","").strip()
                    if imdbid == matchid:
                        movie = res
                        break
                except KeyError:
                    pass
                   
        if movie:    
            
            stream = streaming(movie['_id'])