Changeset 39358


Ignore:
Timestamp:
Nov 19, 2016, 8:16:49 PM (3 years ago)
Author:
obi
Message:

add vidto.py

Location:
titan/mediathek/localhoster
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • titan/mediathek/localhoster/hoster.sh

    r39355 r39358  
    142142}
    143143
     144vidto()
     145{
     146        $BIN $CMD/vidto.py $INPUT
     147}
     148
     149
    144150if [ "$TYPE" == "get" ];then
    145151        case $hoster in
     
    164170                vidzi) vidzi $INPUT;;
    165171                vivo) vivo $INPUT;;
     172                vidto) vidto $INPUT;;
    166173                streamcloud1) streamcloud $INPUT;;     
    167174        esac
  • titan/mediathek/localhoster/lib/helpers.py

    r39354 r39358  
    6464        if auto_pick:
    6565            return sources[0][1]
    66 #       else:
     66        else:
     67            return sources[0][1]
     68
    6769#            result = xbmcgui.Dialog().select('Choose the link', [source[0] if source[0] else 'Uknown' for source in sources])
    6870#            if result == -1:
     
    7072#            else:
    7173#                return sources[result][1]
    72     else:
    73         raise ResolverError('No Video Link Found')
     74#    else:
     75#        raise ResolverError('No Video Link Found')
    7476
    7577def append_headers(headers):
     
    173175
    174176    response = net.http_GET(url, headers=headers)
    175 #    response_headers = response.get_headers(as_dict=True)
     177    response_headers = response.get_headers(as_dict=True)
    176178    response_headers = response.get_headers()
    177179
    178180    headers.update({'Referer': url})
    179 #    cookie = response_headers.get('Set-Cookie', None)
    180 #    if cookie:
    181 #        headers.update({'Cookie': cookie})
     181    cookie = response_headers.get('Set-Cookie', None)
     182    if cookie:
     183        headers.update({'Cookie': cookie})
    182184    html = response.content
    183185
    184186    source_list = scrape_sources(html, result_blacklist)
    185187    source = pick_source(source_list)
    186     return source# + append_headers(headers)
     188    return source + append_headers(headers)
     189#    return source
  • titan/mediathek/localhoster/vivo.py

    r39357 r39358  
    77import base64
    88import json
     9from lib import helpers
    910
    1011class VivoResolver(object):
    11     name = "vivosx"
    12     domains = ["vivo.sx"]
    13     pattern = '(?://|\.)(vivo\.sx)/([0-9a-zA-Z]+)'
     12    name = "vidto"
     13    domains = ["vidto.me"]
     14    pattern = '(?://|\.)(vidto\.me)/(?:embed-)?([0-9a-zA-Z]+)'
    1415
    1516    def __init__(self):
Note: See TracChangeset for help on using the changeset viewer.