diff options
-rw-r--r-- | default.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -21,7 +21,7 @@ import xbmcplugin KAN_URL = 'http://www.kan.org.il' -USER_AGENT = 'Kodi' # I'm optimistic +USER_AGENT = 'Kodi/plugin.video.kan/1.0' # I'm optimistic PLUGIN_NAME = "plugin.video.kan" # FIXME: a better way to get this? SiteCache = simplecache.SimpleCache() # FIXME: avoid this global @@ -74,7 +74,7 @@ def read_url(url): if cached_read: return cached_read - headers = {'user-agent': 'Kodi/plugin.video.kan/1.0'} + headers = {'user-agent': USER_AGENT} response = requests.get(url, headers=headers) if response.status_code != 200: raise IOError("Invalid URL {}".format(url)) |