- Timestamp:
- 11/05/20 18:44:21 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/mediathek/localparser_secret/beeg.sh
r44920 r44921 4 4 SRC=$1 5 5 INPUT=$2 6 PARAM=$3 7 #URL="https://beeg.com/api/v6/1525723877/" 6 PAGE=$3 7 NEXT=$4 8 PAGE2=$5 9 PARSER=`echo $SRC | tr '/' '\n' | tail -n1 | sed 's/.sh//'` 10 11 if [ -z "$FILENAME" ]; then 12 FILENAME=none 13 fi 14 NAME=`echo -n ${PARSER:0:1} | tr '[a-z]' '[A-Z]'`${PARSER:1} 8 15 URL="https://beeg.com/api/v6/1546225636701/" 9 10 PARSER=`echo $SRC | tr '/' '\n' | tail -n1 | sed 's/.sh//'`11 NAME=`echo -n ${PARSER:0:1} | tr '[a-z]' '[A-Z]'`${PARSER:1}12 16 13 17 case $2 in … … 15 19 *) . /tmp/localhoster/hoster.sh 16 20 mkdir $TMP > /dev/null 2>&1 17 FILENAME="$PARSER $INPUT $PAGE $ PARAM"21 FILENAME="$PARSER $INPUT $PAGE $NEXT $PAGE2" 18 22 FILENAME=$(echo $FILENAME | tr '&' '.' | tr '/' '.' | tr '?' '.' | tr '=' '.' | sed -e 's/\&\+/./g' -e 's#\/\+#.#g' -e 's/\?\+/./g' -e 's/;\+/./g' -e 's/=\+/./g' -e 's/ \+/./g' -e 's/\.\+/./g') 19 23 if [ -z "$FILENAME" ]; then FILENAME=none;fi … … 39 43 mainmenu() 40 44 { 45 46 # echo "Kino#$SRC $SRC search 'filme/' 1 '/?order=veroeffentlichung'#http://atemio.dyndns.tv/mediathek/menu/kino.ger.jpg#kino.ger.jpg#$NAME#0" >$TMP/$FILENAME.list 47 48 41 49 # echo "Sorted by date#$SRC $SRC videos index/main/0/pc#http://atemio.dyndns.tv/mediathek/menu/all-newfirst.jpg#all-newfirst.jpg#$NAME#0" >/tmp/tithek/$PARSER.list 42 echo "Sorted by date#$SRC $SRC videos index/main/1/pc#http://atemio.dyndns.tv/mediathek/menu/all-newfirst.jpg#all-newfirst.jpg#$NAME#0" >/tmp/tithek/$PARSER.list50 echo "Sorted by date#$SRC $SRC videos 'index/main/' 0 '/pc'#http://atemio.dyndns.tv/mediathek/menu/all-newfirst.jpg#all-newfirst.jpg#$NAME#0" >/tmp/tithek/$PARSER.list 43 51 # echo "Popular Tags#$SRC $SRC tags popular#http://atemio.dyndns.tv/mediathek/menu/category.jpg#category.jpg#$NAME#0" >>/tmp/tithek/$PARSER.list 44 52 echo "All Tags#$SRC $SRC tags nonpopular#http://atemio.dyndns.tv/mediathek/menu/category.jpg#category.jpg#$NAME#0" >>/tmp/tithek/$PARSER.list 53 echo "Pornstar#$SRC $SRC pornstar nonpopular#http://atemio.dyndns.tv/mediathek/menu/category.jpg#category.jpg#$NAME#0" >>/tmp/tithek/$PARSER.list 54 45 55 # echo "Long Videos#$SRC $SRC videos index/tag/0/pc?tag=long+videos#http://atemio.dyndns.tv/mediathek/menu/category.jpg#category.jpg#$NAME#0" >>/tmp/tithek/$PARSER.list 46 56 # echo "Search#$SRC $SRC videos index/search/0/pc?query=#http://atemio.dyndns.tv/mediathek/menu/search.jpg#search.jpg#$NAME#112" >>/tmp/tithek/$PARSER.list … … 52 62 53 63 64 #{"pages":218,"videos":[{"quality":null,"title":"An 65 54 66 videos() 55 67 { 68 69 # rm "$TMP/$FILENAME.list" 70 71 if [ ! -e "$TMP/$FILENAME.list" ]; then 72 56 73 #{"quality":null,"title":"Tipping the pizza guy","set_id":106427,"full":1,"ps_name":"Jenny Jinx","nt_name":null,"svid":1122173165,"duration":563,"datetime":"2020-10-25 15:00:05","thumbs": 57 74 58 75 #$curlbin $URL$PARAM > /tmp/1234 59 76 60 #$curlbin $URL$PARAM > /tmp/a12377 #$curlbin "$URL$PAGE$NEXT$PAGE2" > $TMP/$FILENAME.curl.list 61 78 # $curlbin -o - $URL$PARAM | sed -e 's/{/{\n/g' -e 's/,/,\n/g' -e 's/\[/\[\n/g' -e 's/\}/\n\}/g' -e 's/\]/\n\]/g' | awk -v SRC=$SRC -v PARSER=$PARSER -v NAME=$NAME ' 62 79 # $curlbin -o - $URL$PARAM | sed -e 's/{/{\n/g' -e 's/\[/\[\n/g' -e 's/\}/\n\}/g' -e 's/\]/\n\]/g' | awk -v SRC=$SRC -v PARSER=$PARSER -v NAME=$NAME ' 63 $curlbin -o - $URL$PARAM | sed -e 's/{\"quality\"/{\n\"quality\"/g' | awk -v SRC=$SRC -v PARSER=$PARSER -v NAME=$NAME'80 $curlbin -o - "$URL$PAGE$NEXT$PAGE2" | sed -e 's/{\"quality\"/{\n\"quality\"/g' | awk -v SRC=$SRC -v PARSER=$PARSER -v NAME=$NAME -v INPUT=$INPUT -v PAGE=$PAGE -v NEXT=$NEXT -v PAGE2=$PAGE2 ' 64 81 65 82 BEGIN { title = "" … … 70 87 pic = "" 71 88 image = "" 89 pages = "1" 90 } 91 /"pages":/ { 92 # extrahiere den newpage pfad 93 i = index($0, "\"pages\":") + 8 94 j = index(substr($0, i), ",") - 1 95 pages = substr($0, i, j) 96 #print "pages: " pages 72 97 } 73 98 /"quality":/ { … … 99 124 j = index(substr($0, i), "\"") - 1 100 125 image = substr($0, i, j) 101 102 103 if (length(duration) == 1)104 {105 # print "duration: 000+" duration106 pic = pid "-000"duration107 }108 else if (length(duration) == 2)109 {110 # print "duration: 00+" duration111 pic = pid "-00"duration112 }113 else if (length(duration) == 3)114 {115 # print "duration: 0+" duration116 pic = pid "-0"duration117 }118 119 else120 {121 # print "duration: " duration122 pic = pid "-"duration123 }124 126 125 127 pic = image … … 148 150 149 151 } 150 ' >/tmp/tithek/$PARSER.list 151 echo "/tmp/tithek/$PARSER.list" 152 END \ 153 { 154 # if (curpage != pages) 155 print "Page (" NEXT + 1 "/" pages ")#" SRC " " SRC " " INPUT " \x27" PAGE "\x27 " NEXT + 1 " \x27" PAGE2 "\x27#http://atemio.dyndns.tv/mediathek/menu/next.jpg#next.jpg#" NAME "#0" 156 } 157 ' >$TMP/$FILENAME.list 158 fi 159 echo "$TMP/$FILENAME.list" 152 160 } 153 161 154 162 play() 155 163 { 156 /tmp/localhoster/hoster.sh youtube_dl https://beeg.com/$PA RAM> $TMP/cache.$PARSER.$INPUT.1164 /tmp/localhoster/hoster.sh youtube_dl https://beeg.com/$PAGE > $TMP/cache.$PARSER.$INPUT.1 157 165 STREAMURL=`cat $TMP/cache.$PARSER.$INPUT.1` 158 166 cat $STREAMURL | head -n1 … … 161 169 hoster() 162 170 { 163 echo https://beeg.com/$PARAM 164 } 165 166 #unused 167 play1() 168 { 169 $curlbin -o - $URL$PARAM | sed -e 's/{/{\n/g' -e 's/,/,\n/g' -e 's/\[/\[\n/g' -e 's/\}/\n\}/g' -e 's/\]/\n\]/g' | awk -v PARSER=$PARSER -v NAME=$NAME ' 170 BEGIN { table = "" 171 title = "" 172 id = "" 173 v720p = "" 174 v480p = "" 175 v240p = "" 176 h2d = "0123456789ABCDEF" 177 for (i = 0; i <= 255; i++) { 178 ord[sprintf("%c", i)] = i 179 } 180 crc = "uN1ps2eNDSyHUs08RmofF1F8opmhedPKNDWK9w" 181 } 182 /\"/ { m = 1 183 while (m == 1) { 184 s = $0 185 i = gsub("[\"]", "x", s) 186 m = i % 2 187 if (m == 1) { 188 getline l 189 $0 = $0 l 190 } 191 } 192 } 193 /^\{/ { next 194 } 195 /\[$/ { split($0, a, "\"") 196 table = a[2] 197 next 198 } 199 /^\}/ { if (v720p == "null") { 200 if (v480p == "null") { 201 video = decrypt_url(v240p) 202 } 203 else { 204 video = decrypt_url(v480p) 205 } 206 } 207 else { 208 video = decrypt_url(v720p) 209 } 210 if (video != "null") { 211 # print title "#http:" video "#https://img.beeg.com/236x177/" id ".jpg#" PARSER "_" id ".jpg#" NAME "#2" 212 print "http:" video 213 } 214 title = "" 215 id = "" 216 v720p = "" 217 v480p = "" 218 v240p = "" 219 next 220 } 221 /^\]/ { table = "" 222 next 223 } 224 { split($0, a, "\"") 225 if (a[3] ==":") { 226 value = a[4] 227 } 228 else { 229 value = substr(a[3], 2, length(a[3]) - 2) 230 } 231 if (a[2] == "title") { 232 title = value 233 } 234 else { 235 if (a[2] == "id") { 236 id = value 237 } 238 else { 239 if (a[2] == "240p") { 240 v240p = value 241 } 242 else { 243 if (a[2] == "480p") { 244 v480p = value 245 } 246 else { 247 if (a[2] == "720p") { 248 v720p = value 249 } 250 } 251 } 252 } 253 } 254 } 255 256 function decrypt_url(url) 257 { print "URL1: " url >>"/mnt/parser/beeg.log" 258 sub(/\{DATA_MARKERS\}/, "", url) 259 key_von = match(url, /\/key=/) + 5 260 print "URL2: " url >>"/mnt/parser/beeg.log" 261 key_bis = match(url, /\%2Cend/) 262 key_len = key_bis - key_von 263 key = "" 264 for (i = key_von; i < key_bis; i++) { 265 s = substr(url, i , 1) 266 if (s == "%") { 267 n = (index(h2d, toupper(substr(url, i + 1, 1))) - 1) * 16 268 n = n + (index(h2d, toupper(substr(url, i + 2, 1))) - 1) 269 if (n != 194) { 270 s = sprintf("%c", n) 271 } 272 else { 273 s = "" 274 } 275 i = i + 2 276 } 277 key = key s 278 } 279 print "KEY1: " key >>"/mnt/parser/beeg.log" 280 o = "" 281 for (i = 1; i <= length(key); i++) { 282 o = o sprintf("%c", ord[substr(key, i, 1)] - (ord[substr(crc, ((i - 1) % length(crc)) + 1, 1)] % 21)) 283 } 284 print "KEY2: " o >>"/mnt/parser/beeg.log" 285 r = "" 286 for (i = length(o) - 2; i > -2; i = i - 3) { 287 if (i > 0) { 288 r = r substr(o, i, 3) 289 } 290 else { 291 r = r substr(o, 1, 2 + i) 292 } 293 } 294 print "KEY3: " r >>"/mnt/parser/beeg.log" 295 return substr(url, 1, key_von - 1) r substr(url, key_bis) 296 } 297 ' >/tmp/tithek/$PARSER.list 298 # echo "/tmp/tithek/$PARSER.list" 299 cat "/tmp/tithek/$PARSER.list" 171 echo https://beeg.com/$PAGE 300 172 } 301 173 … … 303 175 { 304 176 305 if [ ! -e "/tmp/tithek/$PARSER.list"]; then177 if [ ! -e $TMP/$FILENAME.list ]; then 306 178 #{"tag":"pump","videos":11} 307 179 # $curlbin -o - ${URL}index/main/0/pc | sed -e 's/{DATA_MARKERS}/data=pc.XX/g' -e 's/{/{\n/g' -e 's/,/,\n/g' -e 's/\[/\[\n/g' -e 's/\}/\n\}/g' -e 's/\]/\n\]/g' | awk -v PARAM=$PARAM -v … … 315 187 title = toupper(tag) 316 188 gsub(/ /, "%20", tag) 317 print title "#" SRC " " SRC " videos index/tag/0/pc?tag=" tag "#http://atemio.dyndns.tv/mediathek/menu/" tag ".jpg#" tag ".jpg#" NAME "#0" 318 } 319 ' >/tmp/tithek/$PARSER.list 320 echo "/tmp/tithek/$PARSER.list" 321 fi 322 323 } 189 print title "#" SRC " " SRC " videos \x27index/tag/\x27 0 \x27/pc?tag=" tag "\x27#http://atemio.dyndns.tv/mediathek/menu/" tag ".jpg#" tag ".jpg#" NAME "#0" 190 } 191 ' >$TMP/$FILENAME.list 192 fi 193 echo $TMP/$FILENAME.list 194 } 195 196 #https://api.beeg.com/api/v6/1595400363153/index/people/0/pc?search_mode=code&people=Kiittenymph 197 198 pornstar() 199 { 200 201 if [ ! -e $TMP/$FILENAME.list ]; then 202 203 #{"tag":"pump","videos":11} 204 # $curlbin -o - ${URL}index/main/0/pc | sed -e 's/{DATA_MARKERS}/data=pc.XX/g' -e 's/{/{\n/g' -e 's/,/,\n/g' -e 's/\[/\[\n/g' -e 's/\}/\n\}/g' -e 's/\]/\n\]/g' | awk -v PARAM=$PARAM -v 205 $curlbin -o - ${URL}index/main/0/pc | sed -e 's/{DATA_MARKERS}/data=pc.XX/g' -e 's/{/{\n/g' -e 's/\}/\n\}/g' -e 's/\]/\n\]/g' | awk -v PARAM=$PARAM -v SRC=$SRC -v NAME=$NAME ' 206 BEGIN { table = "" 207 } 208 /"ps_name":/ { split($0, a, "\"") 209 210 # extrahiere den newpage pfad 211 i = index($0, "\"ps_name\":\"") + 11 212 j = index(substr($0, i), "\",") - 1 213 ps_name = substr($0, i, j) 214 215 # ps_name = a[4] 216 #print "00000: " $0 217 #print "22222: " ps_name 218 # title = toupper(ps_name) 219 title = ps_name 220 221 # gsub(/ /, "%20", ps_name) 222 print title "#" SRC " " SRC " videos \x27index/people/\x27 0 \x27/pc?search_mode=code&people=" ps_name "\x27#http://atemio.dyndns.tv/mediathek/menu/" ps_name ".jpg#" ps_name ".jpg#" NAME "#0" 223 } 224 ' >$TMP/$FILENAME.list 225 fi 226 echo "$TMP/$FILENAME.list" 227 228 } 229 230 #{"quality":null,"title":"Super pochaco takes advantage of you","set_id":106661,"full":1,"ps_name":"Hidori Rose","nt_name":null,"svid":1711098099,"duration":907,"datetime":"2020-10-26 0 231 232 #{"tag":"white","videos":33058},{"tag":"whore","videos":100},{"tag":"widow","videos":1},{"tag":"wife","videos":618},{"tag":"wife share","videos":2},{"tag":"wild","videos":256}, 324 233 325 234 case $INPUT in … … 331 240 tags) $INPUT;; 332 241 page) $INPUT;; 242 pornstar) $INPUT;; 333 243 esac 334 244
Note: See TracChangeset
for help on using the changeset viewer.