Merge remote-tracking branch 'origin/master'
This commit is contained in:
+19
-13
@@ -188,17 +188,23 @@ def findvideos(item):
|
||||
resp = support.match(get_data(item), headers=headers, patron=r'data-name="(\d+)">([^<]+)<')
|
||||
data = resp.data
|
||||
for ID, name in resp.matches:
|
||||
if 'vvvvid' in name.lower():
|
||||
urls.append(support.match(host + '/api/episode/serverPlayer?id=' + item.url.split('/')[-1].split('?')[0], headers=headers, patron=r'<a.*?href="([^"]+)"').match)
|
||||
elif 'streamtape' in name.lower():
|
||||
urls.append(support.match(data, patron=r'<a href="(https://streamtape[^"]+)"').match)
|
||||
elif 'beta' in name.lower():
|
||||
urls.append(support.match(data, patron=r'<a href="(https://animeworld[^"]+)"').match)
|
||||
elif 'server 2' in name.lower():
|
||||
dataJson = support.match(host + '/api/episode/info?id=' + item.url.split('/')[-1].split('?')[0] +'&alt=0', headers=headers).data
|
||||
json = jsontools.load(dataJson)
|
||||
itemlist.append(item.clone(action="play", title=name, url=json['grabber'], server='directo'))
|
||||
elif 'animeworld' in name.lower():
|
||||
url = support.match(resp.data, patron=r'href="([^"]+)"\s*id="alternativeDownloadLink"', headers=headers).match
|
||||
itemlist.append(item.clone(action="play", title=name, url=url, server='directo'))
|
||||
if not item.number: item.number = support.match(item.title, patron=r'(\d+) -').match
|
||||
match = support.match(data, patronBlock=r'data-name="' + ID + r'"[^>]+>(.*?)<div class="(?:server|download)', patron=r'data-id="([^"]+)" data-episode-num="' + (item.number if item.number else '1') + '"' + r'.*?href="([^"]+)"').match
|
||||
if match:
|
||||
epID, epurl = match
|
||||
if 'vvvvid' in name.lower():
|
||||
urls.append(support.match(host + '/api/episode/serverPlayer?id=' + epID, headers=headers, patron=r'<a.*?href="([^"]+)"').match)
|
||||
elif 'streamtape' in name.lower():
|
||||
urls.append(support.match(data, patron=r'<a href="(https://streamtape[^"]+)"').match)
|
||||
elif 'beta' in name.lower():
|
||||
urls.append(support.match(data, patron=r'<a href="(https://animeworld[^"]+)"').match)
|
||||
elif 'server 2' in name.lower():
|
||||
dataJson = support.match(host + '/api/episode/info?id=' + epID + '&alt=0', headers=headers).data
|
||||
json = jsontools.load(dataJson)
|
||||
title = support.match(json['grabber'], patron=r'server2.([^.]+)', string=True).match
|
||||
itemlist.append(item.clone(action="play", title=title, url=json['grabber'], server='directo'))
|
||||
elif 'animeworld' in name.lower():
|
||||
url = support.match(data, patron=r'href="([^"]+)"\s*id="alternativeDownloadLink"', headers=headers).match
|
||||
title = support.match(url, patron=r'http[s]?://(?:www.)?([^.]+)', string=True).match
|
||||
itemlist.append(item.clone(action="play", title=title, url=url, server='directo'))
|
||||
return support.server(item, urls, itemlist)
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
{
|
||||
"active": true,
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "(https://animeworld.biz/[vf]/[a-zA-Z0-9/-]+)",
|
||||
"url": "\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "animeworld_server",
|
||||
"name": "Animeworld",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import sys
|
||||
if sys.version_info[0] >= 3:
|
||||
import urllib.parse as urllib
|
||||
else:
|
||||
import urllib
|
||||
|
||||
from core import httptools, jsontools
|
||||
from platformcode import logger, config
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
post = urllib.urlencode({'r': '', 'd': 'animeworld.biz'})
|
||||
data_json = httptools.downloadpage(page_url.replace('/v/', '/api/source/'), headers=[['x-requested-with', 'XMLHttpRequest']], post=post).data
|
||||
global json
|
||||
json = jsontools.load(data_json)
|
||||
if not json['data']:
|
||||
return False, config.get_localized_string(70449) % "AnimeWorld"
|
||||
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, user="", password="", video_password=""):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
video_urls = []
|
||||
global json
|
||||
if json['data']:
|
||||
for file in json['data']:
|
||||
media_url = file['file']
|
||||
label = file['label']
|
||||
extension = file['type']
|
||||
video_urls.append([label + " " + extension + ' [AnimeWorld]', media_url])
|
||||
|
||||
|
||||
return video_urls
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [{
|
||||
"pattern": "(?:fembed|divload|cercafilm|sonline|verystream).(?:com|net|pro|info)/((?:f|v)/[A-z0-9_-]+)",
|
||||
"pattern": "(?:fembed|divload|cercafilm|sonline|verystream|animeworld).(?:com|net|pro|info|biz)/((?:f|v)/[A-z0-9_-]+)",
|
||||
"url": "https://www.feurl.com/\\1"
|
||||
}]
|
||||
},
|
||||
|
||||
+6
-5
@@ -18,16 +18,17 @@ def test_video_exists(page_url):
|
||||
data = httptools.downloadpage(page_url, post={}).json
|
||||
logger.info(data)
|
||||
if "Video not found or" in data or "We are encoding this video" in data:
|
||||
return False, config.get_localized_string(70449) % "fembed"
|
||||
return False, config.get_localized_string(70449) % "Fembed"
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, user="", password="", video_password=""):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
video_urls = []
|
||||
for videos in data["data"]:
|
||||
v = videos["file"]
|
||||
if not v.startswith("http"): v = "https://www.fembed.com" + videos["file"]
|
||||
video_urls.append([videos["label"] + " [Fembed]", v])
|
||||
for file in data['data']:
|
||||
media_url = file['file']
|
||||
label = file['label']
|
||||
extension = file['type']
|
||||
video_urls.append([ extension + ' ' + label + ' [Fembed]', media_url])
|
||||
video_urls.sort(key=lambda x: x[0].split()[1])
|
||||
return video_urls
|
||||
|
||||
Reference in New Issue
Block a user