2 from __future__
import unicode_literals
22 import xml
.etree
.ElementTree
26 import urllib
.request
as compat_urllib_request
27 except ImportError: # Python 2
28 import urllib2
as compat_urllib_request
31 import urllib
.error
as compat_urllib_error
32 except ImportError: # Python 2
33 import urllib2
as compat_urllib_error
36 import urllib
.parse
as compat_urllib_parse
37 except ImportError: # Python 2
38 import urllib
as compat_urllib_parse
41 import urllib
.parse
as compat_urlparse
42 except ImportError: # Python 2
43 import urlparse
as compat_urlparse
46 from urllib
.parse
import urlparse
as compat_urllib_parse_urlparse
47 except ImportError: # Python 2
48 from urlparse
import urlparse
as compat_urllib_parse_urlparse
51 from urllib
.parse
import urlunparse
as compat_urllib_parse_urlunparse
52 except ImportError: # Python 2
53 from urlparse
import urlunparse
as compat_urllib_parse_urlunparse
56 import urllib
.response
as compat_urllib_response
57 except ImportError: # Python 2
58 import urllib
as compat_urllib_response
61 import http
.cookiejar
as compat_cookiejar
62 except ImportError: # Python 2
63 import cookielib
as compat_cookiejar
65 if sys
.version_info
[0] == 2:
66 class compat_cookiejar_Cookie(compat_cookiejar
.Cookie
):
67 def __init__(self
, version
, name
, value
, *args
, **kwargs
):
68 if isinstance(name
, compat_str
):
70 if isinstance(value
, compat_str
):
71 value
= value
.encode()
72 compat_cookiejar
.Cookie
.__init
__(self
, version
, name
, value
, *args
, **kwargs
)
74 compat_cookiejar_Cookie
= compat_cookiejar
.Cookie
77 import http
.cookies
as compat_cookies
78 except ImportError: # Python 2
79 import Cookie
as compat_cookies
81 if sys
.version_info
[0] == 2:
82 class compat_cookies_SimpleCookie(compat_cookies
.SimpleCookie
):
83 def load(self
, rawdata
):
84 if isinstance(rawdata
, compat_str
):
85 rawdata
= str(rawdata
)
86 return super(compat_cookies_SimpleCookie
, self
).load(rawdata
)
88 compat_cookies_SimpleCookie
= compat_cookies
.SimpleCookie
91 import html
.entities
as compat_html_entities
92 except ImportError: # Python 2
93 import htmlentitydefs
as compat_html_entities
96 compat_html_entities_html5
= compat_html_entities
.html5
97 except AttributeError:
98 # Copied from CPython 3.5.1 html/entities.py
99 compat_html_entities_html5
= {
108 'acE;': '\u223e\u0333',
122 'Afr;': '\U0001d504',
123 'afr;': '\U0001d51e',
128 'alefsym;': '\u2135',
143 'andslope;': '\u2a58',
149 'angmsdaa;': '\u29a8',
150 'angmsdab;': '\u29a9',
151 'angmsdac;': '\u29aa',
152 'angmsdad;': '\u29ab',
153 'angmsdae;': '\u29ac',
154 'angmsdaf;': '\u29ad',
155 'angmsdag;': '\u29ae',
156 'angmsdah;': '\u29af',
158 'angrtvb;': '\u22be',
159 'angrtvbd;': '\u299d',
162 'angzarr;': '\u237c',
165 'Aopf;': '\U0001d538',
166 'aopf;': '\U0001d552',
173 'ApplyFunction;': '\u2061',
175 'approxeq;': '\u224a',
180 'Ascr;': '\U0001d49c',
181 'ascr;': '\U0001d4b6',
185 'asympeq;': '\u224d',
194 'awconint;': '\u2233',
196 'backcong;': '\u224c',
197 'backepsilon;': '\u03f6',
198 'backprime;': '\u2035',
199 'backsim;': '\u223d',
200 'backsimeq;': '\u22cd',
201 'Backslash;': '\u2216',
206 'barwedge;': '\u2305',
208 'bbrktbrk;': '\u23b6',
214 'Because;': '\u2235',
215 'because;': '\u2235',
216 'bemptyv;': '\u29b0',
219 'Bernoullis;': '\u212c',
223 'between;': '\u226c',
224 'Bfr;': '\U0001d505',
225 'bfr;': '\U0001d51f',
227 'bigcirc;': '\u25ef',
229 'bigodot;': '\u2a00',
230 'bigoplus;': '\u2a01',
231 'bigotimes;': '\u2a02',
232 'bigsqcup;': '\u2a06',
233 'bigstar;': '\u2605',
234 'bigtriangledown;': '\u25bd',
235 'bigtriangleup;': '\u25b3',
236 'biguplus;': '\u2a04',
238 'bigwedge;': '\u22c0',
240 'blacklozenge;': '\u29eb',
241 'blacksquare;': '\u25aa',
242 'blacktriangle;': '\u25b4',
243 'blacktriangledown;': '\u25be',
244 'blacktriangleleft;': '\u25c2',
245 'blacktriangleright;': '\u25b8',
252 'bnequiv;': '\u2261\u20e5',
255 'Bopf;': '\U0001d539',
256 'bopf;': '\U0001d553',
279 'boxminus;': '\u229f',
280 'boxplus;': '\u229e',
281 'boxtimes;': '\u22a0',
310 'bscr;': '\U0001d4b7',
316 'bsolhsub;': '\u27c8',
329 'capbrcup;': '\u2a49',
333 'CapitalDifferentialD;': '\u2145',
334 'caps;': '\u2229\ufe00',
337 'Cayleys;': '\u212d',
347 'Cconint;': '\u2230',
349 'ccupssm;': '\u2a50',
355 'cemptyv;': '\u29b2',
358 'CenterDot;': '\xb7',
359 'centerdot;': '\xb7',
361 'cfr;': '\U0001d520',
365 'checkmark;': '\u2713',
371 'circlearrowleft;': '\u21ba',
372 'circlearrowright;': '\u21bb',
373 'circledast;': '\u229b',
374 'circledcirc;': '\u229a',
375 'circleddash;': '\u229d',
376 'CircleDot;': '\u2299',
378 'circledS;': '\u24c8',
379 'CircleMinus;': '\u2296',
380 'CirclePlus;': '\u2295',
381 'CircleTimes;': '\u2297',
384 'cirfnint;': '\u2a10',
386 'cirscir;': '\u29c2',
387 'ClockwiseContourIntegral;': '\u2232',
388 'CloseCurlyDoubleQuote;': '\u201d',
389 'CloseCurlyQuote;': '\u2019',
391 'clubsuit;': '\u2663',
396 'coloneq;': '\u2254',
401 'complement;': '\u2201',
402 'complexes;': '\u2102',
404 'congdot;': '\u2a6d',
405 'Congruent;': '\u2261',
408 'ContourIntegral;': '\u222e',
410 'copf;': '\U0001d554',
412 'Coproduct;': '\u2210',
418 'CounterClockwiseContourIntegral;': '\u2233',
422 'Cscr;': '\U0001d49e',
423 'cscr;': '\U0001d4b8',
429 'cudarrl;': '\u2938',
430 'cudarrr;': '\u2935',
434 'cularrp;': '\u293d',
437 'cupbrcap;': '\u2a48',
443 'cups;': '\u222a\ufe00',
445 'curarrm;': '\u293c',
446 'curlyeqprec;': '\u22de',
447 'curlyeqsucc;': '\u22df',
448 'curlyvee;': '\u22ce',
449 'curlywedge;': '\u22cf',
452 'curvearrowleft;': '\u21b6',
453 'curvearrowright;': '\u21b7',
456 'cwconint;': '\u2232',
468 'dbkarow;': '\u290f',
476 'ddagger;': '\u2021',
478 'DDotrahd;': '\u2911',
479 'ddotseq;': '\u2a77',
485 'demptyv;': '\u29b1',
487 'Dfr;': '\U0001d507',
488 'dfr;': '\U0001d521',
492 'DiacriticalAcute;': '\xb4',
493 'DiacriticalDot;': '\u02d9',
494 'DiacriticalDoubleAcute;': '\u02dd',
495 'DiacriticalGrave;': '`',
496 'DiacriticalTilde;': '\u02dc',
498 'Diamond;': '\u22c4',
499 'diamond;': '\u22c4',
500 'diamondsuit;': '\u2666',
503 'DifferentialD;': '\u2146',
504 'digamma;': '\u03dd',
509 'divideontimes;': '\u22c7',
516 'Dopf;': '\U0001d53b',
517 'dopf;': '\U0001d555',
522 'doteqdot;': '\u2251',
523 'DotEqual;': '\u2250',
524 'dotminus;': '\u2238',
525 'dotplus;': '\u2214',
526 'dotsquare;': '\u22a1',
527 'doublebarwedge;': '\u2306',
528 'DoubleContourIntegral;': '\u222f',
529 'DoubleDot;': '\xa8',
530 'DoubleDownArrow;': '\u21d3',
531 'DoubleLeftArrow;': '\u21d0',
532 'DoubleLeftRightArrow;': '\u21d4',
533 'DoubleLeftTee;': '\u2ae4',
534 'DoubleLongLeftArrow;': '\u27f8',
535 'DoubleLongLeftRightArrow;': '\u27fa',
536 'DoubleLongRightArrow;': '\u27f9',
537 'DoubleRightArrow;': '\u21d2',
538 'DoubleRightTee;': '\u22a8',
539 'DoubleUpArrow;': '\u21d1',
540 'DoubleUpDownArrow;': '\u21d5',
541 'DoubleVerticalBar;': '\u2225',
542 'DownArrow;': '\u2193',
543 'Downarrow;': '\u21d3',
544 'downarrow;': '\u2193',
545 'DownArrowBar;': '\u2913',
546 'DownArrowUpArrow;': '\u21f5',
547 'DownBreve;': '\u0311',
548 'downdownarrows;': '\u21ca',
549 'downharpoonleft;': '\u21c3',
550 'downharpoonright;': '\u21c2',
551 'DownLeftRightVector;': '\u2950',
552 'DownLeftTeeVector;': '\u295e',
553 'DownLeftVector;': '\u21bd',
554 'DownLeftVectorBar;': '\u2956',
555 'DownRightTeeVector;': '\u295f',
556 'DownRightVector;': '\u21c1',
557 'DownRightVectorBar;': '\u2957',
558 'DownTee;': '\u22a4',
559 'DownTeeArrow;': '\u21a7',
560 'drbkarow;': '\u2910',
563 'Dscr;': '\U0001d49f',
564 'dscr;': '\U0001d4b9',
575 'dwangle;': '\u29a6',
578 'dzigrarr;': '\u27ff',
600 'Efr;': '\U0001d508',
601 'efr;': '\U0001d522',
610 'Element;': '\u2208',
611 'elinters;': '\u23e7',
618 'emptyset;': '\u2205',
619 'EmptySmallSquare;': '\u25fb',
621 'EmptyVerySmallSquare;': '\u25ab',
630 'Eopf;': '\U0001d53c',
631 'eopf;': '\U0001d556',
636 'Epsilon;': '\u0395',
637 'epsilon;': '\u03b5',
640 'eqcolon;': '\u2255',
642 'eqslantgtr;': '\u2a96',
643 'eqslantless;': '\u2a95',
646 'EqualTilde;': '\u2242',
648 'Equilibrium;': '\u21cc',
650 'equivDD;': '\u2a78',
651 'eqvparsl;': '\u29e5',
673 'expectation;': '\u2130',
674 'ExponentialE;': '\u2147',
675 'exponentiale;': '\u2147',
676 'fallingdotseq;': '\u2252',
683 'Ffr;': '\U0001d509',
684 'ffr;': '\U0001d523',
686 'FilledSmallSquare;': '\u25fc',
687 'FilledVerySmallSquare;': '\u25aa',
693 'Fopf;': '\U0001d53d',
694 'fopf;': '\U0001d557',
699 'Fouriertrf;': '\u2131',
700 'fpartint;': '\u2a0d',
722 'fscr;': '\U0001d4bb',
744 'geqslant;': '\u2a7e',
748 'gesdoto;': '\u2a82',
749 'gesdotol;': '\u2a84',
750 'gesl;': '\u22db\ufe00',
752 'Gfr;': '\U0001d50a',
753 'gfr;': '\U0001d524',
765 'gnapprox;': '\u2a8a',
771 'Gopf;': '\U0001d53e',
772 'gopf;': '\U0001d558',
774 'GreaterEqual;': '\u2265',
775 'GreaterEqualLess;': '\u22db',
776 'GreaterFullEqual;': '\u2267',
777 'GreaterGreater;': '\u2aa2',
778 'GreaterLess;': '\u2277',
779 'GreaterSlantEqual;': '\u2a7e',
780 'GreaterTilde;': '\u2273',
781 'Gscr;': '\U0001d4a2',
795 'gtquest;': '\u2a7c',
796 'gtrapprox;': '\u2a86',
799 'gtreqless;': '\u22db',
800 'gtreqqless;': '\u2a8c',
801 'gtrless;': '\u2277',
803 'gvertneqq;': '\u2269\ufe00',
804 'gvnE;': '\u2269\ufe00',
813 'harrcir;': '\u2948',
820 'heartsuit;': '\u2665',
824 'hfr;': '\U0001d525',
825 'HilbertSpace;': '\u210b',
826 'hksearow;': '\u2925',
827 'hkswarow;': '\u2926',
830 'hookleftarrow;': '\u21a9',
831 'hookrightarrow;': '\u21aa',
833 'hopf;': '\U0001d559',
835 'HorizontalLine;': '\u2500',
837 'hscr;': '\U0001d4bd',
841 'HumpDownHump;': '\u224e',
842 'HumpEqual;': '\u224f',
863 'ifr;': '\U0001d526',
879 'ImaginaryI;': '\u2148',
880 'imagline;': '\u2110',
881 'imagpart;': '\u2111',
885 'Implies;': '\u21d2',
889 'infintie;': '\u29dd',
894 'integers;': '\u2124',
895 'Integral;': '\u222b',
896 'intercal;': '\u22ba',
897 'Intersection;': '\u22c2',
898 'intlarhk;': '\u2a17',
899 'intprod;': '\u2a3c',
900 'InvisibleComma;': '\u2063',
901 'InvisibleTimes;': '\u2062',
906 'Iopf;': '\U0001d540',
907 'iopf;': '\U0001d55a',
914 'iscr;': '\U0001d4be',
916 'isindot;': '\u22f5',
934 'Jfr;': '\U0001d50d',
935 'jfr;': '\U0001d527',
937 'Jopf;': '\U0001d541',
938 'jopf;': '\U0001d55b',
939 'Jscr;': '\U0001d4a5',
940 'jscr;': '\U0001d4bf',
952 'Kfr;': '\U0001d50e',
953 'kfr;': '\U0001d528',
959 'Kopf;': '\U0001d542',
960 'kopf;': '\U0001d55c',
961 'Kscr;': '\U0001d4a6',
962 'kscr;': '\U0001d4c0',
966 'laemptyv;': '\u29b4',
975 'Laplacetrf;': '\u2112',
982 'larrbfs;': '\u291f',
987 'larrsim;': '\u2973',
993 'lates;': '\u2aad\ufe00',
1000 'lbrksld;': '\u298f',
1001 'lbrkslu;': '\u298d',
1002 'Lcaron;': '\u013d',
1003 'lcaron;': '\u013e',
1004 'Lcedil;': '\u013b',
1005 'lcedil;': '\u013c',
1012 'ldquor;': '\u201e',
1013 'ldrdhar;': '\u2967',
1014 'ldrushar;': '\u294b',
1018 'LeftAngleBracket;': '\u27e8',
1019 'LeftArrow;': '\u2190',
1020 'Leftarrow;': '\u21d0',
1021 'leftarrow;': '\u2190',
1022 'LeftArrowBar;': '\u21e4',
1023 'LeftArrowRightArrow;': '\u21c6',
1024 'leftarrowtail;': '\u21a2',
1025 'LeftCeiling;': '\u2308',
1026 'LeftDoubleBracket;': '\u27e6',
1027 'LeftDownTeeVector;': '\u2961',
1028 'LeftDownVector;': '\u21c3',
1029 'LeftDownVectorBar;': '\u2959',
1030 'LeftFloor;': '\u230a',
1031 'leftharpoondown;': '\u21bd',
1032 'leftharpoonup;': '\u21bc',
1033 'leftleftarrows;': '\u21c7',
1034 'LeftRightArrow;': '\u2194',
1035 'Leftrightarrow;': '\u21d4',
1036 'leftrightarrow;': '\u2194',
1037 'leftrightarrows;': '\u21c6',
1038 'leftrightharpoons;': '\u21cb',
1039 'leftrightsquigarrow;': '\u21ad',
1040 'LeftRightVector;': '\u294e',
1041 'LeftTee;': '\u22a3',
1042 'LeftTeeArrow;': '\u21a4',
1043 'LeftTeeVector;': '\u295a',
1044 'leftthreetimes;': '\u22cb',
1045 'LeftTriangle;': '\u22b2',
1046 'LeftTriangleBar;': '\u29cf',
1047 'LeftTriangleEqual;': '\u22b4',
1048 'LeftUpDownVector;': '\u2951',
1049 'LeftUpTeeVector;': '\u2960',
1050 'LeftUpVector;': '\u21bf',
1051 'LeftUpVectorBar;': '\u2958',
1052 'LeftVector;': '\u21bc',
1053 'LeftVectorBar;': '\u2952',
1058 'leqslant;': '\u2a7d',
1061 'lesdot;': '\u2a7f',
1062 'lesdoto;': '\u2a81',
1063 'lesdotor;': '\u2a83',
1064 'lesg;': '\u22da\ufe00',
1065 'lesges;': '\u2a93',
1066 'lessapprox;': '\u2a85',
1067 'lessdot;': '\u22d6',
1068 'lesseqgtr;': '\u22da',
1069 'lesseqqgtr;': '\u2a8b',
1070 'LessEqualGreater;': '\u22da',
1071 'LessFullEqual;': '\u2266',
1072 'LessGreater;': '\u2276',
1073 'lessgtr;': '\u2276',
1074 'LessLess;': '\u2aa1',
1075 'lesssim;': '\u2272',
1076 'LessSlantEqual;': '\u2a7d',
1077 'LessTilde;': '\u2272',
1078 'lfisht;': '\u297c',
1079 'lfloor;': '\u230a',
1080 'Lfr;': '\U0001d50f',
1081 'lfr;': '\U0001d529',
1087 'lharul;': '\u296a',
1094 'llcorner;': '\u231e',
1095 'Lleftarrow;': '\u21da',
1096 'llhard;': '\u296b',
1098 'Lmidot;': '\u013f',
1099 'lmidot;': '\u0140',
1100 'lmoust;': '\u23b0',
1101 'lmoustache;': '\u23b0',
1103 'lnapprox;': '\u2a89',
1112 'LongLeftArrow;': '\u27f5',
1113 'Longleftarrow;': '\u27f8',
1114 'longleftarrow;': '\u27f5',
1115 'LongLeftRightArrow;': '\u27f7',
1116 'Longleftrightarrow;': '\u27fa',
1117 'longleftrightarrow;': '\u27f7',
1118 'longmapsto;': '\u27fc',
1119 'LongRightArrow;': '\u27f6',
1120 'Longrightarrow;': '\u27f9',
1121 'longrightarrow;': '\u27f6',
1122 'looparrowleft;': '\u21ab',
1123 'looparrowright;': '\u21ac',
1125 'Lopf;': '\U0001d543',
1126 'lopf;': '\U0001d55d',
1127 'loplus;': '\u2a2d',
1128 'lotimes;': '\u2a34',
1129 'lowast;': '\u2217',
1131 'LowerLeftArrow;': '\u2199',
1132 'LowerRightArrow;': '\u2198',
1134 'lozenge;': '\u25ca',
1137 'lparlt;': '\u2993',
1139 'lrcorner;': '\u231f',
1141 'lrhard;': '\u296d',
1144 'lsaquo;': '\u2039',
1146 'lscr;': '\U0001d4c1',
1154 'lsquor;': '\u201a',
1155 'Lstrok;': '\u0141',
1156 'lstrok;': '\u0142',
1165 'lthree;': '\u22cb',
1166 'ltimes;': '\u22c9',
1167 'ltlarr;': '\u2976',
1168 'ltquest;': '\u2a7b',
1172 'ltrPar;': '\u2996',
1173 'lurdshar;': '\u294a',
1174 'luruhar;': '\u2966',
1175 'lvertneqq;': '\u2268\ufe00',
1176 'lvnE;': '\u2268\ufe00',
1181 'maltese;': '\u2720',
1184 'mapsto;': '\u21a6',
1185 'mapstodown;': '\u21a7',
1186 'mapstoleft;': '\u21a4',
1187 'mapstoup;': '\u21a5',
1188 'marker;': '\u25ae',
1189 'mcomma;': '\u2a29',
1194 'measuredangle;': '\u2221',
1195 'MediumSpace;': '\u205f',
1196 'Mellintrf;': '\u2133',
1197 'Mfr;': '\U0001d510',
1198 'mfr;': '\U0001d52a',
1204 'midcir;': '\u2af0',
1208 'minusb;': '\u229f',
1209 'minusd;': '\u2238',
1210 'minusdu;': '\u2a2a',
1211 'MinusPlus;': '\u2213',
1214 'mnplus;': '\u2213',
1215 'models;': '\u22a7',
1216 'Mopf;': '\U0001d544',
1217 'mopf;': '\U0001d55e',
1220 'mscr;': '\U0001d4c2',
1221 'mstpos;': '\u223e',
1224 'multimap;': '\u22b8',
1227 'Nacute;': '\u0143',
1228 'nacute;': '\u0144',
1229 'nang;': '\u2220\u20d2',
1231 'napE;': '\u2a70\u0338',
1232 'napid;': '\u224b\u0338',
1234 'napprox;': '\u2249',
1236 'natural;': '\u266e',
1237 'naturals;': '\u2115',
1240 'nbump;': '\u224e\u0338',
1241 'nbumpe;': '\u224f\u0338',
1243 'Ncaron;': '\u0147',
1244 'ncaron;': '\u0148',
1245 'Ncedil;': '\u0145',
1246 'ncedil;': '\u0146',
1248 'ncongdot;': '\u2a6d\u0338',
1254 'nearhk;': '\u2924',
1257 'nearrow;': '\u2197',
1258 'nedot;': '\u2250\u0338',
1259 'NegativeMediumSpace;': '\u200b',
1260 'NegativeThickSpace;': '\u200b',
1261 'NegativeThinSpace;': '\u200b',
1262 'NegativeVeryThinSpace;': '\u200b',
1263 'nequiv;': '\u2262',
1264 'nesear;': '\u2928',
1265 'nesim;': '\u2242\u0338',
1266 'NestedGreaterGreater;': '\u226b',
1267 'NestedLessLess;': '\u226a',
1269 'nexist;': '\u2204',
1270 'nexists;': '\u2204',
1271 'Nfr;': '\U0001d511',
1272 'nfr;': '\U0001d52b',
1273 'ngE;': '\u2267\u0338',
1276 'ngeqq;': '\u2267\u0338',
1277 'ngeqslant;': '\u2a7e\u0338',
1278 'nges;': '\u2a7e\u0338',
1279 'nGg;': '\u22d9\u0338',
1281 'nGt;': '\u226b\u20d2',
1284 'nGtv;': '\u226b\u0338',
1297 'nlE;': '\u2266\u0338',
1299 'nLeftarrow;': '\u21cd',
1300 'nleftarrow;': '\u219a',
1301 'nLeftrightarrow;': '\u21ce',
1302 'nleftrightarrow;': '\u21ae',
1304 'nleqq;': '\u2266\u0338',
1305 'nleqslant;': '\u2a7d\u0338',
1306 'nles;': '\u2a7d\u0338',
1308 'nLl;': '\u22d8\u0338',
1310 'nLt;': '\u226a\u20d2',
1313 'nltrie;': '\u22ec',
1314 'nLtv;': '\u226a\u0338',
1316 'NoBreak;': '\u2060',
1317 'NonBreakingSpace;': '\xa0',
1319 'nopf;': '\U0001d55f',
1323 'NotCongruent;': '\u2262',
1324 'NotCupCap;': '\u226d',
1325 'NotDoubleVerticalBar;': '\u2226',
1326 'NotElement;': '\u2209',
1327 'NotEqual;': '\u2260',
1328 'NotEqualTilde;': '\u2242\u0338',
1329 'NotExists;': '\u2204',
1330 'NotGreater;': '\u226f',
1331 'NotGreaterEqual;': '\u2271',
1332 'NotGreaterFullEqual;': '\u2267\u0338',
1333 'NotGreaterGreater;': '\u226b\u0338',
1334 'NotGreaterLess;': '\u2279',
1335 'NotGreaterSlantEqual;': '\u2a7e\u0338',
1336 'NotGreaterTilde;': '\u2275',
1337 'NotHumpDownHump;': '\u224e\u0338',
1338 'NotHumpEqual;': '\u224f\u0338',
1340 'notindot;': '\u22f5\u0338',
1341 'notinE;': '\u22f9\u0338',
1342 'notinva;': '\u2209',
1343 'notinvb;': '\u22f7',
1344 'notinvc;': '\u22f6',
1345 'NotLeftTriangle;': '\u22ea',
1346 'NotLeftTriangleBar;': '\u29cf\u0338',
1347 'NotLeftTriangleEqual;': '\u22ec',
1348 'NotLess;': '\u226e',
1349 'NotLessEqual;': '\u2270',
1350 'NotLessGreater;': '\u2278',
1351 'NotLessLess;': '\u226a\u0338',
1352 'NotLessSlantEqual;': '\u2a7d\u0338',
1353 'NotLessTilde;': '\u2274',
1354 'NotNestedGreaterGreater;': '\u2aa2\u0338',
1355 'NotNestedLessLess;': '\u2aa1\u0338',
1357 'notniva;': '\u220c',
1358 'notnivb;': '\u22fe',
1359 'notnivc;': '\u22fd',
1360 'NotPrecedes;': '\u2280',
1361 'NotPrecedesEqual;': '\u2aaf\u0338',
1362 'NotPrecedesSlantEqual;': '\u22e0',
1363 'NotReverseElement;': '\u220c',
1364 'NotRightTriangle;': '\u22eb',
1365 'NotRightTriangleBar;': '\u29d0\u0338',
1366 'NotRightTriangleEqual;': '\u22ed',
1367 'NotSquareSubset;': '\u228f\u0338',
1368 'NotSquareSubsetEqual;': '\u22e2',
1369 'NotSquareSuperset;': '\u2290\u0338',
1370 'NotSquareSupersetEqual;': '\u22e3',
1371 'NotSubset;': '\u2282\u20d2',
1372 'NotSubsetEqual;': '\u2288',
1373 'NotSucceeds;': '\u2281',
1374 'NotSucceedsEqual;': '\u2ab0\u0338',
1375 'NotSucceedsSlantEqual;': '\u22e1',
1376 'NotSucceedsTilde;': '\u227f\u0338',
1377 'NotSuperset;': '\u2283\u20d2',
1378 'NotSupersetEqual;': '\u2289',
1379 'NotTilde;': '\u2241',
1380 'NotTildeEqual;': '\u2244',
1381 'NotTildeFullEqual;': '\u2247',
1382 'NotTildeTilde;': '\u2249',
1383 'NotVerticalBar;': '\u2224',
1385 'nparallel;': '\u2226',
1386 'nparsl;': '\u2afd\u20e5',
1387 'npart;': '\u2202\u0338',
1388 'npolint;': '\u2a14',
1390 'nprcue;': '\u22e0',
1391 'npre;': '\u2aaf\u0338',
1393 'npreceq;': '\u2aaf\u0338',
1396 'nrarrc;': '\u2933\u0338',
1397 'nrarrw;': '\u219d\u0338',
1398 'nRightarrow;': '\u21cf',
1399 'nrightarrow;': '\u219b',
1401 'nrtrie;': '\u22ed',
1403 'nsccue;': '\u22e1',
1404 'nsce;': '\u2ab0\u0338',
1405 'Nscr;': '\U0001d4a9',
1406 'nscr;': '\U0001d4c3',
1407 'nshortmid;': '\u2224',
1408 'nshortparallel;': '\u2226',
1411 'nsimeq;': '\u2244',
1414 'nsqsube;': '\u22e2',
1415 'nsqsupe;': '\u22e3',
1417 'nsubE;': '\u2ac5\u0338',
1419 'nsubset;': '\u2282\u20d2',
1420 'nsubseteq;': '\u2288',
1421 'nsubseteqq;': '\u2ac5\u0338',
1423 'nsucceq;': '\u2ab0\u0338',
1425 'nsupE;': '\u2ac6\u0338',
1427 'nsupset;': '\u2283\u20d2',
1428 'nsupseteq;': '\u2289',
1429 'nsupseteqq;': '\u2ac6\u0338',
1436 'ntriangleleft;': '\u22ea',
1437 'ntrianglelefteq;': '\u22ec',
1438 'ntriangleright;': '\u22eb',
1439 'ntrianglerighteq;': '\u22ed',
1443 'numero;': '\u2116',
1445 'nvap;': '\u224d\u20d2',
1446 'nVDash;': '\u22af',
1447 'nVdash;': '\u22ae',
1448 'nvDash;': '\u22ad',
1449 'nvdash;': '\u22ac',
1450 'nvge;': '\u2265\u20d2',
1452 'nvHarr;': '\u2904',
1453 'nvinfin;': '\u29de',
1454 'nvlArr;': '\u2902',
1455 'nvle;': '\u2264\u20d2',
1457 'nvltrie;': '\u22b4\u20d2',
1458 'nvrArr;': '\u2903',
1459 'nvrtrie;': '\u22b5\u20d2',
1460 'nvsim;': '\u223c\u20d2',
1461 'nwarhk;': '\u2923',
1464 'nwarrow;': '\u2196',
1465 'nwnear;': '\u2927',
1479 'Odblac;': '\u0150',
1480 'odblac;': '\u0151',
1483 'odsold;': '\u29bc',
1487 'Ofr;': '\U0001d512',
1488 'ofr;': '\U0001d52c',
1500 'olcross;': '\u29bb',
1507 'Omicron;': '\u039f',
1508 'omicron;': '\u03bf',
1510 'ominus;': '\u2296',
1511 'Oopf;': '\U0001d546',
1512 'oopf;': '\U0001d560',
1514 'OpenCurlyDoubleQuote;': '\u201c',
1515 'OpenCurlyQuote;': '\u2018',
1523 'orderof;': '\u2134',
1528 'origof;': '\u22b6',
1530 'orslope;': '\u2a57',
1533 'Oscr;': '\U0001d4aa',
1544 'Otimes;': '\u2a37',
1545 'otimes;': '\u2297',
1546 'otimesas;': '\u2a36',
1552 'OverBar;': '\u203e',
1553 'OverBrace;': '\u23de',
1554 'OverBracket;': '\u23b4',
1555 'OverParenthesis;': '\u23dc',
1559 'parallel;': '\u2225',
1560 'parsim;': '\u2af3',
1563 'PartialD;': '\u2202',
1568 'permil;': '\u2030',
1570 'pertenk;': '\u2031',
1571 'Pfr;': '\U0001d513',
1572 'pfr;': '\U0001d52d',
1576 'phmmat;': '\u2133',
1580 'pitchfork;': '\u22d4',
1582 'planck;': '\u210f',
1583 'planckh;': '\u210e',
1584 'plankv;': '\u210f',
1586 'plusacir;': '\u2a23',
1588 'pluscir;': '\u2a22',
1589 'plusdo;': '\u2214',
1590 'plusdu;': '\u2a25',
1592 'PlusMinus;': '\xb1',
1595 'plussim;': '\u2a26',
1596 'plustwo;': '\u2a27',
1598 'Poincareplane;': '\u210c',
1599 'pointint;': '\u2a15',
1601 'popf;': '\U0001d561',
1611 'precapprox;': '\u2ab7',
1612 'preccurlyeq;': '\u227c',
1613 'Precedes;': '\u227a',
1614 'PrecedesEqual;': '\u2aaf',
1615 'PrecedesSlantEqual;': '\u227c',
1616 'PrecedesTilde;': '\u227e',
1617 'preceq;': '\u2aaf',
1618 'precnapprox;': '\u2ab9',
1619 'precneqq;': '\u2ab5',
1620 'precnsim;': '\u22e8',
1621 'precsim;': '\u227e',
1624 'primes;': '\u2119',
1627 'prnsim;': '\u22e8',
1629 'Product;': '\u220f',
1630 'profalar;': '\u232e',
1631 'profline;': '\u2312',
1632 'profsurf;': '\u2313',
1634 'Proportion;': '\u2237',
1635 'Proportional;': '\u221d',
1636 'propto;': '\u221d',
1638 'prurel;': '\u22b0',
1639 'Pscr;': '\U0001d4ab',
1640 'pscr;': '\U0001d4c5',
1643 'puncsp;': '\u2008',
1644 'Qfr;': '\U0001d514',
1645 'qfr;': '\U0001d52e',
1648 'qopf;': '\U0001d562',
1649 'qprime;': '\u2057',
1650 'Qscr;': '\U0001d4ac',
1651 'qscr;': '\U0001d4c6',
1652 'quaternions;': '\u210d',
1653 'quatint;': '\u2a16',
1655 'questeq;': '\u225f',
1661 'race;': '\u223d\u0331',
1662 'Racute;': '\u0154',
1663 'racute;': '\u0155',
1665 'raemptyv;': '\u29b3',
1670 'rangle;': '\u27e9',
1676 'rarrap;': '\u2975',
1678 'rarrbfs;': '\u2920',
1680 'rarrfs;': '\u291e',
1681 'rarrhk;': '\u21aa',
1682 'rarrlp;': '\u21ac',
1683 'rarrpl;': '\u2945',
1684 'rarrsim;': '\u2974',
1685 'Rarrtl;': '\u2916',
1686 'rarrtl;': '\u21a3',
1688 'rAtail;': '\u291c',
1689 'ratail;': '\u291a',
1691 'rationals;': '\u211a',
1699 'rbrksld;': '\u298e',
1700 'rbrkslu;': '\u2990',
1701 'Rcaron;': '\u0158',
1702 'rcaron;': '\u0159',
1703 'Rcedil;': '\u0156',
1704 'rcedil;': '\u0157',
1710 'rdldhar;': '\u2969',
1712 'rdquor;': '\u201d',
1716 'realine;': '\u211b',
1717 'realpart;': '\u211c',
1724 'ReverseElement;': '\u220b',
1725 'ReverseEquilibrium;': '\u21cb',
1726 'ReverseUpEquilibrium;': '\u296f',
1727 'rfisht;': '\u297d',
1728 'rfloor;': '\u230b',
1730 'rfr;': '\U0001d52f',
1734 'rharul;': '\u296c',
1738 'RightAngleBracket;': '\u27e9',
1739 'RightArrow;': '\u2192',
1740 'Rightarrow;': '\u21d2',
1741 'rightarrow;': '\u2192',
1742 'RightArrowBar;': '\u21e5',
1743 'RightArrowLeftArrow;': '\u21c4',
1744 'rightarrowtail;': '\u21a3',
1745 'RightCeiling;': '\u2309',
1746 'RightDoubleBracket;': '\u27e7',
1747 'RightDownTeeVector;': '\u295d',
1748 'RightDownVector;': '\u21c2',
1749 'RightDownVectorBar;': '\u2955',
1750 'RightFloor;': '\u230b',
1751 'rightharpoondown;': '\u21c1',
1752 'rightharpoonup;': '\u21c0',
1753 'rightleftarrows;': '\u21c4',
1754 'rightleftharpoons;': '\u21cc',
1755 'rightrightarrows;': '\u21c9',
1756 'rightsquigarrow;': '\u219d',
1757 'RightTee;': '\u22a2',
1758 'RightTeeArrow;': '\u21a6',
1759 'RightTeeVector;': '\u295b',
1760 'rightthreetimes;': '\u22cc',
1761 'RightTriangle;': '\u22b3',
1762 'RightTriangleBar;': '\u29d0',
1763 'RightTriangleEqual;': '\u22b5',
1764 'RightUpDownVector;': '\u294f',
1765 'RightUpTeeVector;': '\u295c',
1766 'RightUpVector;': '\u21be',
1767 'RightUpVectorBar;': '\u2954',
1768 'RightVector;': '\u21c0',
1769 'RightVectorBar;': '\u2953',
1771 'risingdotseq;': '\u2253',
1775 'rmoust;': '\u23b1',
1776 'rmoustache;': '\u23b1',
1783 'ropf;': '\U0001d563',
1784 'roplus;': '\u2a2e',
1785 'rotimes;': '\u2a35',
1786 'RoundImplies;': '\u2970',
1788 'rpargt;': '\u2994',
1789 'rppolint;': '\u2a12',
1791 'Rrightarrow;': '\u21db',
1792 'rsaquo;': '\u203a',
1794 'rscr;': '\U0001d4c7',
1799 'rsquor;': '\u2019',
1800 'rthree;': '\u22cc',
1801 'rtimes;': '\u22ca',
1805 'rtriltri;': '\u29ce',
1806 'RuleDelayed;': '\u29f4',
1807 'ruluhar;': '\u2968',
1809 'Sacute;': '\u015a',
1810 'sacute;': '\u015b',
1815 'Scaron;': '\u0160',
1816 'scaron;': '\u0161',
1820 'Scedil;': '\u015e',
1821 'scedil;': '\u015f',
1826 'scnsim;': '\u22e9',
1827 'scpolint;': '\u2a13',
1834 'searhk;': '\u2925',
1837 'searrow;': '\u2198',
1841 'seswar;': '\u2929',
1842 'setminus;': '\u2216',
1845 'Sfr;': '\U0001d516',
1846 'sfr;': '\U0001d530',
1847 'sfrown;': '\u2322',
1849 'SHCHcy;': '\u0429',
1850 'shchcy;': '\u0449',
1853 'ShortDownArrow;': '\u2193',
1854 'ShortLeftArrow;': '\u2190',
1855 'shortmid;': '\u2223',
1856 'shortparallel;': '\u2225',
1857 'ShortRightArrow;': '\u2192',
1858 'ShortUpArrow;': '\u2191',
1863 'sigmaf;': '\u03c2',
1864 'sigmav;': '\u03c2',
1866 'simdot;': '\u2a6a',
1874 'simplus;': '\u2a24',
1875 'simrarr;': '\u2972',
1877 'SmallCircle;': '\u2218',
1878 'smallsetminus;': '\u2216',
1879 'smashp;': '\u2a33',
1880 'smeparsl;': '\u29e4',
1885 'smtes;': '\u2aac\ufe00',
1886 'SOFTcy;': '\u042c',
1887 'softcy;': '\u044c',
1890 'solbar;': '\u233f',
1891 'Sopf;': '\U0001d54a',
1892 'sopf;': '\U0001d564',
1893 'spades;': '\u2660',
1894 'spadesuit;': '\u2660',
1897 'sqcaps;': '\u2293\ufe00',
1899 'sqcups;': '\u2294\ufe00',
1902 'sqsube;': '\u2291',
1903 'sqsubset;': '\u228f',
1904 'sqsubseteq;': '\u2291',
1906 'sqsupe;': '\u2292',
1907 'sqsupset;': '\u2290',
1908 'sqsupseteq;': '\u2292',
1910 'Square;': '\u25a1',
1911 'square;': '\u25a1',
1912 'SquareIntersection;': '\u2293',
1913 'SquareSubset;': '\u228f',
1914 'SquareSubsetEqual;': '\u2291',
1915 'SquareSuperset;': '\u2290',
1916 'SquareSupersetEqual;': '\u2292',
1917 'SquareUnion;': '\u2294',
1918 'squarf;': '\u25aa',
1921 'Sscr;': '\U0001d4ae',
1922 'sscr;': '\U0001d4c8',
1923 'ssetmn;': '\u2216',
1924 'ssmile;': '\u2323',
1925 'sstarf;': '\u22c6',
1929 'straightepsilon;': '\u03f5',
1930 'straightphi;': '\u03d5',
1934 'subdot;': '\u2abd',
1937 'subedot;': '\u2ac3',
1938 'submult;': '\u2ac1',
1941 'subplus;': '\u2abf',
1942 'subrarr;': '\u2979',
1943 'Subset;': '\u22d0',
1944 'subset;': '\u2282',
1945 'subseteq;': '\u2286',
1946 'subseteqq;': '\u2ac5',
1947 'SubsetEqual;': '\u2286',
1948 'subsetneq;': '\u228a',
1949 'subsetneqq;': '\u2acb',
1950 'subsim;': '\u2ac7',
1951 'subsub;': '\u2ad5',
1952 'subsup;': '\u2ad3',
1954 'succapprox;': '\u2ab8',
1955 'succcurlyeq;': '\u227d',
1956 'Succeeds;': '\u227b',
1957 'SucceedsEqual;': '\u2ab0',
1958 'SucceedsSlantEqual;': '\u227d',
1959 'SucceedsTilde;': '\u227f',
1960 'succeq;': '\u2ab0',
1961 'succnapprox;': '\u2aba',
1962 'succneqq;': '\u2ab6',
1963 'succnsim;': '\u22e9',
1964 'succsim;': '\u227f',
1965 'SuchThat;': '\u220b',
1977 'supdot;': '\u2abe',
1978 'supdsub;': '\u2ad8',
1981 'supedot;': '\u2ac4',
1982 'Superset;': '\u2283',
1983 'SupersetEqual;': '\u2287',
1984 'suphsol;': '\u27c9',
1985 'suphsub;': '\u2ad7',
1986 'suplarr;': '\u297b',
1987 'supmult;': '\u2ac2',
1990 'supplus;': '\u2ac0',
1991 'Supset;': '\u22d1',
1992 'supset;': '\u2283',
1993 'supseteq;': '\u2287',
1994 'supseteqq;': '\u2ac6',
1995 'supsetneq;': '\u228b',
1996 'supsetneqq;': '\u2acc',
1997 'supsim;': '\u2ac8',
1998 'supsub;': '\u2ad4',
1999 'supsup;': '\u2ad6',
2000 'swarhk;': '\u2926',
2003 'swarrow;': '\u2199',
2004 'swnwar;': '\u292a',
2008 'target;': '\u2316',
2012 'Tcaron;': '\u0164',
2013 'tcaron;': '\u0165',
2014 'Tcedil;': '\u0162',
2015 'tcedil;': '\u0163',
2019 'telrec;': '\u2315',
2020 'Tfr;': '\U0001d517',
2021 'tfr;': '\U0001d531',
2022 'there4;': '\u2234',
2023 'Therefore;': '\u2234',
2024 'therefore;': '\u2234',
2027 'thetasym;': '\u03d1',
2028 'thetav;': '\u03d1',
2029 'thickapprox;': '\u2248',
2030 'thicksim;': '\u223c',
2031 'ThickSpace;': '\u205f\u200a',
2032 'thinsp;': '\u2009',
2033 'ThinSpace;': '\u2009',
2035 'thksim;': '\u223c',
2042 'TildeEqual;': '\u2243',
2043 'TildeFullEqual;': '\u2245',
2044 'TildeTilde;': '\u2248',
2047 'timesb;': '\u22a0',
2048 'timesbar;': '\u2a31',
2049 'timesd;': '\u2a30',
2053 'topbot;': '\u2336',
2054 'topcir;': '\u2af1',
2055 'Topf;': '\U0001d54b',
2056 'topf;': '\U0001d565',
2057 'topfork;': '\u2ada',
2059 'tprime;': '\u2034',
2062 'triangle;': '\u25b5',
2063 'triangledown;': '\u25bf',
2064 'triangleleft;': '\u25c3',
2065 'trianglelefteq;': '\u22b4',
2066 'triangleq;': '\u225c',
2067 'triangleright;': '\u25b9',
2068 'trianglerighteq;': '\u22b5',
2069 'tridot;': '\u25ec',
2071 'triminus;': '\u2a3a',
2072 'TripleDot;': '\u20db',
2073 'triplus;': '\u2a39',
2075 'tritime;': '\u2a3b',
2076 'trpezium;': '\u23e2',
2077 'Tscr;': '\U0001d4af',
2078 'tscr;': '\U0001d4c9',
2083 'Tstrok;': '\u0166',
2084 'tstrok;': '\u0167',
2086 'twoheadleftarrow;': '\u219e',
2087 'twoheadrightarrow;': '\u21a0',
2095 'Uarrocir;': '\u2949',
2098 'Ubreve;': '\u016c',
2099 'ubreve;': '\u016d',
2107 'Udblac;': '\u0170',
2108 'udblac;': '\u0171',
2110 'ufisht;': '\u297e',
2111 'Ufr;': '\U0001d518',
2112 'ufr;': '\U0001d532',
2121 'ulcorn;': '\u231c',
2122 'ulcorner;': '\u231c',
2123 'ulcrop;': '\u230f',
2130 'UnderBrace;': '\u23df',
2131 'UnderBracket;': '\u23b5',
2132 'UnderParenthesis;': '\u23dd',
2134 'UnionPlus;': '\u228e',
2137 'Uopf;': '\U0001d54c',
2138 'uopf;': '\U0001d566',
2139 'UpArrow;': '\u2191',
2140 'Uparrow;': '\u21d1',
2141 'uparrow;': '\u2191',
2142 'UpArrowBar;': '\u2912',
2143 'UpArrowDownArrow;': '\u21c5',
2144 'UpDownArrow;': '\u2195',
2145 'Updownarrow;': '\u21d5',
2146 'updownarrow;': '\u2195',
2147 'UpEquilibrium;': '\u296e',
2148 'upharpoonleft;': '\u21bf',
2149 'upharpoonright;': '\u21be',
2151 'UpperLeftArrow;': '\u2196',
2152 'UpperRightArrow;': '\u2197',
2156 'Upsilon;': '\u03a5',
2157 'upsilon;': '\u03c5',
2159 'UpTeeArrow;': '\u21a5',
2160 'upuparrows;': '\u21c8',
2161 'urcorn;': '\u231d',
2162 'urcorner;': '\u231d',
2163 'urcrop;': '\u230e',
2167 'Uscr;': '\U0001d4b0',
2168 'uscr;': '\U0001d4ca',
2170 'Utilde;': '\u0168',
2171 'utilde;': '\u0169',
2179 'uwangle;': '\u29a7',
2180 'vangrt;': '\u299c',
2181 'varepsilon;': '\u03f5',
2182 'varkappa;': '\u03f0',
2183 'varnothing;': '\u2205',
2184 'varphi;': '\u03d5',
2186 'varpropto;': '\u221d',
2189 'varrho;': '\u03f1',
2190 'varsigma;': '\u03c2',
2191 'varsubsetneq;': '\u228a\ufe00',
2192 'varsubsetneqq;': '\u2acb\ufe00',
2193 'varsupsetneq;': '\u228b\ufe00',
2194 'varsupsetneqq;': '\u2acc\ufe00',
2195 'vartheta;': '\u03d1',
2196 'vartriangleleft;': '\u22b2',
2197 'vartriangleright;': '\u22b3',
2207 'Vdashl;': '\u2ae6',
2210 'veebar;': '\u22bb',
2212 'vellip;': '\u22ee',
2213 'Verbar;': '\u2016',
2217 'VerticalBar;': '\u2223',
2218 'VerticalLine;': '|',
2219 'VerticalSeparator;': '\u2758',
2220 'VerticalTilde;': '\u2240',
2221 'VeryThinSpace;': '\u200a',
2222 'Vfr;': '\U0001d519',
2223 'vfr;': '\U0001d533',
2225 'vnsub;': '\u2282\u20d2',
2226 'vnsup;': '\u2283\u20d2',
2227 'Vopf;': '\U0001d54d',
2228 'vopf;': '\U0001d567',
2231 'Vscr;': '\U0001d4b1',
2232 'vscr;': '\U0001d4cb',
2233 'vsubnE;': '\u2acb\ufe00',
2234 'vsubne;': '\u228a\ufe00',
2235 'vsupnE;': '\u2acc\ufe00',
2236 'vsupne;': '\u228b\ufe00',
2237 'Vvdash;': '\u22aa',
2238 'vzigzag;': '\u299a',
2241 'wedbar;': '\u2a5f',
2244 'wedgeq;': '\u2259',
2245 'weierp;': '\u2118',
2246 'Wfr;': '\U0001d51a',
2247 'wfr;': '\U0001d534',
2248 'Wopf;': '\U0001d54e',
2249 'wopf;': '\U0001d568',
2252 'wreath;': '\u2240',
2253 'Wscr;': '\U0001d4b2',
2254 'wscr;': '\U0001d4cc',
2259 'Xfr;': '\U0001d51b',
2260 'xfr;': '\U0001d535',
2270 'Xopf;': '\U0001d54f',
2271 'xopf;': '\U0001d569',
2272 'xoplus;': '\u2a01',
2273 'xotime;': '\u2a02',
2276 'Xscr;': '\U0001d4b3',
2277 'xscr;': '\U0001d4cd',
2278 'xsqcup;': '\u2a06',
2279 'xuplus;': '\u2a04',
2282 'xwedge;': '\u22c0',
2295 'Yfr;': '\U0001d51c',
2296 'yfr;': '\U0001d536',
2299 'Yopf;': '\U0001d550',
2300 'yopf;': '\U0001d56a',
2301 'Yscr;': '\U0001d4b4',
2302 'yscr;': '\U0001d4ce',
2308 'Zacute;': '\u0179',
2309 'zacute;': '\u017a',
2310 'Zcaron;': '\u017d',
2311 'zcaron;': '\u017e',
2316 'zeetrf;': '\u2128',
2317 'ZeroWidthSpace;': '\u200b',
2321 'zfr;': '\U0001d537',
2324 'zigrarr;': '\u21dd',
2326 'zopf;': '\U0001d56b',
2327 'Zscr;': '\U0001d4b5',
2328 'zscr;': '\U0001d4cf',
2334 import http
.client
as compat_http_client
2335 except ImportError: # Python 2
2336 import httplib
as compat_http_client
2339 from urllib
.error
import HTTPError
as compat_HTTPError
2340 except ImportError: # Python 2
2341 from urllib2
import HTTPError
as compat_HTTPError
2344 from urllib
.request
import urlretrieve
as compat_urlretrieve
2345 except ImportError: # Python 2
2346 from urllib
import urlretrieve
as compat_urlretrieve
2349 from html
.parser
import HTMLParser
as compat_HTMLParser
2350 except ImportError: # Python 2
2351 from HTMLParser
import HTMLParser
as compat_HTMLParser
2354 from HTMLParser
import HTMLParseError
as compat_HTMLParseError
2355 except ImportError: # Python <3.4
2357 from html
.parser
import HTMLParseError
as compat_HTMLParseError
2358 except ImportError: # Python >3.4
2360 # HTMLParseError has been deprecated in Python 3.3 and removed in
2361 # Python 3.5. Introducing dummy exception for Python >3.5 for compatible
2362 # and uniform cross-version exception handling
2363 class compat_HTMLParseError(Exception):
2367 from subprocess
import DEVNULL
2368 compat_subprocess_get_DEVNULL
= lambda: DEVNULL
2370 compat_subprocess_get_DEVNULL
= lambda: open(os
.path
.devnull
, 'w')
2373 import http
.server
as compat_http_server
2375 import BaseHTTPServer
as compat_http_server
2378 compat_str
= unicode # Python 2
2383 from urllib
.parse
import quote
as compat_urllib_parse_quote
2384 from urllib
.parse
import quote_plus
as compat_urllib_parse_quote_plus
2385 except ImportError: # Python 2
2386 def compat_urllib_parse_quote(string
, safe
='/'):
2387 return compat_urllib_parse
.quote(
2388 string
.encode('utf-8'),
2391 def compat_urllib_parse_quote_plus(string
, safe
=''):
2392 return compat_urllib_parse
.quote_plus(
2393 string
.encode('utf-8'),
2397 from urllib
.parse
import unquote_to_bytes
as compat_urllib_parse_unquote_to_bytes
2398 from urllib
.parse
import unquote
as compat_urllib_parse_unquote
2399 from urllib
.parse
import unquote_plus
as compat_urllib_parse_unquote_plus
2400 except ImportError: # Python 2
2401 _asciire
= (compat_urllib_parse
._asciire
if hasattr(compat_urllib_parse
, '_asciire')
2402 else re
.compile(r
'([\x00-\x7f]+)'))
2404 # HACK: The following are the correct unquote_to_bytes, unquote and unquote_plus
2405 # implementations from cpython 3.4.3's stdlib. Python 2's version
2406 # is apparently broken (see https://github.com/ytdl-org/youtube-dl/pull/6244)
2408 def compat_urllib_parse_unquote_to_bytes(string
):
2409 """unquote_to_bytes('abc%20def') -> b'abc def'."""
2410 # Note: strings are encoded as UTF-8. This is only an issue if it contains
2411 # unescaped non-ASCII characters, which URIs should not.
2413 # Is it a string-like object?
2416 if isinstance(string
, compat_str
):
2417 string
= string
.encode('utf-8')
2418 bits
= string
.split(b
'%')
2423 for item
in bits
[1:]:
2425 append(compat_urllib_parse
._hextochr
[item
[:2]])
2430 return b
''.join(res
)
2432 def compat_urllib_parse_unquote(string
, encoding
='utf-8', errors
='replace'):
2433 """Replace %xx escapes by their single-character equivalent. The optional
2434 encoding and errors parameters specify how to decode percent-encoded
2435 sequences into Unicode characters, as accepted by the bytes.decode()
2437 By default, percent-encoded sequences are decoded with UTF-8, and invalid
2438 sequences are replaced by a placeholder character.
2440 unquote('abc%20def') -> 'abc def'.
2442 if '%' not in string
:
2445 if encoding
is None:
2449 bits
= _asciire
.split(string
)
2452 for i
in range(1, len(bits
), 2):
2453 append(compat_urllib_parse_unquote_to_bytes(bits
[i
]).decode(encoding
, errors
))
2457 def compat_urllib_parse_unquote_plus(string
, encoding
='utf-8', errors
='replace'):
2458 """Like unquote(), but also replace plus signs by spaces, as required for
2459 unquoting HTML form values.
2461 unquote_plus('%7e/abc+def') -> '~/abc def'
2463 string
= string
.replace('+', ' ')
2464 return compat_urllib_parse_unquote(string
, encoding
, errors
)
2467 from urllib
.parse
import urlencode
as compat_urllib_parse_urlencode
2468 except ImportError: # Python 2
2469 # Python 2 will choke in urlencode on mixture of byte and unicode strings.
2470 # Possible solutions are to either port it from python 3 with all
2471 # the friends or manually ensure input query contains only byte strings.
2472 # We will stick with latter thus recursively encoding the whole query.
2473 def compat_urllib_parse_urlencode(query
, doseq
=0, encoding
='utf-8'):
2475 if isinstance(e
, dict):
2477 elif isinstance(e
, (list, tuple,)):
2478 list_e
= encode_list(e
)
2479 e
= tuple(list_e
) if isinstance(e
, tuple) else list_e
2480 elif isinstance(e
, compat_str
):
2481 e
= e
.encode(encoding
)
2485 return dict((encode_elem(k
), encode_elem(v
)) for k
, v
in d
.items())
2488 return [encode_elem(e
) for e
in l
]
2490 return compat_urllib_parse
.urlencode(encode_elem(query
), doseq
=doseq
)
2493 from urllib
.request
import DataHandler
as compat_urllib_request_DataHandler
2494 except ImportError: # Python < 3.4
2495 # Ported from CPython 98774:1733b3bd46db, Lib/urllib/request.py
2496 class compat_urllib_request_DataHandler(compat_urllib_request
.BaseHandler
):
2497 def data_open(self
, req
):
2498 # data URLs as specified in RFC 2397.
2500 # ignores POSTed data
2503 # dataurl := "data:" [ mediatype ] [ ";base64" ] "," data
2504 # mediatype := [ type "/" subtype ] *( ";" parameter )
2506 # parameter := attribute "=" value
2507 url
= req
.get_full_url()
2509 scheme
, data
= url
.split(':', 1)
2510 mediatype
, data
= data
.split(',', 1)
2512 # even base64 encoded data URLs might be quoted so unquote in any case:
2513 data
= compat_urllib_parse_unquote_to_bytes(data
)
2514 if mediatype
.endswith(';base64'):
2515 data
= binascii
.a2b_base64(data
)
2516 mediatype
= mediatype
[:-7]
2519 mediatype
= 'text/plain;charset=US-ASCII'
2521 headers
= email
.message_from_string(
2522 'Content-type: %s\nContent-length: %d\n' % (mediatype
, len(data
)))
2524 return compat_urllib_response
.addinfourl(io
.BytesIO(data
), headers
, url
)
2527 compat_basestring
= basestring
# Python 2
2529 compat_basestring
= str
2532 compat_chr
= unichr # Python 2
2537 from xml
.etree
.ElementTree
import ParseError
as compat_xml_parse_error
2538 except ImportError: # Python 2.6
2539 from xml
.parsers
.expat
import ExpatError
as compat_xml_parse_error
2542 etree
= xml
.etree
.ElementTree
2545 class _TreeBuilder(etree
.TreeBuilder
):
2546 def doctype(self
, name
, pubid
, system
):
2551 # xml.etree.ElementTree.Element is a method in Python <=2.6 and
2552 # the following will crash with:
2553 # TypeError: isinstance() arg 2 must be a class, type, or tuple of classes and types
2554 isinstance(None, xml
.etree
.ElementTree
.Element
)
2555 from xml
.etree
.ElementTree
import Element
as compat_etree_Element
2556 except TypeError: # Python <=2.6
2557 from xml
.etree
.ElementTree
import _ElementInterface
as compat_etree_Element
2559 if sys
.version_info
[0] >= 3:
2560 def compat_etree_fromstring(text
):
2561 return etree
.XML(text
, parser
=etree
.XMLParser(target
=_TreeBuilder()))
2563 # python 2.x tries to encode unicode strings with ascii (see the
2564 # XMLParser._fixtext method)
2566 _etree_iter
= etree
.Element
.iter
2567 except AttributeError: # Python <=2.6
2568 def _etree_iter(root
):
2569 for el
in root
.findall('*'):
2571 for sub
in _etree_iter(el
):
2574 # on 2.6 XML doesn't have a parser argument, function copied from CPython
2576 def _XML(text
, parser
=None):
2578 parser
= etree
.XMLParser(target
=_TreeBuilder())
2580 return parser
.close()
2582 def _element_factory(*args
, **kwargs
):
2583 el
= etree
.Element(*args
, **kwargs
)
2584 for k
, v
in el
.items():
2585 if isinstance(v
, bytes):
2586 el
.set(k
, v
.decode('utf-8'))
2589 def compat_etree_fromstring(text
):
2590 doc
= _XML(text
, parser
=etree
.XMLParser(target
=_TreeBuilder(element_factory
=_element_factory
)))
2591 for el
in _etree_iter(doc
):
2592 if el
.text
is not None and isinstance(el
.text
, bytes):
2593 el
.text
= el
.text
.decode('utf-8')
2596 if hasattr(etree
, 'register_namespace'):
2597 compat_etree_register_namespace
= etree
.register_namespace
2599 def compat_etree_register_namespace(prefix
, uri
):
2600 """Register a namespace prefix.
2601 The registry is global, and any existing mapping for either the
2602 given prefix or the namespace URI will be removed.
2603 *prefix* is the namespace prefix, *uri* is a namespace uri. Tags and
2604 attributes in this namespace will be serialized with prefix if possible.
2605 ValueError is raised if prefix is reserved or is invalid.
2607 if re
.match(r
"ns\d+$", prefix
):
2608 raise ValueError("Prefix format reserved for internal use")
2609 for k
, v
in list(etree
._namespace
_map
.items()):
2610 if k
== uri
or v
== prefix
:
2611 del etree
._namespace
_map
[k
]
2612 etree
._namespace
_map
[uri
] = prefix
2614 if sys
.version_info
< (2, 7):
2615 # Here comes the crazy part: In 2.6, if the xpath is a unicode,
2616 # .//node does not match if a node is a direct child of . !
2617 def compat_xpath(xpath
):
2618 if isinstance(xpath
, compat_str
):
2619 xpath
= xpath
.encode('ascii')
2622 compat_xpath
= lambda xpath
: xpath
2625 from urllib
.parse
import parse_qs
as compat_parse_qs
2626 except ImportError: # Python 2
2627 # HACK: The following is the correct parse_qs implementation from cpython 3's stdlib.
2628 # Python 2's version is apparently totally broken
2630 def _parse_qsl(qs
, keep_blank_values
=False, strict_parsing
=False,
2631 encoding
='utf-8', errors
='replace'):
2632 qs
, _coerce_result
= qs
, compat_str
2633 pairs
= [s2
for s1
in qs
.split('&') for s2
in s1
.split(';')]
2635 for name_value
in pairs
:
2636 if not name_value
and not strict_parsing
:
2638 nv
= name_value
.split('=', 1)
2641 raise ValueError('bad query field: %r' % (name_value
,))
2642 # Handle case of a control-name with no equal sign
2643 if keep_blank_values
:
2647 if len(nv
[1]) or keep_blank_values
:
2648 name
= nv
[0].replace('+', ' ')
2649 name
= compat_urllib_parse_unquote(
2650 name
, encoding
=encoding
, errors
=errors
)
2651 name
= _coerce_result(name
)
2652 value
= nv
[1].replace('+', ' ')
2653 value
= compat_urllib_parse_unquote(
2654 value
, encoding
=encoding
, errors
=errors
)
2655 value
= _coerce_result(value
)
2656 r
.append((name
, value
))
2659 def compat_parse_qs(qs
, keep_blank_values
=False, strict_parsing
=False,
2660 encoding
='utf-8', errors
='replace'):
2662 pairs
= _parse_qsl(qs
, keep_blank_values
, strict_parsing
,
2663 encoding
=encoding
, errors
=errors
)
2664 for name
, value
in pairs
:
2665 if name
in parsed_result
:
2666 parsed_result
[name
].append(value
)
2668 parsed_result
[name
] = [value
]
2669 return parsed_result
2672 compat_os_name
= os
._name
if os
.name
== 'java' else os
.name
2675 if compat_os_name
== 'nt':
2676 def compat_shlex_quote(s
):
2677 return s
if re
.match(r
'^[-_\w./]+$', s
) else '"%s"' % s
.replace('"', '\\"')
2680 from shlex
import quote
as compat_shlex_quote
2681 except ImportError: # Python < 3.3
2682 def compat_shlex_quote(s
):
2683 if re
.match(r
'^[-_\w./]+$', s
):
2686 return "'" + s
.replace("'", "'\"'\"'") + "'"
2690 args
= shlex
.split('ä¸æ–‡')
2691 assert (isinstance(args
, list)
2692 and isinstance(args
[0], compat_str
)
2693 and args
[0] == 'ä¸æ–‡')
2694 compat_shlex_split
= shlex
.split
2695 except (AssertionError, UnicodeEncodeError):
2696 # Working around shlex issue with unicode strings on some python 2
2697 # versions (see http://bugs.python.org/issue1548891)
2698 def compat_shlex_split(s
, comments
=False, posix
=True):
2699 if isinstance(s
, compat_str
):
2700 s
= s
.encode('utf-8')
2701 return list(map(lambda s
: s
.decode('utf-8'), shlex
.split(s
, comments
, posix
)))
2711 if sys
.version_info
>= (3, 0):
2712 compat_getenv
= os
.getenv
2713 compat_expanduser
= os
.path
.expanduser
2715 def compat_setenv(key
, value
, env
=os
.environ
):
2718 # Environment variables should be decoded with filesystem encoding.
2719 # Otherwise it will fail if any non-ASCII characters present (see #3854 #3217 #2918)
2721 def compat_getenv(key
, default
=None):
2722 from .utils
import get_filesystem_encoding
2723 env
= os
.getenv(key
, default
)
2725 env
= env
.decode(get_filesystem_encoding())
2728 def compat_setenv(key
, value
, env
=os
.environ
):
2730 from .utils
import get_filesystem_encoding
2731 return v
.encode(get_filesystem_encoding()) if isinstance(v
, compat_str
) else v
2732 env
[encode(key
)] = encode(value
)
2734 # HACK: The default implementations of os.path.expanduser from cpython do not decode
2735 # environment variables with filesystem encoding. We will work around this by
2736 # providing adjusted implementations.
2737 # The following are os.path.expanduser implementations from cpython 2.7.8 stdlib
2738 # for different platforms with correct environment variables decoding.
2740 if compat_os_name
== 'posix':
2741 def compat_expanduser(path
):
2742 """Expand ~ and ~user constructions. If user or $HOME is unknown,
2744 if not path
.startswith('~'):
2746 i
= path
.find('/', 1)
2750 if 'HOME' not in os
.environ
:
2752 userhome
= pwd
.getpwuid(os
.getuid()).pw_dir
2754 userhome
= compat_getenv('HOME')
2758 pwent
= pwd
.getpwnam(path
[1:i
])
2761 userhome
= pwent
.pw_dir
2762 userhome
= userhome
.rstrip('/')
2763 return (userhome
+ path
[i
:]) or '/'
2764 elif compat_os_name
in ('nt', 'ce'):
2765 def compat_expanduser(path
):
2766 """Expand ~ and ~user constructs.
2768 If user or $HOME is unknown, do nothing."""
2772 while i
< n
and path
[i
] not in '/\\':
2775 if 'HOME' in os
.environ
:
2776 userhome
= compat_getenv('HOME')
2777 elif 'USERPROFILE' in os
.environ
:
2778 userhome
= compat_getenv('USERPROFILE')
2779 elif 'HOMEPATH' not in os
.environ
:
2783 drive
= compat_getenv('HOMEDRIVE')
2786 userhome
= os
.path
.join(drive
, compat_getenv('HOMEPATH'))
2789 userhome
= os
.path
.join(os
.path
.dirname(userhome
), path
[1:i
])
2791 return userhome
+ path
[i
:]
2793 compat_expanduser
= os
.path
.expanduser
2796 if compat_os_name
== 'nt' and sys
.version_info
< (3, 8):
2797 # os.path.realpath on Windows does not follow symbolic links
2798 # prior to Python 3.8 (see https://bugs.python.org/issue9949)
2799 def compat_realpath(path
):
2800 while os
.path
.islink(path
):
2801 path
= os
.path
.abspath(os
.readlink(path
))
2804 compat_realpath
= os
.path
.realpath
2807 if sys
.version_info
< (3, 0):
2808 def compat_print(s
):
2809 from .utils
import preferredencoding
2810 print(s
.encode(preferredencoding(), 'xmlcharrefreplace'))
2812 def compat_print(s
):
2813 assert isinstance(s
, compat_str
)
2817 if sys
.version_info
< (3, 0) and sys
.platform
== 'win32':
2818 def compat_getpass(prompt
, *args
, **kwargs
):
2819 if isinstance(prompt
, compat_str
):
2820 from .utils
import preferredencoding
2821 prompt
= prompt
.encode(preferredencoding())
2822 return getpass
.getpass(prompt
, *args
, **kwargs
)
2824 compat_getpass
= getpass
.getpass
2827 compat_input
= raw_input
2828 except NameError: # Python 3
2829 compat_input
= input
2831 # Python < 2.6.5 require kwargs to be bytes
2835 _testfunc(**{'x': 0}
)
2837 def compat_kwargs(kwargs
):
2838 return dict((bytes(k
), v
) for k
, v
in kwargs
.items())
2840 compat_kwargs
= lambda kwargs
: kwargs
2844 compat_numeric_types
= (int, float, long, complex)
2845 except NameError: # Python 3
2846 compat_numeric_types
= (int, float, complex)
2850 compat_integer_types
= (int, long)
2851 except NameError: # Python 3
2852 compat_integer_types
= (int, )
2855 if sys
.version_info
< (2, 7):
2856 def compat_socket_create_connection(address
, timeout
, source_address
=None):
2857 host
, port
= address
2859 for res
in socket
.getaddrinfo(host
, port
, 0, socket
.SOCK_STREAM
):
2860 af
, socktype
, proto
, canonname
, sa
= res
2863 sock
= socket
.socket(af
, socktype
, proto
)
2864 sock
.settimeout(timeout
)
2866 sock
.bind(source_address
)
2869 except socket
.error
as _
:
2871 if sock
is not None:
2876 raise socket
.error('getaddrinfo returns an empty list')
2878 compat_socket_create_connection
= socket
.create_connection
2881 # Fix https://github.com/ytdl-org/youtube-dl/issues/4223
2882 # See http://bugs.python.org/issue9161 for what is broken
2883 def workaround_optparse_bug9161():
2884 op
= optparse
.OptionParser()
2885 og
= optparse
.OptionGroup(op
, 'foo')
2889 real_add_option
= optparse
.OptionGroup
.add_option
2891 def _compat_add_option(self
, *args
, **kwargs
):
2893 v
.encode('ascii', 'replace') if isinstance(v
, compat_str
)
2895 bargs
= [enc(a
) for a
in args
]
2897 (k
, enc(v
)) for k
, v
in kwargs
.items())
2898 return real_add_option(self
, *bargs
, **bkwargs
)
2899 optparse
.OptionGroup
.add_option
= _compat_add_option
2902 if hasattr(shutil
, 'get_terminal_size'): # Python >= 3.3
2903 compat_get_terminal_size
= shutil
.get_terminal_size
2905 _terminal_size
= collections
.namedtuple('terminal_size', ['columns', 'lines'])
2907 def compat_get_terminal_size(fallback
=(80, 24)):
2908 from .utils
import process_communicate_or_kill
2909 columns
= compat_getenv('COLUMNS')
2911 columns
= int(columns
)
2914 lines
= compat_getenv('LINES')
2920 if columns
is None or lines
is None or columns
<= 0 or lines
<= 0:
2922 sp
= subprocess
.Popen(
2924 stdout
=subprocess
.PIPE
, stderr
=subprocess
.PIPE
)
2925 out
, err
= process_communicate_or_kill(sp
)
2926 _lines
, _columns
= map(int, out
.split())
2928 _columns
, _lines
= _terminal_size(*fallback
)
2930 if columns
is None or columns
<= 0:
2932 if lines
is None or lines
<= 0:
2934 return _terminal_size(columns
, lines
)
2937 itertools
.count(start
=0, step
=1)
2938 compat_itertools_count
= itertools
.count
2939 except TypeError: # Python 2.6
2940 def compat_itertools_count(start
=0, step
=1):
2946 if sys
.version_info
>= (3, 0):
2947 from tokenize
import tokenize
as compat_tokenize_tokenize
2949 from tokenize
import generate_tokens
as compat_tokenize_tokenize
2953 struct
.pack('!I', 0)
2955 # In Python 2.6 and 2.7.x < 2.7.7, struct requires a bytes argument
2956 # See https://bugs.python.org/issue19099
2957 def compat_struct_pack(spec
, *args
):
2958 if isinstance(spec
, compat_str
):
2959 spec
= spec
.encode('ascii')
2960 return struct
.pack(spec
, *args
)
2962 def compat_struct_unpack(spec
, *args
):
2963 if isinstance(spec
, compat_str
):
2964 spec
= spec
.encode('ascii')
2965 return struct
.unpack(spec
, *args
)
2967 class compat_Struct(struct
.Struct
):
2968 def __init__(self
, fmt
):
2969 if isinstance(fmt
, compat_str
):
2970 fmt
= fmt
.encode('ascii')
2971 super(compat_Struct
, self
).__init
__(fmt
)
2973 compat_struct_pack
= struct
.pack
2974 compat_struct_unpack
= struct
.unpack
2975 if platform
.python_implementation() == 'IronPython' and sys
.version_info
< (2, 7, 8):
2976 class compat_Struct(struct
.Struct
):
2977 def unpack(self
, string
):
2978 if not isinstance(string
, buffer): # noqa: F821
2979 string
= buffer(string
) # noqa: F821
2980 return super(compat_Struct
, self
).unpack(string
)
2982 compat_Struct
= struct
.Struct
2986 from future_builtins
import zip as compat_zip
2987 except ImportError: # not 2.6+ or is 3.x
2989 from itertools
import izip
as compat_zip
# < 2.5 or 3.x
2994 if sys
.version_info
< (3, 3):
2995 def compat_b64decode(s
, *args
, **kwargs
):
2996 if isinstance(s
, compat_str
):
2997 s
= s
.encode('ascii')
2998 return base64
.b64decode(s
, *args
, **kwargs
)
3000 compat_b64decode
= base64
.b64decode
3003 if platform
.python_implementation() == 'PyPy' and sys
.pypy_version_info
< (5, 4, 0):
3004 # PyPy2 prior to version 5.4.0 expects byte strings as Windows function
3005 # names, see the original PyPy issue [1] and the yt-dlp one [2].
3006 # 1. https://bitbucket.org/pypy/pypy/issues/2360/windows-ctypescdll-typeerror-function-name
3007 # 2. https://github.com/ytdl-org/youtube-dl/pull/4392
3008 def compat_ctypes_WINFUNCTYPE(*args
, **kwargs
):
3009 real
= ctypes
.WINFUNCTYPE(*args
, **kwargs
)
3011 def resf(tpl
, *args
, **kwargs
):
3013 return real((str(funcname
), dll
), *args
, **kwargs
)
3017 def compat_ctypes_WINFUNCTYPE(*args
, **kwargs
):
3018 return ctypes
.WINFUNCTYPE(*args
, **kwargs
)
3022 compat_Pattern
= re
.Pattern
3023 except AttributeError:
3024 compat_Pattern
= type(re
.compile(''))
3028 compat_Match
= re
.Match
3029 except AttributeError:
3030 compat_Match
= type(re
.compile('').match(''))
3034 'compat_HTMLParseError',
3035 'compat_HTMLParser',
3041 'compat_basestring',
3044 'compat_cookiejar_Cookie',
3046 'compat_cookies_SimpleCookie',
3047 'compat_ctypes_WINFUNCTYPE',
3048 'compat_etree_Element',
3049 'compat_etree_fromstring',
3050 'compat_etree_register_namespace',
3051 'compat_expanduser',
3052 'compat_get_terminal_size',
3055 'compat_html_entities',
3056 'compat_html_entities_html5',
3057 'compat_http_client',
3058 'compat_http_server',
3060 'compat_integer_types',
3061 'compat_itertools_count',
3063 'compat_numeric_types',
3070 'compat_shlex_quote',
3071 'compat_shlex_split',
3072 'compat_socket_create_connection',
3074 'compat_struct_pack',
3075 'compat_struct_unpack',
3076 'compat_subprocess_get_DEVNULL',
3077 'compat_tokenize_tokenize',
3078 'compat_urllib_error',
3079 'compat_urllib_parse',
3080 'compat_urllib_parse_quote',
3081 'compat_urllib_parse_quote_plus',
3082 'compat_urllib_parse_unquote',
3083 'compat_urllib_parse_unquote_plus',
3084 'compat_urllib_parse_unquote_to_bytes',
3085 'compat_urllib_parse_urlencode',
3086 'compat_urllib_parse_urlparse',
3087 'compat_urllib_parse_urlunparse',
3088 'compat_urllib_request',
3089 'compat_urllib_request_DataHandler',
3090 'compat_urllib_response',
3092 'compat_urlretrieve',
3093 'compat_xml_parse_error',
3096 'workaround_optparse_bug9161',