def HomeNavigation(): if not os.path.isfile(kodi_func.home + "/resources/fof_lv_movieIndexes.txt"): IndexMovies('http://www.fof.lv/?page', 'fof_lv_movieIndexes.txt') print "Opening fof.lv" url = mainURL html = network.getHTML(url) # print 'html: ' + html nav_links_list = common.parseDOM(html, "div", attrs={"class": "categories"}) nav_links = common.parseDOM(nav_links_list, "a", ret="href") nav_links_name = common.parseDOM(nav_links_list, "a") kodi_func.addDir('Meklēt', '', 'state_search', '%s/meklet2.png' % kodi_func.iconpath, source_id=mySourceId) kodi_func.addDir('Jaunākās Filmas', 'http://www.fof.lv/?page1', 'state_movies', kodi_func.GetCategoryImage('jaunakas'), source_id=mySourceId) kodi_func.addDir('Populārākās', 'http://www.fof.lv/index/popularakas_filmas/0-13', 'state_movies', kodi_func.GetCategoryImage('skatitakas'), source_id=mySourceId) kodi_func.addDir('Vērtētākās', 'http://www.fof.lv/index/vertetakas_filmas/0-16', 'state_movies', kodi_func.GetCategoryImage('vertetakas'), source_id=mySourceId) # pagirasList = u'https://openload.co/embed/dLuET3ML86E/Deadpool.%28Dedpuls%29.2016.720p.LAT.THEVIDEO.LV.mkv.mp4' # link = urlresolver.resolve(pagirasList) # addDir('Dedpūls', pagirasList, 'state_play', None) # addLink("Dedpūls", link.encode('utf-8'), None) # print nav_links # print nav_links_name for i in range(0, len(nav_links)): if kodi_func.isLinkUseful(nav_links[i]): # print mainURL + nav_links[i] kodi_func.addDir(nav_links_name[i].encode('utf-8'), nav_links[i], 'state_movies', kodi_func.GetCategoryImage(nav_links_name[i]), source_id=mySourceId)
def HomeNavigation(): print "Opening CinemaLive.tv" url = 'https://cinemalive.tv/filmaslatviski' html = network.getHTML(url) # print 'html: ' + html nav_links_list = common.parseDOM(html, "ul", attrs={"class": "sub-menu"})[0] nav_links = common.parseDOM(nav_links_list, "a", ret="href") nav_links_name = common.parseDOM(nav_links_list, "a") kodi_func.addDir('Meklēt', '', 'state_search', '%s/meklet2.png' % kodi_func.iconpath, source_id=mySourceId) # pagirasList = u'https://openload.co/embed/dLuET3ML86E/Deadpool.%28Dedpuls%29.2016.720p.LAT.THEVIDEO.LV.mkv.mp4' # link = urlresolver.resolve(pagirasList) # addDir('Dedpūls', pagirasList, 'state_play', None) # addLink("Dedpūls", link.encode('utf-8'), None) # print nav_links # print nav_links_name for i in range(0, len(nav_links)): if kodi_func.isLinkUseful(nav_links[i]): # print mainURL + nav_links[i] kodi_func.addDir(nav_links_name[i].encode('utf-8'), nav_links[i], 'state_movies', kodi_func.GetCategoryImage(nav_links_name[i]), source_id=mySourceId)
def HomeNavigation(): print "Opening tvid.us" # url = 'http://tvid.us/movies' # html = network.getHTML(url) scraper = cfscrape.create_scraper() # returns a CloudflareScraper instance html = scraper.get("http://tvid.us/movies").content print 'html: ' + html # nav_links_list = common.parseDOM(html, "div", attrs = { "id": "genre-nav" }) nav_links = common.parseDOM( html, "a", ret="href", attrs={ "class": "btn btn-success btn-flat col-xs-12 col-sm-6 col-md-3" }) nav_links_name = common.parseDOM( html, "a", attrs={ "class": "btn btn-success btn-flat col-xs-12 col-sm-6 col-md-3" }) kodi_func.addDir('Meklēt', '', 'state_search', '%s/meklet2.png' % kodi_func.iconpath, source_id=mySourceId) kodi_func.addDir('Jaunākās Filmas | Visas Filmas', mainURL, 'state_movies', '%s/new.png' % kodi_func.iconpath, source_id=mySourceId) # pagirasList = u'https://openload.co/embed/dLuET3ML86E/Deadpool.%28Dedpuls%29.2016.720p.LAT.THEVIDEO.LV.mkv.mp4' # link = urlresolver.resolve(pagirasList) # addDir('Dedpūls', pagirasList, 'state_play', None) # addLink("Dedpūls", link.encode('utf-8'), None) # print nav_links # print nav_links_name for i in range(0, len(nav_links)): if kodi_func.isLinkUseful(nav_links[i]): # print mainURL + nav_links[i] kodi_func.addDir(nav_links_name[i].encode('utf-8'), 'http:' + nav_links[i], 'state_movies', kodi_func.GetCategoryImage(nav_links_name[i]), source_id=mySourceId)
def HomeNavigation(): print "Opening skaties.lv" url = mainURL + '/filmas' html = network.getHTML(url) # print 'html: ' + html nav_links_list = common.parseDOM( html, "nav", attrs={"class": "horizontal-submenu movies-categories clearfix"}) nav_links = common.parseDOM(nav_links_list, "a", ret="href") nav_links_name = common.parseDOM(nav_links_list, "a") kodi_func.addDir('Meklēt', '', 'state_search', '%s/meklet2.png' % kodi_func.iconpath, source_id=mySourceId) kodi_func.addDir('Jaunākās Filmas', mainURL + '/filmas/', 'state_movies', '%s/new.png' % kodi_func.iconpath, source_id=mySourceId) kodi_func.addDir('Populārākās Filmas', mainURL + '/filmas/popularakas/', 'state_movies', '%s/star.png' % kodi_func.iconpath, source_id=mySourceId) # kodi_func.addDir('TOP 50 Filmas', mainURL + '/index/top_50_filmas/0-4', 'state_movies', '%s/star.png'% kodi_func.iconpath, source_id=mySourceId) print "ELEMENTS: ", nav_links_list print nav_links print nav_links_name for i in range(0, len(nav_links)): if kodi_func.isLinkUseful(nav_links[i]): # print mainURL + nav_links[i] link_name = re.sub("<i.+></i>", '', nav_links_name[i]).strip() kodi_func.addDir(link_name.encode('utf-8'), mainURL + nav_links[i], 'state_movies', kodi_func.GetCategoryImage(link_name), source_id=mySourceId)
def HomeNavigation(): print "Opening movieplace.lv" url = mainURL + '/load/' html = network.getHTML(url) # print 'html: ' + html # nav_links_list = common.parseDOM(html, "div", attrs = { "id": "genre-nav" }) nav_links = common.parseDOM(html, "a", attrs = { "class": "catName" }, ret = "href") nav_links_name = common.parseDOM(html, "a", attrs = { "class": "catName" }) kodi_func.addDir('Meklēt', '', 'state_search', '%s/meklet2.png'% kodi_func.iconpath, source_id=mySourceId) kodi_func.addDir('Jaunākās Filmas | Visas Filmas', mainURL + '/load/', 'state_movies', '%s/new.png'% kodi_func.iconpath, source_id=mySourceId) # kodi_func.addDir('TOP 50 Filmas', mainURL + '/index/top_50_filmas/0-4', 'state_movies', '%s/star.png'% kodi_func.iconpath, source_id=mySourceId) print nav_links print nav_links_name for i in range(0, len(nav_links)): if kodi_func.isLinkUseful(nav_links[i]): # print mainURL + nav_links[i] kodi_func.addDir(nav_links_name[i].encode('utf-8'), mainURL + nav_links[i], 'state_movies', kodi_func.GetCategoryImage(nav_links_name[i]), source_id=mySourceId)