Module Expr Str ImportFrom alias Import alias Import alias ImportFrom alias Import alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias Import alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias Import alias ImportFrom alias alias alias Import alias ImportFrom alias alias ImportFrom alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias Import alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias Assign NameStore Call NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr Assign NameStore ListLoad TupleLoad AttributeLoad NameLoad attr Str TupleLoad AttributeLoad NameLoad attr Str TupleLoad AttributeLoad NameLoad attr Str TupleLoad AttributeLoad NameLoad attr Str TupleLoad AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad GeneratorExp SubscriptLoad NameLoad Index Num comprehension TupleStore NameStore NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str FunctionDef arguments args NameParam defaults body Expr Str If BoolOpAnd NameLoad CompareIn SubscriptLoad NameLoad Index Num NameLoad body For TupleStore NameStore NameStore NameLoad body If Call AttributeLoad NameLoad attr NameLoad body Return TupleLoad NameLoad NameLoad Return TupleLoad NameLoad NameLoad decorator_list ClassDef bases NameLoad body Assign NameStore TupleLoad FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If Call NameLoad NameLoad AttributeLoad NameLoad attr body If NameLoad body Raise Call NameLoad Str orelse Return CompareIn NameLoad Call AttributeLoad NameLoad attr If UnaryOpNot Call NameLoad NameLoad AttributeLoad NameLoad attr body If NameLoad body Return CompareIn NameLoad AttributeLoad NameLoad attr orelse Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad keyword NameLoad body Raise Call NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore NameLoad For NameStore NameLoad body If Call AttributeLoad NameLoad attr NameLoad keyword NameLoad body Assign NameStore NameLoad Break If UnaryOpNot NameLoad body Raise Call NameLoad BinOpMod Str Call AttributeLoad Str attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Assign NameStore TupleLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num NameLoad NameLoad body Expr Str TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad handlers ExceptHandler type NameLoad body If CompareIs NameLoad NameLoad body Raise Call NameLoad Str orelse Return NameLoad orelse Return Call NameLoad Call NameLoad Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore NameLoad If NameLoad body If BoolOpOr UnaryOpNot Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr UnaryOpNot AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse If BoolOpOr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr UnaryOpNot AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad If NameLoad body Return NameLoad orelse If CompareIs NameLoad NameLoad body Raise Call NameLoad BinOpMod Str NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad decorator_list decorator_list ClassDef bases NameLoad body Assign NameStore TupleLoad FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot AttributeLoad NameLoad attr body ImportFrom alias Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr decorator_list NameLoad decorator_list ClassDef bases NameLoad body Assign NameStore TupleLoad FunctionDef arguments args NameParam defaults body Assign NameStore NameLoad If AttributeLoad NameLoad attr body With Call NameLoad AttributeLoad NameLoad attr Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr Num orelse If AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Slice Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body If NameLoad body Assign NameStore SubscriptLoad NameLoad Slice Call NameLoad AttributeLoad NameLoad attr If NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If NameLoad body Assign NameStore Str orelse Assign NameStore Str Return Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body With Call NameLoad AttributeLoad NameLoad attr Str NameStore body Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str If UnaryOpNot AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body If AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr orelse Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body If Call NameLoad NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad Str orelse If AttributeLoad NameLoad attr body With Call NameLoad AttributeLoad NameLoad attr Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad orelse Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list Assign NameStore Call NameLoad NameLoad NameLoad decorator_list ClassDef bases NameLoad body Assign NameStore TupleLoad FunctionDef arguments args NameParam defaults body Expr Str If CompareEq SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Str Str body Return Call AttributeLoad NameLoad attr orelse Return Call AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Assert CompareIn NameLoad TupleLoad Str Str If CompareEq NameLoad Str body If UnaryOpNot Call NameLoad NameLoad Str body Assign AttributeStore NameLoad attr Call NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad keyword AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr orelse If UnaryOpNot Call NameLoad NameLoad Str body Assign AttributeStore NameLoad attr Call NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad keyword AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body ImportFrom alias If CompareIs AttributeLoad NameLoad attr NameLoad body Assign NameStore SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Str Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr keyword NameLoad attr If SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Str body Assign NameStore Call AttributeLoad NameLoad attr If SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Str body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If UnaryOpNot NameLoad body Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr TryExcept body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Str handlers ExceptHandler type NameLoad name NameStore body If BoolOpAnd Call NameLoad NameLoad NameLoad CompareIn Str Call NameLoad NameLoad CompareNotIn Str NameLoad body Assign NameStore Call AttributeLoad Str attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Str orelse If BoolOpAnd Call NameLoad NameLoad NameLoad CompareIn Str Call NameLoad NameLoad CompareNotIn Str NameLoad body Assign NameStore Call AttributeLoad Str attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Str orelse Raise AugAssignAdd SubscriptStore NameLoad Index Str BinOpSub Call AttributeLoad NameLoad attr NameLoad Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call NameLoad Str Return Call AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body If CompareIs AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Return AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Assign NameStore TupleLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad body Expr Str If CompareIsNot NameLoad NameLoad body TryExcept body Assign AttributeStore NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr BinOpMod Str NameLoad attr handlers ExceptHandler type NameLoad body Raise Call NameLoad BinOpMod Str NameLoad orelse If CompareIsNot NameLoad NameLoad body TryExcept body Assign AttributeStore NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr BinOpMod Str NameLoad attr handlers ExceptHandler type NameLoad body Raise Call NameLoad BinOpMod Str NameLoad orelse If CompareIsNot NameLoad NameLoad body TryExcept body Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index NameLoad handlers ExceptHandler type NameLoad body Raise Call NameLoad BinOpMod Str NameLoad orelse If CompareIsNot NameLoad NameLoad body TryExcept body Assign AttributeStore NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr handlers ExceptHandler type NameLoad body Raise Call NameLoad BinOpMod Str NameLoad orelse Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareIs AttributeLoad NameLoad attr NameLoad body Assign NameStore ListComp TupleLoad NameLoad Call NameLoad Call NameLoad AttributeLoad NameLoad attr comprehension TupleStore NameStore NameStore Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr If Call NameLoad NameLoad body Assign NameStore SubscriptLoad SubscriptLoad Call NameLoad NameLoad keyword Lambda arguments args NameParam defaults SubscriptLoad NameLoad Index Num keyword NameLoad Index Num Index Num Expr Call AttributeLoad NameLoad attr NameLoad orelse Raise Call NameLoad Str Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If CompareIs AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Assign NameStore SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index NameLoad Assign NameStore NameLoad If CompareEq Call NameLoad NameLoad Str NameLoad Str body If Call NameLoad NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign NameStore NameLoad If UnaryOpNot NameLoad body If CompareEq Call AttributeLoad Call NameLoad NameLoad Str Str attr Str body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad Assign AttributeStore NameLoad attr Str orelse Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore BinOpMod Str NameLoad If CompareIs AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Return Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad SubscriptLoad Call AttributeLoad NameLoad attr Str Index NameLoad attr Return Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr If CompareIs AttributeLoad NameLoad attr NameLoad body Assign NameStore NameLoad While NameLoad body Assign NameStore Call AttributeLoad NameLoad attr If CompareEq AttributeLoad NameLoad attr Str body Assign AttributeStore NameLoad attr NameLoad Break Return Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Dict For NameStore AttributeLoad AttributeLoad NameLoad attr attr body If BoolOpAnd CompareEq AttributeLoad NameLoad attr Str CompareEq AttributeLoad NameLoad attr Str CompareIsNot Call AttributeLoad NameLoad attr Str NameLoad body Assign SubscriptStore NameLoad Index AttributeLoad NameLoad attr NameLoad If Call NameLoad NameLoad body If BoolOpOr CompareIs NameLoad NameLoad CompareNotIn NameLoad NameLoad body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr keyword Lambda arguments args NameParam defaults AttributeLoad NameLoad attr Assign NameStore AttributeLoad SubscriptLoad NameLoad Index Num attr For NameStore NameLoad body If CompareNotEq NameLoad NameLoad body If CompareIn NameLoad NameLoad body Delete SubscriptDel NameLoad Index NameLoad If NameLoad body Assign NameStore Call NameLoad AttributeLoad NameLoad attr NameLoad orelse Assign NameStore Call NameLoad AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr If CompareEq AttributeLoad AttributeLoad NameLoad attr attr Str body If CompareIn Str Call AttributeLoad AttributeLoad NameLoad attr attr Str Str body For TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr body Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Delete NameDel If NameLoad body If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr orelse Assign NameStore NameLoad Assign NameStore Call NameLoad ListComp NameLoad comprehension TupleStore NameStore NameStore NameLoad For NameStore NameLoad body Assign NameStore ListComp TupleLoad NameLoad NameLoad comprehension TupleStore NameStore NameStore NameLoad CompareNotEq NameLoad NameLoad For TupleStore NameStore NameStore NameLoad body Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad If CompareEq AttributeLoad AttributeLoad NameLoad attr attr Str body If CompareIn Str Call AttributeLoad AttributeLoad NameLoad attr attr Str Str body Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad orelse Assign NameStore BinOpAdd BinOpAdd SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num Str Call NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad If NameLoad body Return Call AttributeLoad AttributeLoad NameLoad attr attr orelse Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr For NameStore AttributeLoad AttributeLoad NameLoad attr attr body If UnaryOpNot Call AttributeLoad NameLoad attr Str body Continue If Call AttributeLoad NameLoad attr Str body If CompareIn AttributeLoad NameLoad attr NameLoad body Delete SubscriptDel NameLoad Index AttributeLoad NameLoad attr orelse If CompareEq AttributeLoad NameLoad attr Str body If CompareIs SubscriptLoad NameLoad Index AttributeLoad NameLoad attr NameLoad body If Call NameLoad AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num orelse If CompareEq Call NameLoad NameLoad Str NameLoad Str body If CompareIs SubscriptLoad NameLoad Index AttributeLoad NameLoad attr NameLoad body Assign SubscriptStore NameLoad Index AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str orelse If CompareEq Call NameLoad NameLoad Str NameLoad Str body If UnaryOpNot AttributeLoad NameLoad attr body If CompareIsNot AttributeLoad NameLoad attr NameLoad body If CompareIn AttributeLoad NameLoad attr NameLoad body Delete SubscriptDel NameLoad Index AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr While CompareIsNot NameLoad NameLoad body If CompareEq AttributeLoad NameLoad attr Str body Assign AttributeStore NameLoad attr NameLoad Return orelse Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore TupleLoad Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str FunctionDef arguments args NameParam NameParam defaults NameLoad body If CompareIs NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad orelse If Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr NameLoad orelse Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Dict decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body Return Call AttributeLoad Call NameLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body Return Call AttributeLoad Call NameLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str If NameLoad body Assign AttributeStore NameLoad attr NameLoad orelse If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Num Assign TupleStore NameStore NameStore Call AttributeLoad SubscriptLoad NameLoad Index Num attr Str Num Assign NameStore Call AttributeLoad NameLoad attr Str Str orelse Assign NameStore Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad If CompareIs NameLoad NameLoad body If Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Str orelse Expr Call AttributeLoad NameLoad attr orelse Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Num orelse Assign NameStore Call AttributeLoad NameLoad attr NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Num Assign TupleStore NameStore NameStore Call NameLoad NameLoad If NameLoad body Assign NameStore NameLoad Assign AttributeStore NameLoad attr NameLoad If UnaryOpNot NameLoad body If Call AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Num If UnaryOpNot NameLoad body If CompareIn Str AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Str attr Str If CompareGt NameLoad Num body Assign NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Slice BinOpAdd NameLoad Num If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr If UnaryOpNot Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Assign AttributeStore NameLoad attr Str orelse Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If CompareIsNot NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore TupleLoad Str Str Str Str Str Str Str Str Str Str For NameStore NameLoad body Expr Call NameLoad NameLoad NameLoad Call NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Pass With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str If Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Pass With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr orelse Return Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return SubscriptLoad SubscriptLoad Call NameLoad AttributeLoad Call AttributeLoad NameLoad attr attr Index NameLoad Index Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call NameLoad Str Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict For NameStore Call AttributeLoad Call NameLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad Str TupleLoad For NameStore NameLoad body If CompareNotEq NameLoad Str body If Call NameLoad NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad Call NameLoad NameLoad NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Expr Call NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad Call AttributeLoad NameLoad attr decorator_list decorator_list
N/A N/A 
The Document class is the result of network request made with Grab instance.
 __future__ absolute_import N/A weakref N/A re copy copy N/A email N/A os N/A json N/A tempfile N/A webbrowser N/A codecs datetime datetime N/A time lxml.html HTMLParser lxml.etree XMLParser parse ParserError selection XpathSelector N/A six six.moves.urllib.parse urlsplit parse_qs urljoin N/A threading six BytesIO StringIO weblib.http smart_urlencode N/A weblib.encoding weblib.files hashed_path weblib.structured TreeInterface weblib.text normalize_space weblib.html decode_entities find_refresh_url weblib.rex normalize_regexp N/A logging grab.cookie CookieManager grab.error GrabMisuseError DataNotFound grab.const NULL grab.util.warning warn N/A NULL_BYTE N/A chr 0 N/A RE_XML_DECLARATION N/A N/A re compile ^[^<]{,100}<\?xml[^>]+\?> N/A re I N/A RE_DECLARATION_ENCODING N/A N/A re compile encoding\s*=\s*["\']([^"\']+)["\'] N/A RE_META_CHARSET N/A N/A re compile <meta[^>]+content\s*=\s*[^>]+charset=([-\w]+) N/A re I N/A RE_META_CHARSET_HTML5 N/A N/A re compile <meta[^>]+charset\s*=\s*[\'"]?([-\w]+) N/A re I N/A RE_UNICODE_XML_DECLARATION N/A N/A re compile N/A N/A N/A RE_XML_DECLARATION pattern decode utf-8 N/A re I N/A _BOM_TABLE N/A N/A N/A codecs BOM_UTF32_BE utf-32-be N/A N/A codecs BOM_UTF32_LE utf-32-le N/A N/A codecs BOM_UTF16_BE utf-16-be N/A N/A codecs BOM_UTF16_LE utf-16-le N/A N/A codecs BOM_UTF8 utf-8 N/A _FIRST_CHARS N/A set N/A N/A char N/A 0 N/A N/A char name _BOM_TABLE N/A THREAD_STORAGE N/A N/A threading local N/A logger N/A N/A logging getLogger grab.document read_bom N/A N/A data N/A N/A N/A Read the byte order mark in the text, if present, and
    return the encoding represented by the BOM and the BOM.

    If no BOM can be detected, (None, None) is returned.
     N/A N/A data N/A N/A data N/A 0 _FIRST_CHARS N/A N/A N/A bom encoding _BOM_TABLE N/A N/A N/A N/A data startswith bom N/A N/A N/A encoding bom N/A N/A None None N/A TextExtension N/A object N/A N/A __slots__ N/A text_search N/A N/A self anchor byte N/A False N/A N/A 
        Search the substring in response body.

        :param anchor: string to search
        :param byte: if False then `anchor` should be the
            unicode string, and search will be performed in
            `response.unicode_body()` else `anchor` should be the byte-string
            and search will be performed in `response.body`

        If substring is found return True else False.
         N/A N/A isinstance anchor N/A six text_type N/A N/A byte N/A N/A N/A GrabMisuseError The anchor should be bytes string in byte mode N/A N/A N/A anchor N/A N/A self unicode_body N/A N/A N/A isinstance anchor N/A six text_type N/A N/A byte N/A N/A N/A anchor N/A self body N/A N/A N/A GrabMisuseError The anchor should be byte string in non-byte mode N/A text_assert N/A N/A self anchor byte N/A False N/A N/A 
        If `anchor` is not found then raise `DataNotFound` exception.
         N/A N/A N/A N/A self text_search anchor byte byte N/A N/A N/A DataNotFound N/A Substring not found: %s anchor N/A text_assert_any N/A N/A self anchors byte N/A False N/A N/A 
        If no `anchors` were found then raise `DataNotFound` exception.
         N/A found False N/A anchor anchors N/A N/A N/A N/A self text_search anchor byte byte N/A N/A found True N/A N/A N/A found N/A N/A N/A DataNotFound N/A Substrings not found: %s N/A N/A ,  join anchors N/A N/A RegexpExtension N/A object N/A N/A __slots__ N/A rex_text N/A N/A self regexp flags byte default N/A 0 False NULL N/A N/A 
        Search regular expression in response body and return content of first
        matching group.

        :param byte: if False then search is performed in
        `response.unicode_body()` else the rex is searched in `response.body`.
         N/A N/A N/A match N/A N/A self rex_search regexp flags flags byte byte N/A N/A N/A DataNotFound N/A N/A N/A default NULL N/A N/A N/A DataNotFound Regexp not found N/A N/A default N/A N/A N/A normalize_space N/A decode_entities N/A N/A match group 1 N/A rex_search N/A N/A self regexp flags byte default N/A 0 False NULL N/A N/A 
        Search the regular expression in response body.

        :param byte: if False then search is performed in
        `response.unicode_body()` else the rex is searched in `response.body`.

        Note: if you use default non-byte mode than do not forget to build your
        regular expression with re.U flag.

        Return found match object or None

         N/A regexp N/A normalize_regexp regexp flags N/A match None N/A byte N/A N/A N/A N/A N/A isinstance N/A regexp pattern N/A six text_type N/A N/A six PY3 N/A N/A match N/A N/A regexp search N/A self body N/A N/A N/A N/A isinstance N/A regexp pattern N/A six text_type N/A N/A six PY3 N/A N/A ubody N/A N/A self unicode_body N/A match N/A N/A regexp search ubody N/A match N/A N/A match N/A N/A N/A default NULL N/A N/A N/A DataNotFound N/A Could not find regexp: %s regexp N/A N/A default N/A rex_assert N/A N/A self rex byte N/A False N/A N/A 
        If `rex` expression is not found then raise `DataNotFound` exception.
         N/A N/A N/A self rex_search rex byte byte N/A N/A PyqueryExtension N/A object N/A N/A __slots__ N/A pyquery N/A N/A self N/A N/A N/A 
        Returns pyquery handler.
         N/A N/A N/A self _pyquery N/A pyquery PyQuery N/A N/A self _pyquery N/A PyQuery N/A self body N/A N/A self _pyquery N/A property N/A BodyExtension N/A object N/A N/A __slots__ N/A get_body_chunk N/A N/A self N/A N/A N/A body_chunk None N/A N/A self body_path N/A N/A N/A open N/A self body_path rb inp N/A N/A body_chunk N/A N/A inp read 4096 N/A N/A N/A self _bytes_body N/A N/A body_chunk N/A N/A self _bytes_body N/A 4096 N/A body_chunk N/A convert_body_to_unicode N/A N/A self body bom charset ignore_errors fix_special_entities N/A N/A N/A bom N/A N/A body N/A body N/A N/A len N/A self bom N/A fix_special_entities N/A N/A body N/A N/A N/A weblib encoding fix_special_entities body N/A ignore_errors N/A N/A errors ignore N/A N/A errors strict N/A N/A N/A N/A N/A body decode charset errors strip N/A read_body_from_file N/A N/A self N/A N/A N/A N/A open N/A self body_path rb inp N/A N/A N/A N/A inp read N/A unicode_body N/A N/A self ignore_errors fix_special_entities N/A True True N/A N/A 
        Return response body as unicode string.
         N/A N/A N/A self _unicode_body N/A N/A N/A self _unicode_body N/A N/A self convert_body_to_unicode body N/A self body bom N/A self bom charset N/A self charset ignore_errors ignore_errors fix_special_entities fix_special_entities N/A N/A self _unicode_body N/A _read_body N/A N/A self N/A N/A N/A N/A self body_path N/A N/A N/A N/A self read_body_from_file N/A N/A N/A self _bytes_body N/A _write_body N/A N/A self body N/A N/A N/A N/A isinstance body N/A six text_type N/A N/A N/A GrabMisuseError Document.body could be only byte string. N/A N/A N/A self body_path N/A N/A N/A open N/A self body_path wb out N/A N/A N/A N/A out write body N/A N/A self _bytes_body None N/A N/A N/A self _bytes_body body N/A N/A self _unicode_body None N/A N/A body N/A property _read_body _write_body N/A DomTreeExtension N/A object N/A N/A __slots__ N/A tree N/A N/A self N/A N/A N/A 
        Return DOM tree of the document built with HTML DOM builder.
         N/A N/A N/A N/A N/A self grab config N/A content_type xml N/A N/A N/A N/A self build_xml_tree N/A N/A N/A N/A self build_html_tree N/A property _build_dom N/A N/A self content mode N/A N/A N/A N/A mode N/A html xml N/A N/A mode html N/A N/A N/A N/A hasattr THREAD_STORAGE html_parser N/A N/A N/A THREAD_STORAGE html_parser N/A HTMLParser N/A dom N/A parse N/A StringIO content parser N/A THREAD_STORAGE html_parser N/A N/A N/A dom getroot N/A N/A N/A N/A hasattr THREAD_STORAGE xml_parser N/A N/A N/A THREAD_STORAGE xml_parser N/A XMLParser N/A dom N/A parse N/A BytesIO content parser N/A THREAD_STORAGE xml_parser N/A N/A N/A dom getroot N/A build_html_tree N/A N/A self N/A N/A grab.base GLOBAL_STATE N/A N/A N/A self _lxml_tree None N/A N/A fix_setting N/A N/A N/A self grab config N/A fix_special_entities N/A body N/A N/A N/A N/A self unicode_body fix_special_entities fix_setting strip N/A N/A N/A N/A self grab config N/A lowercased_tree N/A N/A body N/A N/A body lower N/A N/A N/A N/A self grab config N/A strip_null_bytes N/A N/A body N/A N/A body replace NULL_BYTE N/A N/A six PY3 N/A N/A body N/A N/A RE_UNICODE_XML_DECLARATION sub body N/A N/A body N/A N/A RE_XML_DECLARATION sub body N/A N/A body N/A N/A body <html></html> N/A start N/A N/A time time N/A N/A N/A N/A self _lxml_tree N/A N/A self _build_dom body html N/A N/A N/A Exception N/A ex N/A N/A N/A N/A isinstance ex ParserError N/A Document is empty N/A str ex N/A <html body N/A N/A body N/A N/A <html>%s</html> format body N/A N/A self _lxml_tree N/A N/A self _build_dom body html N/A N/A N/A N/A isinstance ex TypeError N/A object of type 'NoneType' has no len N/A str ex N/A <html body N/A N/A body N/A N/A <html>%s</html> format body N/A N/A self _lxml_tree N/A N/A self _build_dom body html N/A N/A N/A N/A GLOBAL_STATE N/A dom_build_time N/A N/A N/A time time start N/A N/A self _lxml_tree N/A xml_tree N/A N/A self N/A N/A N/A 
        Return DOM-tree of the document built with XML DOM builder.
         N/A N/A warn Attribute `grab.xml_tree` is deprecated. Use `Grab.doc.tree` attribute AND content_type="xml" option instead. N/A N/A N/A self build_xml_tree N/A property build_xml_tree N/A N/A self N/A N/A N/A N/A N/A self _strict_lxml_tree None N/A N/A N/A self _strict_lxml_tree N/A N/A self _build_dom N/A self body xml N/A N/A self _strict_lxml_tree N/A N/A FormExtension N/A object N/A N/A __slots__ N/A choose_form N/A N/A self number id name xpath N/A None None None None N/A N/A 
        Set the default form.

        :param number: number of form (starting from zero)
        :param id: value of "id" attribute
        :param name: value of "name" attribute
        :param xpath: XPath query
        :raises: :class:`DataNotFound` if form not found
        :raises: :class:`GrabMisuseError`
            if method is called without parameters

        Selected form will be available via `form` attribute of `Grab`
        instance. All form methods will work with default form.

        Examples::

            # Select second form
            g.choose_form(1)

            # Select by id
            g.choose_form(id="register")

            # Select by name
            g.choose_form(name="signup")

            # Select by xpath
            g.choose_form(xpath='//form[contains(@action, "/submit")]')
         N/A N/A id None N/A N/A N/A N/A N/A self _lxml_form N/A N/A N/A N/A self select N/A //form[@id="%s"] id node N/A N/A N/A IndexError N/A N/A N/A DataNotFound N/A There is no form with id: %s id N/A N/A N/A name None N/A N/A N/A N/A N/A self _lxml_form N/A N/A N/A N/A self select N/A //form[@name="%s"] name node N/A N/A N/A IndexError N/A N/A N/A DataNotFound N/A There is no form with name: %s name N/A N/A N/A number None N/A N/A N/A N/A N/A self _lxml_form N/A N/A N/A self tree forms N/A number N/A N/A N/A IndexError N/A N/A N/A DataNotFound N/A There is no form with number: %s number N/A N/A N/A xpath None N/A N/A N/A N/A N/A self _lxml_form N/A N/A N/A N/A self select xpath node N/A N/A N/A IndexError N/A N/A N/A DataNotFound N/A Could not find form with xpath: %s xpath N/A N/A N/A GrabMisuseError choose_form methods requires one of [number, id, name, xpath] arguments N/A form N/A N/A self N/A N/A N/A 
        This attribute points to default form.

        If form was not selected manually then select the form
        which has the biggest number of input elements.

        The form value is just an `lxml.html` form element.

        Example::

            g.go('some URL')
            # Choose form automatically
            print g.form

            # And now choose form manually
            g.choose_form(1)
            print g.form
         N/A N/A N/A self _lxml_form None N/A N/A forms N/A N/A idx N/A len N/A list N/A x fields N/A N/A idx x N/A enumerate N/A N/A self tree forms N/A N/A len forms N/A N/A idx N/A N/A N/A sorted forms key N/A N/A N/A x N/A N/A x N/A 1 reverse True N/A 0 N/A 0 N/A N/A N/A self choose_form idx N/A N/A N/A DataNotFound Response does not contains any form N/A N/A self _lxml_form N/A property set_input N/A N/A self name value N/A N/A N/A 
        Set the value of form element by its `name` attribute.

        :param name: name of element
        :param value: value which should be set to element

        To check/uncheck the checkbox pass boolean value.

        Example::

            g.set_input('sex', 'male')

            # Check the checkbox
            g.set_input('accept', True)
         N/A N/A N/A self _lxml_form None N/A N/A N/A N/A self choose_form_by_element N/A .//*[@name="%s"] name N/A elem N/A N/A N/A self form inputs N/A name N/A processed False N/A N/A N/A getattr elem type None checkbox N/A N/A N/A isinstance value bool N/A N/A N/A elem checked value N/A processed True N/A N/A processed N/A N/A N/A N/A N/A N/A getattr elem type lower file N/A N/A N/A N/A self _file_fields N/A name value N/A N/A elem value N/A N/A N/A elem value value N/A set_input_by_id N/A N/A self _id value N/A N/A N/A 
        Set the value of form element by its `id` attribute.

        :param _id: id of element
        :param value: value which should be set to element
         N/A xpath N/A .//*[@id="%s"] _id N/A N/A N/A self _lxml_form None N/A N/A N/A N/A self choose_form_by_element xpath N/A sel N/A XpathSelector N/A self form N/A elem N/A N/A N/A N/A sel select xpath node N/A N/A N/A self set_input N/A N/A elem get name value N/A set_input_by_number N/A N/A self number value N/A N/A N/A 
        Set the value of form element by its number in the form

        :param number: number of element
        :param value: value which should be set to element
         N/A sel N/A XpathSelector N/A self form N/A elem N/A N/A N/A N/A N/A sel select .//input[@type="text"] N/A number node N/A N/A N/A self set_input N/A N/A elem get name value N/A set_input_by_xpath N/A N/A self xpath value N/A N/A N/A 
        Set the value of form element by xpath

        :param xpath: xpath path
        :param value: value which should be set to element
         N/A elem N/A N/A N/A N/A self select xpath node N/A N/A N/A self _lxml_form None N/A N/A parent elem N/A True N/A N/A parent N/A N/A parent getparent N/A N/A N/A parent tag form N/A N/A N/A self _lxml_form parent N/A N/A N/A N/A self set_input N/A N/A elem get name value N/A submit N/A N/A self submit_name make_request url extra_post N/A None True None None N/A N/A 
        Submit default form.

        :param submit_name: name of button which should be "clicked" to
            submit form
        :param make_request: if `False` then grab instance will be
            configured with form post data but request will not be
            performed
        :param url: explicitly specify form action url
        :param extra_post: (dict or list of pairs) additional form data which
            will override data automatically extracted from the form.

        Following input elements are automatically processed:

        * input[type="hidden"] - default value
        * select: value of last option
        * radio - ???
        * checkbox - ???

        Multipart forms are correctly recognized by grab library.

        Example::

            # Assume that we going to some page with some form
            g.go('some url')
            # Fill some fields
            g.set_input('username', 'bob')
            g.set_input('pwd', '123')
            # Submit the form
            g.submit()

            # or we can just fill the form
            # and do manual submission
            g.set_input('foo', 'bar')
            g.submit(make_request=False)
            g.request()

            # for multipart forms we can specify files
            from grab import UploadFile
            g.set_input('img', UploadFile('/path/to/image.png'))
            g.submit()
         N/A post N/A N/A self form_fields N/A submit_controls N/A N/A elem N/A N/A self form inputs N/A N/A N/A N/A N/A elem tag input N/A N/A elem type submit N/A N/A N/A elem get name None N/A N/A N/A submit_controls N/A N/A elem name elem N/A N/A len submit_controls N/A N/A N/A N/A submit_name None N/A submit_name submit_controls N/A N/A controls N/A sorted N/A N/A submit_controls values key N/A N/A N/A x N/A N/A x name N/A submit_name N/A N/A controls N/A 0 name N/A name submit_controls N/A N/A N/A name submit_name N/A N/A N/A name post N/A N/A N/A post N/A name N/A url N/A N/A action_url N/A urljoin N/A self url url N/A N/A action_url N/A urljoin N/A self url N/A N/A self form action N/A N/A N/A N/A self form method POST N/A N/A N/A multipart N/A N/A N/A self form get enctype N/A N/A N/A key obj N/A N/A N/A self _file_fields items N/A N/A N/A post N/A key obj N/A post_items N/A list N/A N/A post items N/A post N/A extra_post N/A N/A N/A isinstance extra_post dict N/A N/A extra_post_items N/A N/A extra_post items N/A N/A extra_post_items extra_post N/A keys_to_drop N/A set N/A x N/A N/A x y extra_post_items N/A key keys_to_drop N/A N/A post_items N/A N/A x y N/A N/A x y post_items N/A x key N/A N/A key value extra_post_items N/A N/A N/A N/A post_items append N/A key value N/A N/A N/A N/A self form method POST N/A N/A N/A multipart N/A N/A N/A self form get enctype N/A N/A N/A N/A N/A self grab setup multipart_post post_items N/A N/A N/A N/A N/A self grab setup post post_items N/A N/A N/A N/A self grab setup url action_url N/A N/A url N/A N/A N/A N/A N/A action_url split ? N/A 0 ? N/A smart_urlencode post_items N/A N/A N/A N/A self grab setup url url N/A make_request N/A N/A N/A N/A N/A self grab request N/A N/A None N/A form_fields N/A N/A self N/A N/A N/A 
        Return fields of default form.

        Fill some fields with reasonable values.
         N/A fields N/A dict N/A N/A self form fields N/A elem N/A N/A self form inputs N/A N/A N/A N/A N/A elem get name N/A N/A N/A N/A N/A elem get disabled N/A N/A N/A N/A elem name fields N/A N/A N/A fields N/A N/A elem name N/A N/A N/A N/A elem tag select N/A N/A N/A N/A fields N/A N/A elem name None N/A N/A N/A len N/A elem value_options N/A N/A N/A fields N/A N/A elem name N/A N/A elem value_options N/A 0 N/A N/A N/A N/A getattr elem type None radio N/A N/A N/A N/A fields N/A N/A elem name None N/A N/A N/A fields N/A N/A elem name N/A N/A elem get value N/A N/A N/A N/A getattr elem type None checkbox N/A N/A N/A N/A elem checked N/A N/A N/A N/A elem name None N/A N/A N/A N/A elem name fields N/A N/A N/A fields N/A N/A elem name N/A fields N/A choose_form_by_element N/A N/A self xpath N/A N/A N/A elem N/A N/A N/A N/A self select xpath node N/A N/A elem None N/A N/A N/A N/A elem tag form N/A N/A N/A self _lxml_form elem N/A N/A N/A elem N/A N/A elem getparent N/A N/A self _lxml_form None N/A N/A Document N/A TextExtension RegexpExtension PyqueryExtension BodyExtension DomTreeExtension FormExtension N/A N/A 
    Document (in most cases it is a network response
        i.e. result of network request)
     N/A __slots__ N/A status code head _bytes_body body_path headers url cookies charset _unicode_body bom timestamp name_lookup_time connect_time total_time download_size upload_size download_speed error_code error_msg grab remote_ip _lxml_tree _strict_lxml_tree _pyquery _lxml_form _file_fields from_cache __init__ N/A N/A self grab N/A None N/A N/A N/A grab None N/A N/A N/A self grab None N/A N/A N/A isinstance grab N/A weakref ProxyType N/A N/A N/A self grab grab N/A N/A N/A self grab N/A N/A weakref proxy grab N/A N/A self status None N/A N/A self code None N/A N/A self head None N/A N/A self headers None N/A N/A self url None N/A N/A self cookies N/A CookieManager N/A N/A self charset utf-8 N/A N/A self bom None N/A N/A self timestamp N/A N/A datetime utcnow N/A N/A self name_lookup_time 0 N/A N/A self connect_time 0 N/A N/A self total_time 0 N/A N/A self download_size 0 N/A N/A self upload_size 0 N/A N/A self download_speed 0 N/A N/A self error_code None N/A N/A self error_msg None N/A N/A self from_cache False N/A N/A self body_path None N/A N/A self _bytes_body None N/A N/A self _unicode_body None N/A N/A self _lxml_tree None N/A N/A self _strict_lxml_tree None N/A N/A self _pyquery None N/A N/A self _lxml_form None N/A N/A self _file_fields N/A N/A __call__ N/A N/A self query N/A N/A N/A N/A N/A self select query N/A select N/A N/A self N/A args kwargs N/A N/A N/A N/A N/A XpathSelector N/A self tree select args kwargs N/A structure N/A N/A self N/A args kwargs N/A N/A N/A N/A N/A TreeInterface N/A self tree structured_xpath args kwargs N/A parse N/A N/A self charset headers N/A None None N/A N/A 
        Parse headers.

        This method is called after Grab instance performes network request.
         N/A headers N/A N/A N/A self headers headers N/A N/A N/A self head N/A N/A responses N/A N/A N/A self head rsplit 
HTTP/ 1 N/A N/A _ response N/A N/A N/A responses N/A -1 split 1 N/A response N/A N/A response decode ascii ignore N/A N/A response N/A N/A self headers N/A N/A email message_from_string response N/A N/A charset None N/A N/A N/A isinstance N/A self body N/A six text_type N/A N/A N/A self charset utf-8 N/A N/A N/A N/A self detect_charset N/A N/A N/A self charset N/A N/A charset lower N/A N/A self _unicode_body None N/A detect_charset N/A N/A self N/A N/A N/A 
        Detect charset of the response.

        Try following methods:
        * meta[name="Http-Equiv"]
        * XML declaration
        * HTTP Content-Type header

        Ignore unknown charsets.

        Use utf-8 as fallback charset.
         N/A charset None N/A body_chunk N/A N/A self get_body_chunk N/A body_chunk N/A N/A match_charset N/A N/A RE_META_CHARSET search body_chunk N/A match_charset N/A N/A charset N/A N/A match_charset group 1 N/A N/A match_charset_html5 N/A N/A RE_META_CHARSET_HTML5 search body_chunk N/A match_charset_html5 N/A N/A charset N/A N/A match_charset_html5 group 1 N/A N/A bom_enc bom N/A read_bom body_chunk N/A bom_enc N/A N/A charset bom_enc N/A N/A self bom bom N/A N/A charset N/A N/A N/A N/A body_chunk startswith <?xml N/A N/A match N/A N/A RE_XML_DECLARATION search body_chunk N/A match N/A N/A enc_match N/A N/A RE_DECLARATION_ENCODING search N/A N/A match group 0 N/A enc_match N/A N/A charset N/A N/A enc_match group 1 N/A N/A charset N/A N/A N/A Content-Type N/A self headers N/A N/A pos N/A N/A N/A N/A self headers N/A Content-Type find charset= N/A N/A pos -1 N/A N/A charset N/A N/A N/A self headers N/A Content-Type N/A N/A pos 8 N/A charset N/A N/A charset N/A N/A charset lower N/A N/A N/A isinstance charset str N/A N/A charset N/A N/A charset decode utf-8 N/A N/A N/A N/A N/A codecs lookup charset N/A N/A N/A LookupError N/A N/A N/A N/A logger error N/A Unknown charset found: %s. Using utf-8 istead. charset N/A N/A self charset utf-8 N/A N/A N/A self charset charset N/A copy N/A N/A self new_grab N/A None N/A N/A 
        Clone the Response object.
         N/A N/A new_grab None N/A N/A obj N/A N/A self __class__ N/A self grab N/A N/A obj N/A N/A self __class__ new_grab N/A copy_keys N/A status code head body total_time connect_time name_lookup_time url charset _unicode_body N/A key copy_keys N/A N/A N/A setattr obj key N/A getattr self key N/A N/A obj headers N/A copy N/A self headers N/A N/A obj cookies N/A copy N/A self cookies N/A obj N/A save N/A N/A self path create_dirs N/A False N/A N/A 
        Save response body to file.
         N/A N/A path_dir path_fname N/A N/A N/A os path split path N/A N/A N/A N/A N/A os path exists path_dir N/A N/A N/A N/A N/A N/A os makedirs path_dir N/A N/A N/A OSError N/A N/A N/A N/A open path wb out N/A N/A N/A N/A out write N/A self _bytes_body N/A save_hash N/A N/A self location basedir ext N/A None N/A N/A 
        Save response body into file with special path
        builded from hash. That allows to lower number of files
        per directory.

        :param location: URL of file or something else. It is
            used to build the SHA1 hash.
        :param basedir: base directory to save the file. Note that
            file will not be saved directly to this directory but to
            some sub-directory of `basedir`
        :param ext: extension which should be appended to file name. The
            dot is inserted automatically between filename and extension.
        :returns: path to saved file relative to `basedir`

        Example::

            >>> url = 'http://yandex.ru/logo.png'
            >>> g.go(url)
            >>> g.response.save_hash(url, 'some_dir', ext='png')
            'e8/dc/f2918108788296df1facadc975d32b361a6a.png'
            # the file was saved to $PWD/some_dir/e8/dc/...

        TODO: replace `basedir` with two options: root and save_to. And
        returns save_to + path
         N/A N/A isinstance location N/A six text_type N/A N/A location N/A N/A location encode utf-8 N/A rel_path N/A hashed_path location ext ext N/A path N/A N/A N/A os path join basedir rel_path N/A N/A N/A N/A N/A os path exists path N/A N/A N/A path_dir path_fname N/A N/A N/A os path split path N/A N/A N/A N/A N/A os makedirs path_dir N/A N/A N/A OSError N/A N/A N/A N/A open path wb out N/A N/A N/A N/A out write N/A self _bytes_body N/A rel_path N/A json N/A N/A self N/A N/A N/A 
        Return response body deserialized into JSON object.
         N/A N/A six PY3 N/A N/A N/A N/A json loads N/A N/A N/A self body decode N/A self charset N/A N/A N/A N/A json loads N/A self body N/A property url_details N/A N/A self N/A N/A N/A 
        Return result of urlsplit function applied to response url.
         N/A N/A urlsplit N/A self url N/A query_param N/A N/A self key N/A N/A N/A 
        Return value of parameter in query string.
         N/A N/A N/A N/A parse_qs N/A N/A N/A self url_details query N/A key N/A 0 N/A browse N/A N/A self N/A N/A N/A 
        Save response in temporary file and open it in GUI browser.
         N/A N/A fh path N/A N/A tempfile mkstemp N/A N/A N/A self save path N/A N/A N/A webbrowser open N/A file:// path N/A time N/A N/A self N/A N/A N/A N/A warn Attribute `Document.time` is deprecated. Use `Document.total_time` instead. N/A N/A self total_time N/A property __getstate__ N/A N/A self N/A N/A N/A 
        Reset cached lxml objects which could not be pickled.
         N/A state N/A N/A cls N/A N/A N/A type self mro N/A N/A cls_slots N/A getattr cls __slots__ N/A N/A slot cls_slots N/A N/A N/A slot __weakref__ N/A N/A N/A hasattr self slot N/A N/A N/A state N/A slot N/A getattr self slot N/A N/A state N/A _lxml_tree None N/A N/A state N/A _strict_lxml_tree None N/A N/A state N/A _lxml_form None N/A state N/A __setstate__ N/A N/A self state N/A N/A N/A N/A slot value N/A N/A state items N/A N/A N/A setattr self slot value N/A get_meta_refresh_url N/A N/A self N/A N/A N/A N/A find_refresh_url N/A N/A self unicode_body N/A N/A