Changeset 42024 for titan/mediathek/localhoster
- Timestamp:
- 03/31/18 18:23:35 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/mediathek/localhoster/hoster.sh
r41995 r42024 209 209 cloudflare() 210 210 { 211 $BIN $CMD/cloudflare.py $INPUT 211 mkdir $TMP > /dev/null 2>&1 212 $BIN $CMD/cloudflare.py $INPUT > $TMP/cache.hoster.$hoster.1 2>&1 213 if [ `cat $TMP/cache.hoster.$hoster.1 | grep "urllib2.HTTPError" | wc -l` -eq 1 ];then 214 ERROR=`cat $TMP/cache.hoster.$hoster.1 | grep urllib2.HTTPError:` 215 echo "errormsg: $ERROR" 216 else 217 cat $TMP/cache.hoster.$hoster.1 218 fi 219 } 220 221 kinox() 222 { 223 mkdir $TMP > /dev/null 2>&1 224 225 if [ "$TYPE" == "get" ];then 226 $BIN $CMD/cloudflare.py $INPUT > $TMP/cache.hoster.$hoster.1 2>&1 227 if [ `cat $TMP/cache.hoster.$hoster.1 | grep "urllib2.HTTPError" | wc -l` -eq 1 ];then 228 ERROR=`echo $INPUT | grep urllib2.HTTPError:` 229 echo "errormsg: $ERROR" 230 else 231 cat $TMP/cache.hoster.$hoster.1 232 fi 233 elif [ "$TYPE" == "hoster" ];then 234 235 if [ `echo $INPUT | grep "/aGET/" | wc -l` -eq 1 ];then 236 URL=`$BIN $CMD/cloudflare.py $INPUT | tr -d '\\' | sed -nr 's/.*<iframe src="([^"]+)".*/\1/p'` 237 if [ -z "$URL" ];then 238 URL=`$BIN $CMD/cloudflare.py $INPUT | tr -d '\\' | sed -nr 's/.*<a href="([^"]+)".*/\1/p'` 239 fi 240 if [ `echo $URL | grep "urllib2.HTTPError" | wc -l` -eq 1 ];then 241 ERROR=`echo $INPUT | grep urllib2.HTTPError:` 242 echo "errormsg: $ERROR" 243 else 244 if [ `echo $URL | grep ^"//" | wc -l` -eq 1 ];then 245 echo "http:$URL" 246 else 247 echo "$URL" 248 fi 249 fi 250 else 251 $BIN $CMD/cloudflare.py $INPUT 252 fi 253 fi 212 254 } 213 255 … … 712 754 fi 713 755 756 if [ "$TYPE" == "hoster" ];then 757 echo "$INPUT" > /tmp/.last_hoster_$TYPE_$hoster.log 758 case $hoster in 759 kinox|kinos) kinox $INPUT;; 760 esac 761 fi 762 714 763 if [ "$TYPE" == "youtube_dl" ];then 715 764 echo "$INPUT" > /tmp/.last_hoster_$TYPE_$hoster.log
Note: See TracChangeset
for help on using the changeset viewer.