Changeset 44921 for titan/mediathek


Ignore:
Timestamp:
11/05/20 18:44:21 (3 years ago)
Author:
obi
Message:

tithek update beeg add next page

File:
1 edited

Legend:

Unmodified
Added
Removed
  • titan/mediathek/localparser_secret/beeg.sh

    r44920 r44921  
    44SRC=$1
    55INPUT=$2
    6 PARAM=$3
    7 #URL="https://beeg.com/api/v6/1525723877/"
     6PAGE=$3
     7NEXT=$4
     8PAGE2=$5
     9PARSER=`echo $SRC | tr '/' '\n' | tail -n1 | sed 's/.sh//'`
     10
     11if [ -z "$FILENAME" ]; then
     12        FILENAME=none
     13fi
     14NAME=`echo -n ${PARSER:0:1} | tr '[a-z]' '[A-Z]'`${PARSER:1}
    815URL="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}
    1216
    1317case $2 in
     
    1519        *)      . /tmp/localhoster/hoster.sh
    1620                mkdir $TMP > /dev/null 2>&1
    17                 FILENAME="$PARSER $INPUT $PAGE $PARAM"
     21                FILENAME="$PARSER $INPUT $PAGE $NEXT $PAGE2"
    1822                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')
    1923                if [ -z "$FILENAME" ]; then FILENAME=none;fi
     
    3943mainmenu()
    4044{
     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
    4149#       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.list
     50        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
    4351#        echo "Popular Tags#$SRC $SRC tags popular#http://atemio.dyndns.tv/mediathek/menu/category.jpg#category.jpg#$NAME#0" >>/tmp/tithek/$PARSER.list
    4452        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
    4555#        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
    4656#        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
     
    5262
    5363
     64#{"pages":218,"videos":[{"quality":null,"title":"An
     65
    5466videos()
    5567{
     68
     69#       rm "$TMP/$FILENAME.list"
     70
     71        if [ ! -e "$TMP/$FILENAME.list" ]; then
     72
    5673#{"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":
    5774
    5875#$curlbin $URL$PARAM > /tmp/1234
    5976
    60 #$curlbin $URL$PARAM > /tmp/a123
     77#$curlbin "$URL$PAGE$NEXT$PAGE2" > $TMP/$FILENAME.curl.list
    6178#       $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 '
    6279#       $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 '
    6481
    6582BEGIN {     title = ""
     
    7087            pic = ""
    7188            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
    7297      }
    7398/"quality":/ {
     
    99124                            j = index(substr($0, i), "\"") - 1
    100125                            image = substr($0, i, j)
    101 
    102 
    103 if (length(duration) == 1)
    104 {
    105 #    print "duration: 000+" duration
    106     pic = pid "-000"duration
    107 }
    108 else if (length(duration) == 2)
    109 {
    110 #    print "duration: 00+" duration
    111     pic = pid "-00"duration
    112 }
    113 else if (length(duration) == 3)
    114 {
    115 #    print "duration: 0+" duration
    116     pic = pid "-0"duration
    117 }
    118 
    119 else
    120 {
    121 #    print "duration: " duration
    122     pic = pid "-"duration
    123 }
    124126
    125127pic = image
     
    148150
    149151      }
    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
     158fi
     159        echo "$TMP/$FILENAME.list"
    152160}
    153161
    154162play()
    155163{
    156         /tmp/localhoster/hoster.sh youtube_dl https://beeg.com/$PARAM > $TMP/cache.$PARSER.$INPUT.1
     164        /tmp/localhoster/hoster.sh youtube_dl https://beeg.com/$PAGE > $TMP/cache.$PARSER.$INPUT.1
    157165        STREAMURL=`cat $TMP/cache.$PARSER.$INPUT.1`
    158166        cat $STREAMURL | head -n1
     
    161169hoster()
    162170{
    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
    300172}
    301173
     
    303175{
    304176
    305 if [ ! -e "/tmp/tithek/$PARSER.list" ]; then
     177if [ ! -e $TMP/$FILENAME.list ]; then
    306178#{"tag":"pump","videos":11}
    307179#       $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
     
    315187           title = toupper(tag)
    316188           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
     192fi
     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
     198pornstar()
     199{
     200
     201if [ ! -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 '
     206BEGIN { 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
     225fi
     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},
    324233
    325234case $INPUT in
     
    331240        tags) $INPUT;;
    332241        page) $INPUT;;
     242        pornstar) $INPUT;;
    333243esac
    334244
Note: See TracChangeset for help on using the changeset viewer.