Changeset 39400 for titan/mediathek
- Timestamp:
- 12/02/16 23:31:14 (7 years ago)
- Location:
- titan/mediathek
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/mediathek/localhoster/goldesel.py
r39387 r39400 12 12 13 13 def __init__(self): 14 # self.net = Net(cookie_file='/mnt/network/cookie ', http_debug=True, cloudflare=True)15 self.net = Net(cookie_file='/mnt/network/cookie ', cloudflare=True)14 # self.net = Net(cookie_file='/mnt/network/cookies', http_debug=True, cloudflare=True) 15 self.net = Net(cookie_file='/mnt/network/cookies', cloudflare=True) 16 16 url = str(sys.argv[1]) 17 17 return self.get_answer_code(url) … … 20 20 headers = {'User-Agent': common.FF_USER_AGENT} 21 21 html = self.net.http_GET(web_url, headers=headers).content 22 #html = self.request(web_url, cookie_file=/mnt/network/cookie, cloudflare=True) 22 #html = self.request(web_url, cookie_file=/mnt/network/cookies, cloudflare=True) 23 ret = self.net.save_cookies('/mnt/network/cookies') 23 24 print "html", html.encode('utf8') 24 25 -
titan/mediathek/localhoster/hoster.sh
r39391 r39400 10 10 BOX=`cat /etc/model` 11 11 debuglevel=`cat /mnt/config/titan.cfg | grep debuglevel | cut -d"=" -f2` 12 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'"12 curlbin="curl -k -s -L --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies -A 'Mozilla/5.0 (Windows NT 6.3; rv:36.0) Gecko/20100101 Firefox/36.0'" 13 13 curlbin2='curl -k -s --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies' 14 14 if [ "$debuglevel" == "99" ]; then curlbin="$curlbin -v"; fi -
titan/mediathek/localhoster/lib/net.py
r39388 r39400 51 51 ANDROID_USER_AGENT = 'Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.114 Mobile Safari/537.36' 52 52 53 _cj = cookielib. LWPCookieJar()53 _cj = cookielib.MozillaCookieJar() 54 54 55 55 _proxy = None … … 87 87 88 88 # empty jar for each instance rather than scope of the import 89 self._cloudflare_jar = cookielib. LWPCookieJar()89 self._cloudflare_jar = cookielib.MozillaCookieJar() 90 90 91 91 self.cloudflare = cloudflare … … 170 170 171 171 if cloudflare_jar: 172 self._cloudflare_jar = cookielib. LWPCookieJar()172 self._cloudflare_jar = cookielib.MozillaCookieJar() 173 173 jar = self._cloudflare_jar 174 174 else: -
titan/mediathek/localparser_secret/goldesel.sh
r39387 r39400 163 163 rm $TMP/$PARSER.$INPUT.list 164 164 fi 165 # $curlbin $URL/$PAGE -o $TMP/cache.$PARSER.$INPUT.1 166 /tmp/localhoster/hoster.sh get $URL/$PAGE > $TMP/cache.$PARSER.$INPUT.1165 $curlbin $URL/$PAGE -o $TMP/cache.$PARSER.$INPUT.1 -A 'Mozilla/5.0 (Windows NT 6.3; rv:36.0) Gecko/20100101 Firefox/36.0' 166 # /tmp/localhoster/hoster.sh get $URL/$PAGE > $TMP/cache.$PARSER.$INPUT.1 167 167 168 168 cat $TMP/cache.$PARSER.$INPUT.1 | sed 's!<h2>Stream-Links</h2>!\nfound=!g' | sed 's!<h2>Sample-Links</h2>!\nerror=!g' | grep ^found= | sed 's/<li data=/\ndata=/g' | grep ^data= >$TMP/cache.$PARSER.$INPUT.2 … … 184 184 { 185 185 rm $TMP/cache.$PARSER.$INPUT.* > /dev/null 2>&1 186 $curlbin $URL/res/links -X POST --data "$PAGE" -o $TMP/cache.$PARSER.$INPUT.1 186 $curlbin $URL/res/links -X POST --data "$PAGE" -o $TMP/cache.$PARSER.$INPUT.1 -A 'Mozilla/5.0 (Windows NT 6.3; rv:36.0) Gecko/20100101 Firefox/36.0' 187 187 STREAMURL=`cat $TMP/cache.$PARSER.$INPUT.1 | sed 's!url="http://dref.me/?!\nstreamurl="!' | grep ^streamurl= | cut -d'"' -f2 | sed 's!%3A!:!g' | sed 's!%2F!/!g'` 188 188 # rm $TMP/cache.$PARSER.$INPUT.* > /dev/null 2>&1
Note: See TracChangeset
for help on using the changeset viewer.