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

add vidto.py

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.