+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# Module: MSLHttpRequestHandler
+# Created on: 26.01.2017
+
import BaseHTTPServer
import base64
from urlparse import urlparse, parse_qs
from MSL import MSL
from KodiHelper import KodiHelper
-kodi_helper = KodiHelper(
- plugin_handle=None,
- base_url=None
-)
+kodi_helper = KodiHelper()
msl = MSL(kodi_helper)
import os
import json
from requests import session, cookies
-from urllib import quote
+from urllib import quote, unquote
from time import time
from base64 import urlsafe_b64encode
from bs4 import BeautifulSoup, SoupStrainer
'_': int(time()),
'authURL': self.user_data['authURL']
}
+
+ # check if we have a root lolomo for that user within our cookies
+ for cookie in self.session.cookies:
+ if cookie.name == 'lhpuuidh-browse-' + self.user_data['guid']:
+ value = unquote(cookie.value)
+ payload['lolomoid'] = value[value.rfind(':')+1:];
+
response = self._session_get(component='video_list_ids', params=payload, type='api')
return self._process_response(response=response, component=self._get_api_url_for(component='video_list_ids'))