Changeset 39354


Ignore:
Timestamp:
Nov 19, 2016, 4:32:54 PM (4 years ago)
Author:
obi
Message:

fix vidzi

Location:
titan/mediathek/localhoster
Files:
4 edited

Legend:

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

    r39267 r39354  
    132132}
    133133
     134vidzi()
     135{
     136        $BIN $CMD/vidzi.py $INPUT
     137}
     138
    134139if [ "$TYPE" == "get" ];then
    135140        case $hoster in
     
    152157                wholecloud) movshare $INPUT;;
    153158                vidgg) movshare $INPUT;;
     159                vidzi) vidzi $INPUT;;
    154160                streamcloud1) streamcloud $INPUT;;     
    155161        esac
  • titan/mediathek/localhoster/lib/helpers.py

    r39352 r39354  
    2424#from urlresolver.resolver import ResolverError
    2525import common
     26from net import Net
    2627
    2728def get_hidden(html, form_id=None, index=None, include_submit=True):
     
    149150        try: source_list.sort(key=lambda x: int(x[0]), reverse=True)
    150151        except:
    151             common.log_utils.log_debug('Scrape sources sort failed |int(x[0])|')
     152            test = 1
     153#            common.log_utils.log_debug('Scrape sources sort failed |int(x[0])|')
    152154            try: source_list.sort(key=lambda x: int(x[0][:-1]), reverse=True)
    153155            except:
    154                 common.log_utils.log_debug('Scrape sources sort failed |int(x[0][:-1])|')
     156                 test = 2
     157#                common.log_utils.log_debug('Scrape sources sort failed |int(x[0][:-1])|')
    155158
    156159    return source_list
     
    164167
    165168    result_blacklist = list(set(result_blacklist + ['.smil']))  # smil(not playable) contains potential sources, only blacklist when called from here
    166     net = common.Net()
     169    net = Net()
    167170    parsed_url = urlparse(url)
    168171    headers = {'User-Agent': common.FF_USER_AGENT,
     
    170173
    171174    response = net.http_GET(url, headers=headers)
    172     response_headers = response.get_headers(as_dict=True)
     175#    response_headers = response.get_headers(as_dict=True)
     176    response_headers = response.get_headers()
     177
    173178    headers.update({'Referer': url})
    174     cookie = response_headers.get('Set-Cookie', None)
    175     if cookie:
    176         headers.update({'Cookie': cookie})
     179#    cookie = response_headers.get('Set-Cookie', None)
     180#    if cookie:
     181#        headers.update({'Cookie': cookie})
    177182    html = response.content
    178183
    179184    source_list = scrape_sources(html, result_blacklist)
    180185    source = pick_source(source_list)
    181     return source + append_headers(headers)
     186    return source# + append_headers(headers)
  • titan/mediathek/localhoster/movshare.py

    r39352 r39354  
    66from lib.net import Net
    77from lib import helpers
     8import lib.common as common
    89
    910class MovshareResolver(object):
     
    5152            headers.update({'Referer': web_url, })
    5253            print stream_url + helpers.append_headers(headers)
     54#        else:
     55#            raise ResolverError('File Not Found or removed')
    5356
    5457    def get_url(self, host, media_id):
    5558        if 'vidgg' in host:
    56             template = 'http://{host}/embed/?id={media_id}'
     59            return 'http://%s/embed/?id=%s' % (host, media_id)
     60#            template = 'http://{host}/embed/?id={media_id}'
    5761        else:
    58             template = 'http://{host}/embed/?v={media_id}'
     62            return 'http://%s/embed/?v=%s' % (host, media_id)
     63#           template = 'http://{host}/embed/?v={media_id}'
    5964        print self._default_get_url(host, media_id, template)
    6065
  • titan/mediathek/localhoster/vidzi.py

    r39052 r39354  
    4343                    print r.group(1)
    4444
    45         print 'Unable to locate link'
     45#        print 'Unable to locate link'
    4646
    4747    def get_url(self, host, media_id):
Note: See TracChangeset for help on using the changeset viewer.