Changeset 42584
- Timestamp:
- 07/29/18 02:30:25 (6 years ago)
- Location:
- titan/mediathek/localhoster
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/mediathek/localhoster/hoster.sh
r42564 r42584 745 745 vivo) vivo $INPUT;; 746 746 goldesel|movie4k|movie4kto|kinox|kinos|kinoxto|foxx) cloudflare $INPUT;; 747 streamcloud 1) streamcloud $INPUT;;747 streamcloud) streamcloud $INPUT;; 748 748 nowvideo) nowvideo $INPUT;; 749 749 divxstage|cloudtime) divxstage $INPUT;; -
titan/mediathek/localhoster/streamcloud.py
r39238 r42584 2 2 import re 3 3 import sys 4 import time 4 5 from lib.net import Net 6 import re, urllib, json 7 from lib import helpers 8 import lib.common as common 5 9 6 10 class StreamcloudResolver(object): … … 26 30 def get_media_url(self, host, media_id): 27 31 web_url = self.get_url(host, media_id) 28 resp = self.net.http_GET(web_url)29 html = resp.content30 post_url = resp.get_url()32 headers = {'User-Agent': common.FF_USER_AGENT} 33 response = self.net.http_GET(web_url, headers=headers) 34 html = response.content 31 35 if re.search('>(File Not Found)<', html): 32 print 'File Not Found or removed'36 raise ResolverError('File Not Found or removed') 33 37 34 form_values = {} 35 for i in re.finditer('<input.*?name="(.*?)".*?value="(.*?)">', html): 36 form_values[i.group(1)] = i.group(2).replace("download1", "download2") 37 html = self.net.http_POST(post_url, form_data=form_values).content 38 cnt = 10 39 match = re.search('count\s*=\s*(\d+);', html) 40 if match: 41 cnt = int(match.group(1)) 42 cnt += 1 38 43 39 r = re.search('file: "(.+?)",', html) 40 if r: 41 print r.group(1) 44 data = helpers.get_hidden(html) 45 headers.update({'Referer': web_url}) 46 # common.kodi.sleep(cnt * 1000) 47 time.sleep(10) 48 html = self.net.http_POST(response.get_url(), form_data=data, headers=headers).content 49 sources = helpers.scrape_sources(html, patterns=['''file\s*:\s*["'](?P<url>[^"']+)''']) 50 # return helpers.pick_source(sources) + helpers.append_headers(headers) 51 print helpers.pick_source(sources) + helpers.append_headers(headers) 52 # print "%s%s" % (helpers.pick_source(sources), helpers.append_headers(headers)) 53 42 54 43 55 def get_url(self, host, media_id):
Note: See TracChangeset
for help on using the changeset viewer.