source: titan/mediathek/localparser_secret/streamcloud.sh @ 41363

Last change on this file since 41363 was 41363, checked in by obi, 5 years ago

update streamcloud.me

File size: 11.8 KB
Line 
1#!/bin/sh
2# first sh box parser for titannit mfg obi
3
4. /tmp/localhoster/hoster.sh
5
6#SRC=$1
7#INPUT=$2
8#PAGE=$3
9#NEXT=$4
10#
11#FILENAME=`echo $PAGE | tr '/' '.'`
12#FILENAME=`echo $FILENAME | tr '&' '.'`
13#
14#if [ -z "$PAGE" ]; then
15#       FILENAME=none
16#fi
17
18SRC=$1
19INPUT=$2
20PAGE=$3
21NEXT=$4
22PAGE2=$5
23PARSER=`echo $SRC | tr '/' '\n' | tail -n1 | sed 's/.sh//'`
24
25FILENAME="$PARSER $INPUT $PAGE $NEXT $PAGE2"
26FILENAME=`echo $FILENAME  | sed -e 's/\-\+/./g' | sed -e 's/\+\+/./g' | tr '&' '.' | tr '/' '.' | tr '?' '.'  | tr '=' '.' | sed 's/ \+/./g' | sed 's/\.\+/./g'`
27
28if [ -z "$FILENAME" ]; then
29        FILENAME=none
30fi
31
32URL=http://streamcloud.me
33PARSER=`echo $SRC | tr '/' '\n' | tail -n1 | sed 's/.sh//'`
34NAME=Streamcloud.me
35
36mkdir $TMP > /dev/null 2>&1
37
38if [ `echo $SRC | grep ^"/mnt/parser" | wc -l` -gt 0 ];then
39        TYPE="$SRC - Shell script"
40elif [ `echo $SRC | grep ^"/var/swap" | wc -l` -gt 0 ];then
41        TYPE="Swap - Shell script"
42elif [ `echo $SRC | grep ^"/mnt/swapextensions" | wc -l` -gt 0 ];then
43        TYPE="Mnt - Shell script"
44else
45        TYPE="Flash - Shell script"
46fi
47
48init()
49{
50        rm -rf $TMP > /dev/null 2>&1
51        echo "$NAME ($TYPE)#$SRC $SRC mainmenu#http://atemio.dyndns.tv/mediathek/menu/$PARSER.jpg#$PARSER.jpg#TiThek#0"
52}
53
54mainmenu()
55{
56        echo "Kino#$SRC $SRC kino '/'#http://atemio.dyndns.tv/mediathek/menu/kino.jpg#kino.jpg#$NAME#0" >$TMP/$FILENAME.list
57        echo "New#$SRC $SRC search '?c=movie&m=filter&keyword=&res=&genre=&cast=&year=&order_by=releases&series=&date=year&country=&per_page=' 0#http://atemio.dyndns.tv/mediathek/menu/all-newfirst.jpg#all-newfirst.jpg#$NAME#0" >>$TMP/$FILENAME.list
58        echo "Updates#$SRC $SRC search '?c=movie&m=filter&keyword=&res=&genre=&cast=&year=&order_by=updates&series=&date=year&country=&per_page=' 0#http://atemio.dyndns.tv/mediathek/menu/Movies.updates.jpg#Movies.updates.jpg#$NAME#0" >>$TMP/$FILENAME.list
59        echo "Beliebt#$SRC $SRC search '?c=movie&m=filter&keyword=&res=&genre=&cast=&year=&order_by=views&series=&date=year&country=&per_page=' 0#http://atemio.dyndns.tv/mediathek/menu/most.viewed.jpg#most.viewed.jpg#$NAME#0" >>$TMP/$FILENAME.list
60        echo "Top Imdb#$SRC $SRC search '?c=movie&m=filter&keyword=&res=&genre=&cast=&year=&order_by=rating&series=&date=year&country=&per_page=' 0#http://atemio.dyndns.tv/mediathek/menu/top.100.filme.jpg#top.100.filme.jpg#$NAME#0" >>$TMP/$FILENAME.list
61        echo "Genre#$SRC $SRC genre#http://atemio.dyndns.tv/mediathek/menu/Movies.genre.jpg#Movies.genre.jpg#$NAME#0" >>$TMP/$FILENAME.list
62        echo "Year#$SRC $SRC year#http://atemio.dyndns.tv/mediathek/menu/movie.year.jpg#movie.year.jpg#$NAME#0" >>$TMP/$FILENAME.list
63        echo "$TMP/$FILENAME.list"
64}
65
66year()
67{
68        if [ ! -e "$TMP/$FILENAME.list" ]; then
69                $curlbin $URL -o $TMP/cache.$FILENAME.1
70                watchlist=`cat $TMP/cache.$FILENAME.1 | grep year | sed "s#/year/#\nyear='#g" | grep ^year | cut -d"'" -f2 | sort -ur`
71
72                rm $TMP/$FILENAME.list > /dev/null 2>&1
73
74                for ROUND0 in $watchlist; do
75                        TITLE=`echo $ROUND0`
76                        filename=`echo $TITLE | tr [A-Z] [a-z]`
77                        echo "$TITLE#$SRC $SRC search '?c=movie&m=filter&keyword=&res=&genre=&cast=&year=$ROUND0&order_by=views&series=&date=&country=&per_page=' 0#http://atemio.dyndns.tv/mediathek/menu/$filename.jpg#$filename.jpg#$NAME#0" >> $TMP/$FILENAME.list
78                done
79        fi
80        echo "$TMP/$FILENAME.list"
81}
82
83
84genre()
85{
86        if [ ! -e "$TMP/$FILENAME.list" ]; then
87                watchlist="
88                        ?c=movie&m=filter&order_by=views&genre=Action
89                        ?c=movie&m=filter&order_by=views&genre=Abenteuer
90                        ?c=movie&m=filter&order_by=views&genre=Animation
91                        ?c=movie&m=filter&order_by=views&genre=Biographie
92                        ?c=movie&m=filter&order_by=views&genre=Komödie
93                        ?c=movie&m=filter&order_by=views&genre=Krimi
94                        ?c=movie&m=filter&order_by=views&genre=Drama
95                        ?c=movie&m=filter&order_by=views&genre=Familie
96                        ?c=movie&m=filter&order_by=views&genre=Fantasy
97                        ?c=movie&m=filter&order_by=views&genre=Historie
98                        ?c=movie&m=filter&order_by=views&genre=Horror
99                        ?c=movie&m=filter&order_by=views&genre=Mystery
100                        ?c=movie&m=filter&order_by=views&genre=Romantik
101                        ?c=movie&m=filter&order_by=views&genre=Science%20Fiction
102                        ?c=movie&m=filter&order_by=views&genre=Sport
103                        ?c=movie&m=filter&order_by=views&genre=Thriller
104                        ?c=movie&m=filter&order_by=views&genre=Krieg
105                        ?c=movie&m=filter&order_by=views&genre=Western
106                        "
107                rm $TMP/$FILENAME.list > /dev/null 2>&1
108
109                for ROUND0 in $watchlist; do
110                        TITLE=`echo $ROUND0 | cut -d"=" -f5 | sed 's/.html//'`
111                        NUMMER=`echo $ROUND0 | cut -d"-" -f3`
112
113                        filename=`echo $TITLE | tr [A-Z] [a-z]`
114                        echo "$TITLE#$SRC $SRC search '$ROUND0&cast=&year=&order_by=views&series=&date=&country=&per_page=' 0#http://atemio.dyndns.tv/mediathek/menu/$filename.jpg#$filename.jpg#$NAME#0" >> $TMP/$FILENAME.list
115                done
116        fi
117        echo "$TMP/$FILENAME.list"
118}
119
120sorted()
121{
122        if [ ! -e "$TMP/$FILENAME.list" ]; then
123                watchlist="0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z"
124
125                rm $TMP/$FILENAME.list > /dev/null 2>&1
126
127                for ROUND0 in $watchlist; do
128                        TITLE=`echo $ROUND0`
129                        filename=`echo $TITLE | tr [A-Z] [a-z]`
130                        echo "$TITLE#$SRC $SRC search 'movies-all-$ROUND0-' 1 '.html'#http://atemio.dyndns.tv/mediathek/menu/$filename.jpg#$filename.jpg#$NAME#0" >> $TMP/$FILENAME.list
131                done
132        fi
133        echo "$TMP/$FILENAME.list"
134}
135
136search()
137{
138#       rm $TMP/cache.$FILENAME.* > /dev/null 2>&1
139#       rm $TMP/$FILENAME.list
140        if [ ! -e "$TMP/$FILENAME.list" ]; then
141                piccount=0
142
143                $curlbin $URL/$PAGE$NEXT$PAGE2 -o $TMP/cache.$FILENAME.1
144                pages=`cat $TMP/cache.$FILENAME.1 | sed 's/href/\nfound=/g'| grep ^found | grep "Last &rsaquo" | sed -nr 's/.*per_page=([^=]+)">.*/\1/p'`
145
146                if [ -z "$pages" ];then
147                        pages=0
148                else
149                        pages=`expr $pages / 10`
150                fi
151
152                cat $TMP/cache.$FILENAME.1 | tr '\n' ' ' | sed 's!<a class="clip-link"!\nfound=!g' | grep ^"found=" >$TMP/cache.$FILENAME.2
153
154                while read -u 3 ROUND; do
155                        TITLE=$(echo $ROUND | sed -nr 's/.*data-id="5010" title="([^"]+)".*/\1/p')
156                        if [ -z "$TITLE" ];then
157                                TITLE=$(echo $ROUND | sed -nr 's/.*alt="([^"]+)".*/\1/p')
158                        fi
159#                       NEWPAGE=$(echo $ROUND | sed -nr 's/.*href="([^"]+)".*/\1/p')
160                        NEWPAGE=$(echo $ROUND | sed 's/href=/\nfoundlink=/' | grep ^foundlink= | cut -d'"' -f2 | tail -n1)
161                        PIC=$(echo $ROUND | sed -nr 's/.*<img src="([^"]+)".*/\1/p')
162       
163       
164                        if [ -z "$PIC" ]; then
165                                PIC="http://atemio.dyndns.tv/mediathek/menu/default.jpg"
166                        fi
167       
168                        TITLE=`echo $TITLE | sed -e 's/&#038;/&/g' -e 's/&amp;/und/g' -e 's/&quot;/"/g' -e 's/&lt;/\</g' -e 's/&#034;/\"/g' -e 's/&#039;/\"/g' -e 's/#034;/\"/g' -e 's/#039;/\"/g' -e 's/&szlig;/\C3x/g' -e 's/&ndash;/-/g' -e 's/&Auml;/\C3/g' -e 's/&Uuml;/\C3S/g' -e 's/&Ouml;/\C3/g' -e 's/&auml;/\E4/g' -e 's/&uuml;/\FC/g' -e 's/&ouml;/\F6/g' -e 's/&eacute;/\E9/g' -e 's/&egrave;/\E8/g' -e 's/%F6/\F6/g' -e 's/%FC/\FC/g' -e 's/%E4/\E4/g' -e 's/%26/&/g' -e 's/%C4/\C3/g' -e 's/%D6/\C3/g' -e 's/%DC/\C3S/g' -e 's/%28/(/g' -e 's/%29/)/g' -e 's/%3A/:/g' -e 's/%40/@/g' -e 's/%2B/&/g' -e 's/%C3/A/g' -e 's/%B1/&/g' -e 's/%5B//g' -e 's/%5D//g' -e 's!%2F!/!g' -e 's/|/ /g' -e 's/(/ /g' -e 's/)/ /g' -e 's/+/ /g' -e 's/\//-/g' -e 's/,/ /g' -e 's/;/ /g' -e 's/:/ /g' -e 's/\.\+/./g'`
169#       echo TITLE $TITLE
170                        if [ ! -z "$TITLE" ] && [ ! -z "$NEWPAGE" ];then
171                                if [ ! -e $TMP/$FILENAME.list ];then
172                                        touch $TMP/$FILENAME.list
173                                fi
174                                piccount=`expr $piccount + 1`
175                                LINE="$TITLE $LANG#$SRC $SRC hosterlist $NEWPAGE#$PIC#$PARSER.$INPUT.$NEXT.$PAGE2.$FILENAME.$piccount.jpg#$NAME#0"
176       
177                                echo "$LINE" >> $TMP/$FILENAME.list
178                        fi
179       
180                done 3<$TMP/cache.$FILENAME.2
181
182                #work
183                if [ "$NEXT" == 0 ];then
184                        NEXT=1
185                fi
186
187                if [ "$NEXT" -lt "$pages" ]; then
188                        NEXTPAGE=`expr $NEXT + 10`
189                        NEXT=`expr $NEXT + 1`
190
191#                       LINE="Page ($NEXTPAGE/$pages)#$SRC $SRC search '$PAGE' $NEXTPAGE '$PAGE2'#http://atemio.dyndns.tv/mediathek/menu/next.jpg#next.jpg#$NAME#0"
192                        LINE="Page ($NEXT/$pages)#$SRC $SRC search '$PAGE' $NEXTPAGE#http://atemio.dyndns.tv/mediathek/menu/next.jpg#next.jpg#$NAME#0"
193
194                        echo "$LINE" >> $TMP/$FILENAME.list
195                fi
196                rm $TMP/cache.$FILENAME.* > /dev/null 2>&1
197        fi
198        echo "$TMP/$FILENAME.list"
199}
200
201kino()
202{
203        if [ ! -e "$TMP/$FILENAME.list" ]; then
204                piccount=0
205                $curlbin "$URL/$PAGE" -o "$TMP/cache.$FILENAME.1"
206                cat $TMP/cache.$FILENAME.1 | tr '\n' ' ' | sed "s!</li></a><a!\nfound=!g" | grep ^found= >$TMP/cache.$FILENAME.2
207
208                while read -u 3 ROUND; do
209                        ID=$(echo $ROUND | sed -nr "s/.*-stream-([^-]+).html.*/\1/p")
210                        PIC=$(echo $ROUND | grep $ID.jpg | sed -nr "s/.*<img src='([^']+)'.*/\1/p")
211                        NEWPAGE=$(echo $ROUND | sed -nr "s/.*href='([^']+)'.*/\1/p")
212#                       TITLE=$(echo $ROUND | sed -nr "s/.*> <span title='([^']+)style=.*/\1/p")
213                        TITLE=$(echo $ROUND | sed "s!<span title='!\nfound=!g" | sed "s!' style=!\n!g" | grep ^found= | grep -v href | cut -d"=" -f2 | head -n1)
214
215                        if [ -z "$PIC" ]; then
216                                PIC="http://atemio.dyndns.tv/mediathek/menu/default.jpg"
217                        fi
218
219                        TITLE=`echo $TITLE | sed -e 's/&#038;/&/g' -e 's/&amp;/und/g' -e 's/&quot;/"/g' -e 's/&lt;/\</g' -e 's/&#034;/\"/g' -e 's/&#039;/\"/g' -e 's/#034;/\"/g' -e 's/#039;/\"/g' -e 's/&szlig;/\C3x/g' -e 's/&ndash;/-/g' -e 's/&Auml;/\C3/g' -e 's/&Uuml;/\C3S/g' -e 's/&Ouml;/\C3/g' -e 's/&auml;/\E4/g' -e 's/&uuml;/\FC/g' -e 's/&ouml;/\F6/g' -e 's/&eacute;/\E9/g' -e 's/&egrave;/\E8/g' -e 's/%F6/\F6/g' -e 's/%FC/\FC/g' -e 's/%E4/\E4/g' -e 's/%26/&/g' -e 's/%C4/\C3/g' -e 's/%D6/\C3/g' -e 's/%DC/\C3S/g' -e 's/%28/(/g' -e 's/%29/)/g' -e 's/%3A/:/g' -e 's/%40/@/g' -e 's/%2B/&/g' -e 's/%C3/A/g' -e 's/%B1/&/g' -e 's/%5B//g' -e 's/%5D//g' -e 's!%2F!/!g' -e 's/|/ /g' -e 's/(/ /g' -e 's/)/ /g' -e 's/+/ /g' -e 's/\//-/g' -e 's/,/ /g' -e 's/;/ /g' -e 's/:/ /g' -e 's/\.\+/./g'`
220
221                        if [ ! -z "$TITLE" ] && [ ! -z "$NEWPAGE" ];then
222                                if [ ! -e $TMP/$FILENAME.list ];then
223                                        touch $TMP/$FILENAME.list
224                                fi
225                                piccount=`expr $piccount + 1`
226                                LINE="$TITLE#$SRC $SRC hosterlist $NEWPAGE#$PIC#$PARSER.$INPUT.$NEXT.$PAGE2.$FILENAME.$piccount.jpg#$NAME#0"
227
228                                echo "$LINE" >> $TMP/$FILENAME.list
229                        fi
230
231                done 3<$TMP/cache.$FILENAME.2
232                rm $TMP/cache.$FILENAME.* > /dev/null 2>&1
233        fi
234        echo "$TMP/$FILENAME.list"
235}
236
237hosterlist()
238{
239        if [ ! -e "$TMP/$FILENAME.list" ]; then
240                $curlbin "$PAGE" -o $TMP/cache.$FILENAME.1
241                cat $TMP/cache.$FILENAME.1 | grep iframe | sed -nr 's/.*src="([^"]+)".*/\1/p' >$TMP/cache.$FILENAME.2
242
243                while read -u 3 ROUND; do
244                        NEWPAGE="$ROUND"
245                        TITLE=`echo $ROUND | sed -nr 's/.*:\/\/([^\/]+)\/.*/\1/p'`             
246                        $curlbin "$NEWPAGE" -o $TMP/cache.$FILENAME.4
247
248#                       <a class='play_container' href='http://www.vodlocker.to/embed?t=Die+Eisk%C3%B6nigin%3A+Olaf+taut+auf&y=2017&lang=de&referrer=link'>
249                        cat $TMP/cache.$FILENAME.4 | grep play_container | sed -nr "s/.*href='([^']+)'.*/\1/p" >$TMP/cache.$FILENAME.4.url1
250                        URL=`cat $TMP/cache.$FILENAME.4.url1`
251                        if [ ! -z "$URL" ];then
252                                TITLE=`echo $URL | sed -nr 's/.*:\/\/([^\/]+)\/.*/\1/p'`               
253                                NEWPAGE=$URL
254                        fi
255
256                        if [ ! -z "$URL" ];then
257                                $curlbin "$URL" -o $TMP/cache.$FILENAME.5
258
259#                               $("#hostname").html("<a href='http://openload.co/embed/vq1HFMJ5vAo/detroit.SD-spectre.mkv' target='_blank' style='color:gold; text-decoration:underline;'>openload.co</a>");
260                                cat $TMP/cache.$FILENAME.5 | grep "#hostname" | sed -nr "s/.*a href='([^']+)'.*/\1/p" | grep -v "+link+" >$TMP/cache.$FILENAME.5.url1
261                                URL=`cat $TMP/cache.$FILENAME.5.url1`
262                                if [ ! -z "$URL" ];then
263                                        TITLE=`echo $URL | sed -nr 's/.*:\/\/([^\/]+)\/.*/\1/p'`               
264                                fi             
265
266                                if [ ! -z "$URL" ];then
267                                        TITLE=`echo $URL | sed -nr 's/.*:\/\/([^\/]+)\/.*/\1/p'`               
268                                        NEWPAGE=$URL
269                                fi
270                        fi
271
272                        if [ ! -z "$TITLE" ] && [ "$TITLE" != " " ] && [ ! -z "$NEWPAGE" ];then
273                                PIC=`echo $TITLE | tr [A-Z] [a-z] | sed 's/www.//' | cut -d"." -f1 | sed 's/streamclou/streamcloud/'`
274                                LINE="$TITLE#$SRC $SRC hoster '$NEWPAGE'#http://atemio.dyndns.tv/mediathek/menu/$PIC.jpg#$PIC.jpg#$NAME#111"
275
276                                echo "$LINE" >> $TMP/$FILENAME.list
277                        fi
278                done 3<$TMP/cache.$FILENAME.2
279                rm $TMP/cache.$FILENAME.* > /dev/null 2>&1
280        fi
281        echo "$TMP/$FILENAME.list"
282}
283
284
285hoster()
286{
287        STREAMURL="$PAGE"
288        echo $STREAMURL
289}
290
291
292case $INPUT in
293        init) $INPUT;;
294        mainmenu) $INPUT;;
295        hosterlist) $INPUT;;
296        hoster) $INPUT;;
297        search) $INPUT;;
298        kino) $INPUT;;
299        genre) $INPUT;;
300        year) $INPUT;;
301esac
Note: See TracBrowser for help on using the repository browser.