Changeset 42597 for titan/mediathek


Ignore:
Timestamp:
Aug 1, 2018, 12:51:25 AM (16 months ago)
Author:
obi
Message:

fix foxx search and add createUrl to python/lib/net needed for jpg download currently unused

Location:
titan/mediathek
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • titan/mediathek/localhoster/lib/net.py

    r42565 r42597  
    290290        rep = calc + len(domain)
    291291        return format(rep, '.10f')
     292
     293    def createUrl(sUrl, oRequest):
     294        parsed_url = urlparse(sUrl)
     295        netloc = parsed_url.netloc[4:] if parsed_url.netloc.startswith('www.') else parsed_url.netloc
     296        cfId = oRequest.getCookie('__cfduid', '.' + netloc)
     297        cfClear = oRequest.getCookie('cf_clearance', '.' + netloc)
     298
     299        if cfId and cfClear and 'Cookie=Cookie:' not in sUrl:
     300            delimiter = '&' if '|' in sUrl else '|'
     301            sUrl = sUrl + delimiter + "Cookie=Cookie: __cfduid=" + cfId.value + "; cf_clearance=" + cfClear.value
     302
     303        if 'User-Agent=' not in sUrl:
     304            delimiter = '&' if '|' in sUrl else '|'
     305            sUrl += delimiter + "User-Agent=" + oRequest.getHeaderEntry('User-Agent')
     306        print "sUrl", sUrl
     307        return sUrl
    292308
    293309    def _cloudflare_challenge(self, url, challenge, form_data={}, headers={}, compression=True):
  • titan/mediathek/localparser_secret/foxx.sh

    r42592 r42597  
    4747        echo "Random Movie#$SRC $SRC new 0 0 '?get=movies'#http://atemio.dyndns.tv/mediathek/menu/all-newfirst.jpg#all-newfirst.jpg#$NAME#0" > $TMP/$FILENAME.list
    4848        #echo "Serien#$SRC $SRC new 0 0 '?get=tv'#http://atemio.dyndns.tv/mediathek/menu/Movies.jpg#Movies.jpg#$NAME#0" >> $TMP/$FILENAME.list
    49         echo "Search#$SRC $SRC search 1 0 '?s='#http://atemio.dyndns.tv/mediathek/menu/search.jpg#search.jpg#$NAME#112" >> $TMP/$FILENAME.list
     49    echo "Search#$SRC $SRC search 1 0 '?s=%search%'#http://atemio.dyndns.tv/mediathek/menu/search.jpg#search.jpg#$NAME#112" >> $TMP/$FILENAME.list
    5050
    5151        if [ -e "$TMP/$PARSER.new.list" ] ; then
Note: See TracChangeset for help on using the changeset viewer.