- Timestamp:
- 11/19/17 18:16:39 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/mediathek/localhoster/hoster.sh
r41177 r41210 12 12 TMP=/tmp/localcache 13 13 CMD=/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' 15 USERAGENT='Mozilla%2F5.0+%28Windows+NT+6.3%3B+rv%3A36.0%29+Gecko%2F20100101+Firefox%2F36.0' 15 16 debuglevel=`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 '17 curlbin="curl -k -s -L --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies -A '$USERAGENT'" 18 curlbin2='curl -k -s --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies -A '$USERAGENT'' 18 19 youtubebin="$CMD/lib/youtube_dl/__main__.py --no-check-certificate --cookies /mnt/network/cookies --user-agent '$USERAGENT' --format mp4 --restrict-filenames --ignore-errors -g" 19 20 youtubebinbg="$CMD/lib/youtube_dl/__main__.py --no-check-certificate --cookies /mnt/network/cookies --user-agent '$USERAGENT' --format mp4 --restrict-filenames --ignore-errors --output" … … 73 74 74 75 debuglevel=`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'76 76 if [ "$debuglevel" == "99" ]; then curlbin="$curlbin -v"; fi 77 77 … … 234 234 } 235 235 236 aliez() 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 236 247 directstream() 237 248 { … … 243 254 youtube_dl() 244 255 { 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 262 youtube_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 251 267 # 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 267 271 if [ "$TYPE" == "get" ];then 268 echo "$INPUT" > /tmp/.last_hoster_$ hoster.log272 echo "$INPUT" > /tmp/.last_hoster_$TYPE_$hoster.log 269 273 case $hoster in 270 274 ecostream) ecostream $INPUT;; … … 294 298 vidlox) vidlox $INPUT;; 295 299 redirector|googlevideo|vodcloud|google) directstream "$INPUT";; 300 aliez) aliez $INPUT;; 296 301 esac 297 302 fi 298 303 299 304 if [ "$TYPE" == "youtube_dl" ];then 305 echo "$INPUT" > /tmp/.last_hoster_$TYPE_$hoster.log 300 306 case $hoster in 301 307 *) youtube_dl $INPUT;; … … 304 310 305 311 if [ "$TYPE" == "youtube_dlbg" ];then 312 echo "$INPUT" > /tmp/.last_hoster_$TYPE_$hoster.log 306 313 case $hoster in 307 314 *) youtube_dlbg $DEST $INPUT;;
Note: See TracChangeset
for help on using the changeset viewer.