Changeset 41210 for titan


Ignore:
Timestamp:
11/19/17 18:16:39 (6 years ago)
Author:
obi
Message:

tithek change USERAGENT

File:
1 edited

Legend:

Unmodified
Added
Removed
  • titan/mediathek/localhoster/hoster.sh

    r41177 r41210  
    1212TMP=/tmp/localcache
    1313CMD=/tmp/localhoster
    14 USERAGENT='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'
     14#USERAGENT='Mozilla/5.0 (Windows NT 6.3; rv:36.0) Gecko/20100101 Firefox/36.0'
     15USERAGENT='Mozilla%2F5.0+%28Windows+NT+6.3%3B+rv%3A36.0%29+Gecko%2F20100101+Firefox%2F36.0'
    1516debuglevel=`cat /mnt/config/titan.cfg | grep debuglevel | cut -d"=" -f2`
    16 curlbin="curl -k -s -L --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies -A $USERAGENT"
    17 curlbin2='curl -k -s --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies'
     17curlbin="curl -k -s -L --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies -A '$USERAGENT'"
     18curlbin2='curl -k -s --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies -A '$USERAGENT''
    1819youtubebin="$CMD/lib/youtube_dl/__main__.py --no-check-certificate --cookies /mnt/network/cookies --user-agent '$USERAGENT' --format mp4 --restrict-filenames --ignore-errors -g"
    1920youtubebinbg="$CMD/lib/youtube_dl/__main__.py --no-check-certificate --cookies /mnt/network/cookies --user-agent '$USERAGENT' --format mp4 --restrict-filenames --ignore-errors --output"
     
    7374
    7475debuglevel=`cat /mnt/config/titan.cfg | grep debuglevel | cut -d"=" -f2`
    75 curlbin='curl -k -s -L --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies'
    7676if [ "$debuglevel" == "99" ]; then curlbin="$curlbin -v"; fi
    7777
     
    234234}
    235235
     236aliez()
     237{
     238        URL=`$curlbin "$INPUT" | sed 's/source:/\nsource:/' | grep ^source: | cut -d"'" -f2`
     239        REFERER=`echo "$INPUT" | sed -e 's/=/3D/g' -e 's/&/26/g'`
     240        echo "$URL|Referer=$REFERER&User-Agent=$USERAGENT"
     241#       echo "$URL|Referer=$REFERER&User-Agent='Mozilla/5.0 (Windows NT 6.3; rv:36.0) Gecko/20100101 Firefox/36.0'"
     242}
     243
     244#http://emb.aliez.me/player/live.php?id=56180&w=700&h=480"
     245
     246
    236247directstream()
    237248{
     
    243254youtube_dl()
    244255{
    245 #       rm -f /tmp/_last_hoster_* > /dev/null 2>&1
    246         echo "$BIN $youtubebin $INPUT" > /tmp/.last_hoster_youtube_dl.log
    247 #       $BIN $youtubebin "$INPUT"
    248 #       $BIN $CMD/lib/youtube_dl/__main__.py --no-check-certificate --cookies /mnt/network/cookies --user-agent "$USERAGENT" --all-formats -g "$INPUT"
    249 #       URL=`$BIN $CMD/lib/youtube_dl/__main__.py --no-check-certificate --cookies /mnt/network/cookies --user-agent "$USERAGENT" --format mp4 --restrict-filenames --ignore-errors -g "$INPUT"`
    250 #       echo "$URL" >> /tmp/.last_hoster_youtube_dl.log
     256#       echo "$BIN $youtubebin $INPUT" > /tmp/.last_hoster_youtube_dl.log
     257#       $BIN $CMD/lib/youtube_dl/__main__.py --no-check-certificate --cookies /mnt/network/cookies --user-agent "$USERAGENT" --format mp4 --restrict-filenames --ignore-errors -g "$INPUT" > /tmp/youtube_dl.streamlink.log 2>&1
     258#       cat /tmp/youtube_dl.streamlink.log | tail -n1
     259        $BIN $youtubebin "$INPUT"
     260}
     261
     262youtube_dlbg()
     263{
     264#       echo "$BIN $youtubebinbg $DEST $INPUT" > /tmp/.last_hoster_youtube_dlbg.log
     265#       URL=`$BIN $CMD/lib/youtube_dl/__main__.py --no-check-certificate --cookies /mnt/network/cookies --user-agent "$USERAGENT" --format mp4 --restrict-filenames --ignore-errors --output "$1" "$2"`
     266#       echo "$URL" >> /tmp/.last_hoster_youtube_dlbg.log
    251267#       echo $URL
    252 
    253         $BIN $CMD/lib/youtube_dl/__main__.py --no-check-certificate --cookies /mnt/network/cookies --user-agent "$USERAGENT" --format mp4 --restrict-filenames --ignore-errors -g "$INPUT" > /tmp/youtube_dl.streamlink.log 2>&1
    254         cat /tmp/youtube_dl.streamlink.log | tail -n1
    255 }
    256 
    257 youtube_dlbg()
    258 {
    259 #       rm -f /tmp/_last_hoster_* > /dev/null 2>&1
    260         echo "$BIN $youtubebinbg $DEST $INPUT" > /tmp/.last_hoster_youtube_dlbg.log
    261 #       $BIN $youtubebin "$INPUT"
    262 #       $BIN $CMD/lib/youtube_dl/__main__.py --no-check-certificate --cookies /mnt/network/cookies --user-agent "$USERAGENT" --all-formats -g "$INPUT"
    263         URL=`$BIN $CMD/lib/youtube_dl/__main__.py --no-check-certificate --cookies /mnt/network/cookies --user-agent "$USERAGENT" --format mp4 --restrict-filenames --ignore-errors --output "$1" "$2"`
    264         echo "$URL" >> /tmp/.last_hoster_youtube_dlbg.log
    265         echo $URL
    266 }
     268        $BIN $youtubebinbg $DEST $INPUT
     269}
     270
    267271if [ "$TYPE" == "get" ];then
    268         echo  "$INPUT" > /tmp/.last_hoster_$hoster.log
     272        echo  "$INPUT" > /tmp/.last_hoster_$TYPE_$hoster.log
    269273        case $hoster in
    270274                ecostream) ecostream $INPUT;;
     
    294298                vidlox) vidlox $INPUT;;
    295299                redirector|googlevideo|vodcloud|google) directstream "$INPUT";;
     300                aliez) aliez $INPUT;;
    296301        esac
    297302fi
    298303
    299304if [ "$TYPE" == "youtube_dl" ];then
     305        echo  "$INPUT" > /tmp/.last_hoster_$TYPE_$hoster.log
    300306        case $hoster in
    301307                *) youtube_dl $INPUT;;
     
    304310
    305311if [ "$TYPE" == "youtube_dlbg" ];then
     312        echo  "$INPUT" > /tmp/.last_hoster_$TYPE_$hoster.log
    306313        case $hoster in
    307314                *) youtube_dlbg $DEST $INPUT;;
Note: See TracChangeset for help on using the changeset viewer.