Changeset 38961 for titan/mediathek/localhoster
- Timestamp:
- 09/23/16 18:43:31 (8 years ago)
- Location:
- titan/mediathek/localhoster
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
titan/mediathek/localhoster/nosvideo.py
r38960 r38961 1 '''2 Nosvideo urlresolver plugin3 Copyright (C) 2013 Vinnydude4 1 5 This program is free software: you can redistribute it and/or modify 6 it under the terms of the GNU General Public License as published by 7 the Free Software Foundation, either version 3 of the License, or 8 (at your option) any later version. 2 import sys 3 import re 4 from net import Net 9 5 10 This program is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License 16 along with this program. If not, see <http://www.gnu.org/licenses/>. 17 ''' 18 19 import re 20 from urlresolver import common 21 from urlresolver.resolver import UrlResolver, ResolverError 22 23 class NosvideoResolver(UrlResolver): 6 class NosvideoResolver(object): 24 7 name = "nosvideo" 25 8 domains = ["nosvideo.com", "noslocker.com"] … … 27 10 28 11 def __init__(self): 29 self.net = common.Net() 12 self.net = Net() 13 url = str(sys.argv[1]) 14 host = self.get_host_and_id(url)[0] 15 media_id = self.get_host_and_id(url)[1] 16 17 return self.get_media_url(host, media_id) 18 19 def get_host_and_id(self, url): 20 r = re.search(self.pattern, url, re.I) 21 if r: 22 return r.groups() 23 else: 24 return False 30 25 31 26 def get_media_url(self, host, media_id): … … 51 46 stream_url = '%s playpath=%s' % (streamer, playpath) 52 47 53 returnstream_url48 print stream_url 54 49 55 50 def get_url(self, host, media_id): 56 51 return 'http://nosvideo.com/%s' % media_id 57 52 53 sys.stdout = NosvideoResolver() 54 -
titan/mediathek/localhoster/vidup.py
r38960 r38961 1 """2 urlresolver XBMC Addon3 Copyright (C) 2011 t0mm04 1 5 This program is free software: you can redistribute it and/or modify 6 it under the terms of the GNU General Public License as published by 7 the Free Software Foundation, either version 3 of the License, or 8 (at your option) any later version. 9 10 This program is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License 16 along with this program. If not, see <http://www.gnu.org/licenses/>. 17 """ 18 2 import sys 19 3 import re 20 4 from lib import jsunpack 21 from urlresolver import common 22 from urlresolver.resolver import UrlResolver, ResolverError 5 from net import Net 23 6 24 25 class VidUpMeResolver(UrlResolver): 7 class VidUpMeResolver(object): 26 8 name = "vidup.me" 27 9 domains = ["vidup.me", "beta.vidup.me"] … … 29 11 30 12 def __init__(self): 31 self.net = common.Net() 13 self.net = Net() 14 url = str(sys.argv[1]) 15 host = self.get_host_and_id(url)[0] 16 media_id = self.get_host_and_id(url)[1] 17 18 return self.get_media_url(host, media_id) 19 20 def get_host_and_id(self, url): 21 r = re.search(self.pattern, url, re.I) 22 if r: 23 return r.groups() 24 else: 25 return False 32 26 33 27 def get_media_url(self, host, media_id): … … 46 40 stream_url = re.findall('''['"]?file['"]?\s*:\s*['"]?([^'"]+)''', match[0]) 47 41 if stream_url: 48 return stream_url[-1] 49 50 raise ResolverError('File Not Found or removed') 42 print stream_url[-1] 51 43 52 44 def get_url(self, host, media_id): 53 45 return 'http://beta.vidup.me/embed-%s.html' % media_id 46 47 48 sys.stdout = VidUpMeResolver()
Note: See TracChangeset
for help on using the changeset viewer.