�ɲɾ�����ӯ�����һ��ˣ��������С���˴��ͣ�������P���ҹ��ñ˽��ά�Բ��������˸߸ԣ�������ơ��ҹ��ñ�����ά�Բ���ˡ���˳^�ӣ������ӡ� ���ͯj�ӣ��ƺ���ӣ� ? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n! Jp[c@sddlmZddlZddlZddlmZmZmZmZddddgZ dZ d Z d Z d Z d Zd ZdefdYZeZdefdYZdefdYZdefdYZdZdefdYZddlmZeeyddlmZeeWnek rKnXyddlmZeeWnek r}nXdS(i(t defaultdictN(tCharsetMetaAttributeValuetContentMetaAttributeValuetHTMLAwareEntitySubstitutiont whitespace_retHTMLTreeBuildertSAXTreeBuildert TreeBuildertTreeBuilderRegistrytfastt permissivetstricttxmlthtmlthtml5cBs#eZdZdZdZRS(cCstt|_g|_dS(N(Rtlisttbuilders_for_featuretbuilders(tself((s8/usr/lib/python2.7/site-packages/bs4/builder/__init__.pyt__init__ scCsBx(|jD]}|j|jd|q W|jjd|dS(s8Register a treebuilder based on its advertised features.iN(tfeaturesRtinsertR(Rttreebuilder_classtfeature((s8/usr/lib/python2.7/site-packages/bs4/builder/__init__.pytregister$scGst|jdkrdSt|dkr6|jdSt|}|jd}d}xt|dkr|j}|jj|g}t|dkr[|dkr|}t|}q|j t|}q[q[W|dkrdSx|D]}||kr|SqWdS(Ni( tlenRtNoneRtreversetpopRtgettsett intersection(RRt candidatest candidate_setRtwe_have_the_featuret candidate((s8/usr/lib/python2.7/site-packages/bs4/builder/__init__.pytlookup*s.        (t__name__t __module__RRR$(((s8/usr/lib/python2.7/site-packages/bs4/builder/__init__.pyRs  cBseZdZdZgZgZeZeZe Z d Z iZ dZdZdZdZd d dZdZdZd ZRS( s2Turn a document into a Beautiful Soup object tree.s[Unknown tree builder]cCs d|_dS(N(Rtsoup(R((s8/usr/lib/python2.7/site-packages/bs4/builder/__init__.pyRfscCsdS(N((R((s8/usr/lib/python2.7/site-packages/bs4/builder/__init__.pytresetiscCs |jdkrtS||jkS(sMight a tag with this name be an empty-element tag? The final markup may or may not actually present this tag as self-closing. For instance: an HTMLBuilder does not consider a

tag to be an empty-element tag (it's not in HTMLBuilder.empty_element_tags). This means an empty

tag will be presented as "

", not "

". The default implementation has no opinion about which tags are empty-element tags, so a tag will be presented as an empty-element tag if and only if it has no contents. "" will become "", and "bar" will be left alone. N(tempty_element_tagsRtTrue(Rttag_name((s8/usr/lib/python2.7/site-packages/bs4/builder/__init__.pytcan_be_empty_elementlscCs tdS(N(tNotImplementedError(Rtmarkup((s8/usr/lib/python2.7/site-packages/bs4/builder/__init__.pytfeedscCs|ddtfS(N(RtFalse(RR.tuser_specified_encodingtdocument_declared_encoding((s8/usr/lib/python2.7/site-packages/bs4/builder/__init__.pytprepare_markupscCs|S(sWrap an HTML fragment to make it look like a document. Different parsers do this differently. For instance, lxml introduces an empty tag, and html5lib doesn't. Abstracting this away lets us write simple tests which run HTML fragments through the parser and compare the results against other HTML fragments. This method should not be used outside of tests. ((Rtfragment((s8/usr/lib/python2.7/site-packages/bs4/builder/__init__.pyttest_fragment_to_documents cCstS(N(R0(Rttag((s8/usr/lib/python2.7/site-packages/bs4/builder/__init__.pytset_up_substitutionsscCs|s |S|jr|jjdg}|jj|jd}xs|jD]b}||kst|rP||krP||}t|trtj|}n|}|||s(tdictRtitemsR'thandle_starttag(RtnameR?((s8/usr/lib/python2.7/site-packages/bs4/builder/__init__.pyt startElements"cCs|jj|dS(N(R't handle_endtag(RRR((s8/usr/lib/python2.7/site-packages/bs4/builder/__init__.pyt endElementscCs|j||dS(N(RS(RtnsTupletnodeNameR?((s8/usr/lib/python2.7/site-packages/bs4/builder/__init__.pytstartElementNSscCs|j|dS(N(RU(RRVRW((s8/usr/lib/python2.7/site-packages/bs4/builder/__init__.pyt endElementNSscCsdS(N((Rtprefixt nodeValue((s8/usr/lib/python2.7/site-packages/bs4/builder/__init__.pytstartPrefixMappingscCsdS(N((RRZ((s8/usr/lib/python2.7/site-packages/bs4/builder/__init__.pytendPrefixMappingscCs|jj|dS(N(R't handle_data(Rtcontent((s8/usr/lib/python2.7/site-packages/bs4/builder/__init__.pyt charactersscCsdS(N((R((s8/usr/lib/python2.7/site-packages/bs4/builder/__init__.pyt startDocumentscCsdS(N((R((s8/usr/lib/python2.7/site-packages/bs4/builder/__init__.pyt endDocuments(R%R&RFR/RLRSRURXRYR\R]R`RaRb(((s8/usr/lib/python2.7/site-packages/bs4/builder/__init__.pyRs          c$BsseZdZejZeddddddddd d d d d dddddddddddgZedddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-dd.d/d0d1d2d3d4d5d6d7d8d9d:g#Zi d;d<d=gd>6d?d@gdA6d?d@gd 6dBgdC6dBgdD6dBgdC6dEgd&6dFgdG6d?gd6dHgdI6dJgdK6dLgd36ZdMZ RS(Ns]This TreeBuilder knows facts about HTML. Such as which tags are empty-element tags. tareatbasetbrtcoltembedthrtimgtinputtkeygentlinktmenuitemtmetatparamtsourcettracktwbrtbasefonttbgsoundtcommandtframetimagetisindextnextidtspacertaddresstarticletasidet blockquotetcanvastddtdivtdltdttfieldsett figcaptiontfiguretfootertformth1th2th3th4th5th6theadertlitmaintnavtnoscripttoltoutputtptpretsectionttablettfoottultvideotclasst accesskeytdropzoneR8treltrevtatheadersttdtthsaccept-charsettarchivetobjecttsizesticontsandboxtiframetforcCs|jdkrtS|jd}|jd}|jd}d}|dk rk|}t||ds@  " 4 b.N