Changeset 39604


Ignore:
Timestamp:
Jan 2, 2017, 12:58:02 AM (2 years ago)
Author:
obi
Message:

use same user-agent

Location:
titan/mediathek
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • titan/mediathek/localhoster/goldesel.py

    r39427 r39604  
    1818
    1919    def get_answer_code(self, web_url):
    20         headers = {'User-Agent': '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'}                 
     20        headers = {'User-Agent': common.FF_USER_AGENT}                 
    2121        html = self.net.http_GET(web_url, headers=headers).content
    2222        #html = self.request(web_url, cookie_file=/mnt/network/cookies, cloudflare=True)
  • titan/mediathek/localhoster/lib/common.py

    r39353 r39604  
    3434
    3535IE_USER_AGENT = 'Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; AS; rv:11.0) like Gecko'
    36 FF_USER_AGENT = 'Mozilla/5.0 (Windows NT 6.3; rv:36.0) Gecko/20100101 Firefox/36.0'
     36#FF_USER_AGENT = 'Mozilla/5.0 (Windows NT 6.3; rv:36.0) Gecko/20100101 Firefox/36.0'
     37FF_USER_AGENT = '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' 
    3738OPERA_USER_AGENT = 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36 OPR/34.0.2036.50'
    3839IOS_USER_AGENT = 'Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25'
  • titan/mediathek/localparser_secret/goldesel.sh

    r39554 r39604  
    5252}
    5353
    54 #
    55 #  <form id="challenge-form" action="/cdn-cgi/l/chk_jschl" method="get">
    56 #    <input type="hidden" name="jschl_vc" value="528818834f8ad23629ea5d31c3a5390c"/>
    57 #    <input type="hidden" name="pass" value="1479475035.975-uJ99NUZ87d"/>
    58 #    <input type="hidden" id="jschl-answer" name="jschl_answer"/>
    59 #  </form>
    60 
    61 #http://goldesel.to/cdn-cgi/l/chk_jschl?jschl_vc=f29b5aecef651bc1df9cad068c58848c&pass=1479474954.758-6i1RP0vPFz&jschl_answer=2914582
    62 #
    63 
    6454new()
    6555{
    6656        if [ ! -e "$TMP/$PARSER.$INPUT.list" ] ; then
    67 #               $curlbin $URL/$PAGE -o $TMP/cache.$PARSER.$INPUT.0
    68 
    69 #               DATA=`cat $TMP/cache.$PARSER.$INPUT.0 | sed 's/ \+/ /g' | sed 's/<form id=/\nfound=/g' | grep ^found=`
    70 
    71 #               actionpath=`cat $TMP/cache.$PARSER.$INPUT.0 | tr '\n' ' ' | sed 's/ \+/ /g' | sed 's/<form id=/\nfound=/g' | grep ^found= | sed 's/action=/\naction=/g' | grep ^action= | cut -d'"' -f2`
    72 #               jschlvc=`cat $TMP/cache.$PARSER.$INPUT.0 | tr '\n' ' ' | sed 's/ \+/ /g' | sed 's/<form id=/\nfound=/g' | grep ^found= | sed 's/"jschl_vc"/\njschl_vc=/g' | grep ^jschl_vc= | cut -d'"' -f2`
    73 #               pass=`cat $TMP/cache.$PARSER.$INPUT.0 | tr '\n' ' ' | sed 's/ \+/ /g' | sed 's/<form id=/\nfound=/g' | grep ^found= | sed 's/"pass"/\npass=/g' | grep ^pass= | cut -d'"' -f2`
    74 #               jschlanswer=2914582
    75 #               `cat $TMP/cache.$PARSER.$INPUT.0 | tr '\n' ' ' | sed 's/ \+/ /g' | sed 's/<form id=/\nfound=/g' | grep ^found= | sed 's/"jschl-answer"/\njschl-answer=/g' | grep ^jschl-answer= | cut -d'"' -f2`
    76 
    77 #               echo actionpath $actionpath
    78 #               echo jschlvc $jschlvc
    79 #               echo pass $pass
    80 #               echo jschlanswer $jschlanswer
    81 
    82 #               echo 222 "$URL"/"$actionpath"?jschl_vc="$jschlvc"&pass="$pass"&jschl_answer="$jschlanswer"
    83 
    84 #               $curlbin "$URL/$actionpath?jschl_vc=$jschlvc&pass=$pass&jschl_answer=$jschlanswer" -o $TMP/cache.$PARSER.$INPUT.00
    85 #               echo $TMP/cache.$PARSER.$INPUT.00
    86 #               exit
    87 
    8857#               $curlbin $URL/$PAGE -o $TMP/cache.$PARSER.$INPUT.1
    8958
     
    168137{
    169138        if [ ! -e "$TMP/$PARSER.$INPUT.list" ] ; then
    170                 $curlbin $URL/$PAGE -o $TMP/cache.$PARSER.$INPUT.1 -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'
     139#               $curlbin $URL/$PAGE -o $TMP/cache.$PARSER.$INPUT.1 -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'
     140                $curlbin $URL/$PAGE -o $TMP/cache.$PARSER.$INPUT.1
     141
    171142#               /tmp/localhoster/hoster.sh get $URL/$PAGE > $TMP/cache.$PARSER.$INPUT.1
    172143
     
    195166{
    196167        if [ ! -e "$TMP/$PARSER.$INPUT.list" ] ; then
    197                 $curlbin $URL/res/links -X POST --data "$PAGE" -o $TMP/cache.$PARSER.$INPUT.1 -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'
     168#               $curlbin $URL/res/links -X POST --data "$PAGE" -o $TMP/cache.$PARSER.$INPUT.1 -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'
     169                $curlbin $URL/res/links -X POST --data "$PAGE" -o $TMP/cache.$PARSER.$INPUT.1
    198170                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' > $TMP/$PARSER.$INPUT.list
    199171#               rm $TMP/cache.$PARSER.$INPUT.* > /dev/null 2>&1
Note: See TracChangeset for help on using the changeset viewer.