Changeset 39358 for titan/mediathek/localhoster/lib
- Timestamp:
- 11/19/16 20:16:49 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/mediathek/localhoster/lib/helpers.py
r39354 r39358 64 64 if auto_pick: 65 65 return sources[0][1] 66 # else: 66 else: 67 return sources[0][1] 68 67 69 # result = xbmcgui.Dialog().select('Choose the link', [source[0] if source[0] else 'Uknown' for source in sources]) 68 70 # if result == -1: … … 70 72 # else: 71 73 # return sources[result][1] 72 else:73 raise ResolverError('No Video Link Found')74 # else: 75 # raise ResolverError('No Video Link Found') 74 76 75 77 def append_headers(headers): … … 173 175 174 176 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) 176 178 response_headers = response.get_headers() 177 179 178 180 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}) 182 184 html = response.content 183 185 184 186 source_list = scrape_sources(html, result_blacklist) 185 187 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.