The branch, eden has been updated
       via  2afed65b404c35f88d47383c36972a92960b28ac (commit)
      from  bbaeebca6bfa32645f843524cc3e45ad3598b5a3 (commit)

- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=2afed65b404c35f88d47383c36972a92960b28ac

commit 2afed65b404c35f88d47383c36972a92960b28ac
Author: beenje <[email protected]>
Date:   Tue Nov 20 22:17:32 2012 +0100

    [script.module.parsedom] updated to version 1.3.0

diff --git a/script.module.parsedom/addon.xml b/script.module.parsedom/addon.xml
index 541798d..c3b679c 100644
--- a/script.module.parsedom/addon.xml
+++ b/script.module.parsedom/addon.xml
@@ -1,5 +1,5 @@
 <?xml version='1.0' encoding='UTF-8' standalone='yes'?>
-<addon id='script.module.parsedom' version='1.2.0' name='Parsedom for xbmc 
plugins' provider-name='TheCollective'>
+<addon id='script.module.parsedom' version='1.3.0' name='Parsedom for xbmc 
plugins' provider-name='TheCollective'>
   <requires>
     <import addon='xbmc.python' version='2.0'/>
   </requires>
diff --git a/script.module.parsedom/changelog.txt 
b/script.module.parsedom/changelog.txt
index 97a7234..0838db1 100644
--- a/script.module.parsedom/changelog.txt
+++ b/script.module.parsedom/changelog.txt
@@ -1,3 +1,6 @@
+[B]Version 1.3.0[/B]
+- Team xvmc decided to stop unquote-ing their path strings, so getParams now 
does it for them 
+
 [B]Version 1.2.0[/B]
 - fetchPage should default to utf-8 encoding
 - parseDOM should handle utf-8 encoding
diff --git a/script.module.parsedom/lib/CommonFunctions.py 
b/script.module.parsedom/lib/CommonFunctions.py
index 50ce263..71fd67e 100644
--- a/script.module.parsedom/lib/CommonFunctions.py
+++ b/script.module.parsedom/lib/CommonFunctions.py
@@ -27,11 +27,11 @@ import HTMLParser
 #import chardet
 import json
 
-version = u"1.2.0"
+version = u"1.3.0"
 plugin = u"CommonFunctions-" + version
 print plugin
 
-USERAGENT = u"Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.8) 
Gecko/20100722 Firefox/3.6.8"
+USERAGENT = u"Mozilla/5.0 (Windows NT 6.2; Win64; x64; rv:16.0.1) 
Gecko/20121011 Firefox/16.0.1"
 
 if hasattr(sys.modules["__main__"], "xbmc"):
     xbmc = sys.modules["__main__"].xbmc
@@ -97,6 +97,7 @@ def getUserInputNumbers(title=u"Input", default=u""):
 def getParameters(parameterString):
     log("", 5)
     commands = {}
+    parameterString = urllib.unquote_plus(parameterString)
     splitCommands = parameterString[parameterString.find('?') + 1:].split('&')
 
     for command in splitCommands:
@@ -117,7 +118,7 @@ def replaceHTMLCodes(txt):
     txt = re.sub("(&#[0-9]+)([^;^0-9]+)", "\\1;\\2", makeUTF8(txt))
 
     txt = HTMLParser.HTMLParser().unescape(txt)
-
+    txt = txt.replace("&amp;", "&")
     log(repr(txt), 5)
     return txt
 
@@ -232,9 +233,20 @@ def _getDOMElements(item, name, attrs):
 
 def parseDOM(html, name=u"", attrs={}, ret=False):
     log("Name: " + repr(name) + " - Attrs:" + repr(attrs) + " - Ret: " + 
repr(ret) + " - HTML: " + str(type(html)), 3)
+    #log("BLA: " + repr(type(html)) + " - " + repr(type(name)))
 
-    if isinstance(html, str): # Should be handled
-        html = [html]
+    if isinstance(name, str): # Should be handled
+        try:
+            name = name #.decode("utf-8")
+        except:
+            log("Couldn't decode name binary string: " + repr(name))
+
+    if isinstance(html, str):
+        try:
+            html = [html.decode("utf-8")] # Replace with chardet thingy
+        except:
+            log("Couldn't decode html binary string. Data length: " + 
repr(len(html)))
+            html = [html]
     elif isinstance(html, unicode):
         html = [html]
     elif not isinstance(html, list):

-----------------------------------------------------------------------

Summary of changes:
 script.module.parsedom/addon.xml              |    2 +-
 script.module.parsedom/changelog.txt          |    3 +++
 script.module.parsedom/lib/CommonFunctions.py |   24 ++++++++++++++++++------
 3 files changed, 22 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
Scripts

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to