minhateca: nuevo server

This commit is contained in:
Intel1
2018-05-15 08:47:38 -05:00
committed by GitHub
parent 33109bee85
commit 0f772a4aeb
2 changed files with 69 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
{
"active": true,
"find_videos": {
"ignore_urls": [],
"patterns": [
{
"pattern": "(https://minhateca.com.br.*?video\\))",
"url": "\\1"
}
]
},
"free": true,
"id": "minhateca",
"name": "minhateca",
"settings": [
{
"default": false,
"enabled": true,
"id": "black_list",
"label": "Incluir en lista negra",
"type": "bool",
"visible": true
},
{
"default": 0,
"enabled": true,
"id": "favorites_servers_list",
"label": "Incluir en lista de favoritos",
"lvalues": [
"No",
"1",
"2",
"3",
"4",
"5"
],
"type": "list",
"visible": false
}
],
"thumbnail": "https://s9.postimg.cc/4nzpybunz/minhateca.png"
}

View File

@@ -0,0 +1,27 @@
# -*- coding: utf-8 -*-
import urllib
from core import httptools
from core import jsontools
from core import scrapertools
from platformcode import logger
def test_video_exists(page_url):
return True, ""
def get_video_url(page_url, user="", password="", video_password=""):
logger.info("(page_url='%s')" % page_url)
video_urls = []
data = httptools.downloadpage(page_url).data
_rvt = scrapertools.find_single_match(data, '__RequestVerificationToken.*?value="([^"]+)"')
_fileid = scrapertools.find_single_match(data, 'data-fileid="([^"]+)"')
post = {'fileId': _fileid, '__RequestVerificationToken': _rvt}
post = urllib.urlencode(post)
headers = {'X-Requested-With': 'XMLHttpRequest'}
url1 = "http://minhateca.com.br/action/License/Download"
data = httptools.downloadpage(url1, post = post, headers = headers).data
dict_data = jsontools.load(data)
videourl = dict_data["redirectUrl"] + "|Referer=%s" %page_url
video_urls.append([".MP4 [minhateca]", videourl])
return video_urls