Changeset 39075 for titan/mediathek/localhoster
- Timestamp:
- 09/29/16 01:26:33 (7 years ago)
- Location:
- titan/mediathek/localhoster
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/mediathek/localhoster/flashx.py
r38996 r39075 4 4 import sys 5 5 from lib.net import Net 6 import lib.common as common 6 7 7 8 class FlashxResolver(object): … … 33 34 file_id = re.search("'file_id', '(.*?)'", html).group(1) 34 35 aff = re.search("'aff', '(.*?)'", html).group(1) 35 headers = { 'Referer': web_url, 36 'Cookie': '__cfduid=' + cfduid + '; lang=1'} 37 surl = re.search('src="(.*?' + file_id + ')',html).group(1) 36 headers = {'User-Agent': common.IE_USER_AGENT, 37 'Referer': web_url, 38 'Cookie': '__cfduid=' + cfduid + '; lang=1'} 39 surl = re.search('src="(.*?' + file_id + ')', html, re.IGNORECASE).group(1) 38 40 dummy = self.net.http_GET(url=surl, headers=headers).content 39 headers = { 'Referer': web_url, 40 'Cookie': '__cfduid=' + cfduid + '; lang=1; file_id=' + file_id + '; aff=' + aff } 41 headers = {'User-Agent': common.IE_USER_AGENT, 42 'Referer': web_url, 43 'Cookie': '__cfduid=' + cfduid + '; lang=1; file_id=' + file_id + '; aff=' + aff} 41 44 html = self.net.http_GET(url=web_url, headers=headers).content 42 45 fname = re.search('name="fname" value="(.*?)"', html).group(1) 43 46 hash = re.search('name="hash" value="(.*?)"', html).group(1) 44 fdata = { 45 46 47 48 49 50 'imhuman': 'Proceed to video'}51 furl = 'http://www.flashx.tv/dl ?'+ media_id47 fdata = {'op': 'download1', 48 'usr_login': '', 49 'id': media_id, 50 'fname': fname, 51 'referer': '', 52 'hash': hash, 53 'imhuman': 'Proceed to video'} 54 furl = 'http://www.flashx.tv/dl'# + media_id 52 55 time.sleep(5) 53 56 html = self.net.http_POST(url=furl, form_data=fdata, headers=headers).content 54 strhtml = jsunpack.unpack(re.search('(eval\(function.*?)</script>', html, re.DOTALL).group(1))55 stream = re.search('file:"([^"]*)",label', strhtml).group(1)56 57 58 js_data = re.findall('(eval\(function.*?)</script>', html.replace('\n', '')) 59 60 for i in js_data: 61 try: html += jsunpack.unpack(i) 62 except: pass 63 64 stream = re.search('file:"([^"]*/high.*)",label', html).group(1) 57 65 if stream: 58 66 print stream 67 else: 68 stream = re.search('file:"([^"]*/normal.*)",label', html).group(1) 69 if stream: 70 print stream 71 else: 72 stream = re.search('file:"([^"]*/low.*)",label', html).group(1) 73 if stream: 74 print stream 75 else: 76 stream = re.search('file:"([^"]*)",label', html).group(1) 77 if stream: 78 print stream 59 79 60 80 def get_url(self, host, media_id): -
titan/mediathek/localhoster/hoster.sh
r39052 r39075 8 8 BOX=`cat /etc/model` 9 9 debuglevel=`cat /mnt/config/titan.cfg | grep debuglevel | cut -d"=" -f2` 10 curlbin= 'curl -k -s -L --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies'10 curlbin="curl -k -s -L --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies -A 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Maxthon/4.4.7.3000 Chrome/30.0.1599.101 Safari/537.36'" 11 11 if [ "$debuglevel" == "99" ]; then curlbin="$curlbin -v"; fi 12 12 wgetbin="wget -q -T2"
Note: See TracChangeset
for help on using the changeset viewer.