Oc@sdZddlZddlZyddlmZWn!ek rUddlmZnXddlZddlm Z ddl m Z ddlm Z ddl mZyddlmZWn!ek rddlmZnXyeWn!ek rdd lmZnXyed ZWneefk r3eZnXyed ZWneefk raeZnXyed ZWn#eefk reefZnXd ZdddddddddddddddddgZdZe jdd ied!6Z e jd"d ied!6Z!e jd#d ied!6Z"e jd$Z#e jd%Z$e jd&Z%ej&d'd(d)d*ej'Z(ej&d+Z)e jd,d ied!6Z*ej&d-Z+d.Z,d/Z-d0Z.d1e/fd2YZ0d3e/fd4YZ1e1dd5e2Z3e1dd5e2Z4e1dd5e5Z6e1dd5e5Z7e1dd5e2Z8e1dd5e5Z9d6e j:e0fd7YZ;d8e j<e0fd9YZ=d:e j>e0fd;YZ?d<e j@e0fd=YZAd>e jBfd?YZCeDd@ZEe2eDeDdAZFe2eDeDdBZGeDeDdCZHeDeDdDZIdEZJdFZKdGe=fdHYZLeLeCjMdIt|dtS|SdS(s1Convert the result back into the input type. tencodingsutf-8N(t issubclassRRR(ttyptresult((s8/usr/lib/python2.7/vendor-packages/lxml/html/__init__.pyt_transform_resultRs cCsTt|trP|ddkrP|dttd!tkrP|jddSn|S(Nit{it}i(t isinstanceR tlentXHTML_NAMESPACEtsplit(ttag((s8/usr/lib/python2.7/vendor-packages/lxml/html/__init__.pyt_nons\s-t HtmlMixincBs%eZdZeedejZdZeedejZdZeedejZdZeedejZdZdZ dZ eee e dejZ dZ d Z d Zd Zd Zd ZdZdedZdZdZeddZRS(cCs|jjjS(s Returns the base URL, given when the page was parsed. Use with ``urlparse.urljoin(el.base_url, href)`` to get absolute URLs. (t getroottreetdocinfotURL(tself((s8/usr/lib/python2.7/vendor-packages/lxml/html/__init__.pytbase_urldstdoccCs t|S(s0 Return a list of all the forms (t _forms_xpath(R8((s8/usr/lib/python2.7/vendor-packages/lxml/html/__init__.pytformsnscCs|jdditd6dS(st Return the element. Can be called from a child element to get the document's head. s//body|//x:bodyR!R"i(txpathR0(R8((s8/usr/lib/python2.7/vendor-packages/lxml/html/__init__.pytbodyuscCs|jdditd6dS(su Returns the element. Can be called from a child element to get the document's head. s//head|//x:headR!R"i(R=R0(R8((s8/usr/lib/python2.7/vendor-packages/lxml/html/__init__.pythead}scCsA|jd}|sdSt|d|}|s5dS|dSdS(sN Get or set any