#!/usr/bin/env python # coding=utf8 # # This file is part of PlayStream - enigma2 plugin to play video streams from various sources # Copyright (c) 2016 ivars777 (ivars777@gmail.com) # Distributed under the GNU GPL v3. For full terms see http://www.gnu.org/licenses/gpl-3.0.en.html # try: import json except: import simplejson as json import urllib2, urllib import datetime, re, sys,os import ConfigParser from collections import OrderedDict from SourceBase import SourceBase import resolver import util headers2dict = lambda h: dict([l.strip().split(": ") for l in h.strip().splitlines()]) import HTMLParser h = HTMLParser.HTMLParser() class Source(SourceBase): def __init__(self,country=""): self.name = "kinofilmnet" self.title = "KinoFilmNet.lv" self.img = "http://kinofilmnet.lv/MusuBaneri/1268.png" self.desc = "Kinofilmnet.lv satura skatīšanās" self.country=country self.headers = headers2dict(""" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 """) self.headers2 = headers2dict(""" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0 X-Requested-With: XMLHttpRequest Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 """) self.url = "http://kinofilmnet.lv/" ######### Entry point ######## def get_content(self, data): print "[kinofilmnet] get_content:", data source,data,path,plist,clist,params,qs = self.parse_data(data) content=[] content.append(("..return", "back","","Return back")) if clist=="home": content.extend([ ("Meklēt", "kinofilmnet::search/?q={0}","","Meklēt"), ("Jaunākās", "kinofilmnet::jaunakas","","Visu žanru jaunākās filmas"), ("Top50", "kinofilmnet::top50","","Top 50 filmas"), ]) r = self.call("") i = r.find('