Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325
ó ‹ÜÔPc@sWddlZddlmZddlmZddlZddgZyddlmZ Wn!e k r{ddl mZ nXy e Z Wnek rŸeZ nXyeWnek rÁeZnXd„Zed„Zd „Zd „Zd „Zd „Zd „Zd„Zd„Zd„Zed„Zd„Zddkd„ƒYZddld„ƒYZde fd„ƒYZ!d„Z"d„Z#d„Z$d„Z%d„Z&d„Z'de fd „ƒYZ(d!e(fd"„ƒYZ)d#e(fd$„ƒYZ*e+d%„Z,e+d&„Z-ej.d'ej/ej0BƒZ1ej.d(ej/ej0BƒZ2ej.d)ej/ej0BƒZ3d*„Z4ej.d+ƒZ5d,„Z6dmZ7dnZ8doZ9edY„Z:dZ„Z;ej.d[ƒZ<d\„Z=d]„Z>d^„Z?d_„Z@d`„ZAda„ZBedb„ZCdc„ZDdd„ZEde„ZFdf„ZGdgejHfdh„ƒYZIeJdikrSddjlmKZKeKjLƒndS(piÿÿÿÿN(tetree(tfragment_fromstringt html_annotatethtmldiff(tescapecCsdtt|ƒdƒ|fS(Ns%si(t html_escapet_unicode(ttexttversion((s4/usr/lib64/python2.7/site-packages/lxml/html/diff.pytdefault_markupscCsˆg|D]\}}t||ƒ^q}|d}x%|dD]}t||ƒ|}q=Wt|ƒ}t||ƒ}dj|ƒjƒS(s doclist should be ordered from oldest to newest, like:: >>> version1 = 'Hello World' >>> version2 = 'Goodbye World' >>> print(html_annotate([(version1, 'version 1'), ... (version2, 'version 2')])) Goodbye World The documents must be *fragments* (str/UTF8 or unicode), not complete documents The markup argument is a function to markup the spans of words. This function is called like markup('Hello', 'version 2'), and returns HTML. The first argument is text and never includes any markup. The default uses a span with a title: >>> print(default_markup('Some Text', 'by Joe')) Some Text iit(ttokenize_annotatedthtml_annotate_merge_annotationstcompress_tokenstmarkup_serialize_tokenstjointstrip(tdoclisttmarkuptdocRt tokenlistt cur_tokensttokenstresult((s4/usr/lib64/python2.7/site-packages/lxml/html/diff.pyRs%    cCs0t|dtƒ}x|D]}||_qW|S(sFTokenize a document and add an annotation attribute to each token t include_hrefs(ttokenizetFalset annotation(RRRttok((s4/usr/lib64/python2.7/site-packages/lxml/html/diff.pyR Gs  c Cs{td|d|ƒ}|jƒ}xS|D]K\}}}}}|dkr(|||!} |||!} t| | ƒq(q(WdS(sˆMerge the annotations from tokens_old into tokens_new, when the tokens in the new document already existed in the old document. tatbtequalN(tInsensitiveSequenceMatchert get_opcodestcopy_annotations( t tokens_oldt tokens_newtstcommandstcommandti1ti2tj1tj2teq_oldteq_new((s4/usr/lib64/python2.7/site-packages/lxml/html/diff.pyR Os    cCs0x)t||ƒD]\}}|j|_qWdS(sN Copy annotations from the tokens listed in src to the tokens in dest N(tzipR(tsrctdesttsrc_toktdest_tok((s4/usr/lib64/python2.7/site-packages/lxml/html/diff.pyR"\scCsq|dg}x]|dD]Q}|dj r\|j r\|dj|jkr\t||ƒq|j|ƒqW|S(sm Combine adjacent tokens when there is no HTML between the tokens, and they share an annotation iiiÿÿÿÿ(t post_tagstpre_tagsRtcompress_merge_backtappend(RRR((s4/usr/lib64/python2.7/site-packages/lxml/html/diff.pyR ds  c Cs«|d}t|ƒtk s.t|ƒtk r>|j|ƒnit|ƒ}|jr`|d7}n||7}t|d|jd|jd|jƒ}|j|_||d tag). Returns HTML with and tags added around the appropriate text. Markup is generally ignored, with the markup from new_html preserved, and possibly some markup from old_html (though it is considered acceptable to lose some of the old markup). Only the words in the HTML are diffed. The exception is tags, which are treated like words, and the href attribute of tags, which are noted inside the tag itself when there are changes. R (Rthtmldiff_tokensRRtfixup_ins_del_tags(told_htmltnew_htmltold_html_tokenstnew_html_tokensR((s4/usr/lib64/python2.7/site-packages/lxml/html/diff.pyRšs   c Csÿtd|d|ƒ}|jƒ}g}xÅ|D]½\}}}}} |dkru|jt||| !dtƒƒq.n|dks�|dkr°t||| !ƒ} t| |ƒn|dksÈ|dkr.t|||!ƒ} t| |ƒq.q.Wt|ƒ}|S(s] Does a diff on the tokens themselves, returning a list of text chunks (not tokens). RRRtinserttreplacetdelete(R R!textendt expand_tokenstTruet merge_insertt merge_deletetcleanup_delete( t html1_tokenst html2_tokensR%R&RR'R(R)R*R+t ins_tokenst del_tokens((s4/usr/lib64/python2.7/site-packages/lxml/html/diff.pyRA±s    ccs�xz|D]r}x|jD] }|VqW| s7|j r`|jrR|jƒdVq`|jƒVnx|jD] }|VqjWqWdS(seGiven a list of tokens, return a generator of the chunks of text for the data in the tokens. R7N(R4thide_when_equalR8R=R3(RRR:R?R@((s4/usr/lib64/python2.7/site-packages/lxml/html/diff.pyRK×s   cCsµt|ƒ\}}}|j|ƒ|rO|djdƒ rO|dcd7ins_chunks to the end of that. iÿÿÿÿR7ss N(tsplit_unbalancedRJtendswithR6(t ins_chunksRtunbalanced_starttbalancedtunbalanced_end((s4/usr/lib64/python2.7/site-packages/lxml/html/diff.pyRMæs    t DEL_STARTcBseZRS((t__name__t __module__(((s4/usr/lib64/python2.7/site-packages/lxml/html/diff.pyR[ýstDEL_ENDcBseZRS((R\R](((s4/usr/lib64/python2.7/site-packages/lxml/html/diff.pyR^ÿst NoDeletescBseZdZRS(sY Raised when the document no longer contains any pending deletes (DEL_START/DEL_END) (R\R]t__doc__(((s4/usr/lib64/python2.7/site-packages/lxml/html/diff.pyR_scCs+|jtƒ|j|ƒ|jtƒdS(s¾ Adds the text chunks in del_chunks to the document doc (another list of text chunks) with marker to show it is a delete. cleanup_delete later resolves these markers into tags.N(R6R[RJR^(t del_chunksR((s4/usr/lib64/python2.7/site-packages/lxml/html/diff.pyRNs  cCsxyt|ƒ\}}}Wntk r0PnXt|ƒ\}}}t|||ƒt|||ƒ|}|r™|djdƒ r™|dcd7. To do this while keeping the document valid, it may need to drop some tags (either start or end tags). It may also move the del into adjacent tags to try to move it to a similar location where it was originally located (e.g., moving a delete into preceding
tag, if the del looks like (DEL_START, 'Text
', DEL_END)iÿÿÿÿR7ss (t split_deleteR_RUtlocate_unbalanced_starttlocate_unbalanced_endRVR6RJ(tchunkst pre_deleteRIt post_deleteRXRYRZR((s4/usr/lib64/python2.7/site-packages/lxml/html/diff.pyROs&       c Cs»g}g}g}g}xE|D]=}|jdƒsG|j|ƒqn|ddk}|jƒdjdƒ}|tkr�|j|ƒqn|r3|rÞ|dd|krÞ|j|ƒ|jƒ\}}} | ||/iÿÿÿÿN( t startswithR6tsplitRt empty_tagstpopRJtlentNone( Retstarttendt tag_stackRYtchunktendtagtnametposttag((s4/usr/lib64/python2.7/site-packages/lxml/html/diff.pyRU5s:      )#%cCs`y|jtƒ}Wntk r,t‚nX|jtƒ}|| ||d|!||dfS(sæ Returns (stuff_before_DEL_START, stuff_inside_DEL_START_END, stuff_after_DEL_END). Returns the first case found (there may be more DEL_STARTs in stuff_after_DEL_END). Raises NoDeletes if there's no DEL_START found. i(tindexR[t ValueErrorR_R^(ReRvtpos2((s4/usr/lib64/python2.7/site-packages/lxml/html/diff.pyRb]s   cCsÛxÔ|s Pn|d}|jƒdjdƒ}|s:Pn|d}|tks`|jdƒ rdPn|ddkrxPn|jƒdjdƒ}|dkr¡Pn||krÓ|jdƒ|j|jdƒƒqPqdS(s° pre_delete and post_delete implicitly point to a place in the document (where the two were split). This moves that point (by popping items from one and pushing them onto the other). It moves the point to try to find a place where unbalanced_start applies. As an example:: >>> unbalanced_start = ['
'] >>> doc = ['

', 'Text', '

', '
', 'More Text', '
'] >>> pre, post = doc[:3], doc[3:] >>> pre, post (['

', 'Text', '

'], ['
', 'More Text', '
']) >>> locate_unbalanced_start(unbalanced_start, pre, post) >>> pre, post (['

', 'Text', '

', '
'], ['More Text', '
']) As you can see, we moved the point so that the dangling
that we found will be effectively replaced by the div in the original document. If this doesn't work out, we just throw away unbalanced_start without doing anything. is<>RhiRitinsN(RkRR[RjRmR6(RXRfRgtfindingt finding_nametnextRu((s4/usr/lib64/python2.7/site-packages/lxml/html/diff.pyRcis&     cCsÐxÉ|s Pn|d}|jƒdjdƒ}|s:Pn|d}|tks`|jdƒ rdPn|jƒdjdƒ}|dks•|dkr™Pn||krÈ|jƒ|jd|jƒƒqPqdS(st like locate_unbalanced_start, except handling end tags and possibly moving the point earlier in the document. iÿÿÿÿis<>/s tag, which takes up visible space just like a word but is only represented in a document by a tag. c CsMtj|dt|fd|d|d|ƒ}||_||_||_|S(Ns%s: %sR4R3R8(R:R€R9Rwtdatat html_repr(R�RwR†R‡R4R3R8R‚((s4/usr/lib64/python2.7/site-packages/lxml/html/diff.pyR€ãs    cCs,d|j|j|j|j|j|jfS(NsRtag_token(%s, %s, html_repr=%s, post_tags=%r, pre_tags=%r, trailing_whitespace=%s)(RwR†R‡R4R3R8(R„((s4/usr/lib64/python2.7/site-packages/lxml/html/diff.pyRƒîscCs|jS(N(R‡(R„((s4/usr/lib64/python2.7/site-packages/lxml/html/diff.pyR=ösN(R\R]R`RoRR€RƒR=(((s4/usr/lib64/python2.7/site-packages/lxml/html/diff.pyR…Ýs  t href_tokencBseZdZeZd„ZRS(sh Represents the href in an anchor tag. Unlike other words, we only show the href when it changes. cCsd|S(Ns Link: %s((R„((s4/usr/lib64/python2.7/site-packages/lxml/html/diff.pyR=s(R\R]R`RLRTR=(((s4/usr/lib64/python2.7/site-packages/lxml/html/diff.pyRˆùscCsLtj|ƒr|}nt|dtƒ}t|dtd|ƒ}t|ƒS(sk Parse the given HTML and returns token objects (words with attached tags). This parses only the content of a page; anything in the head is ignored, and the and elements are themselves optional. The content is then parsed by lxml, which ensures the validity of the resulting parsed document (though lxml may make incorrect guesses when the markup is particular bad). and tags are also eliminated from the document, as that gets confusing. If include_hrefs is true, then the href attribute of tags is included as a special kind of diffable token.tcleanuptskip_tagR(Rt iselementt parse_htmlRLt flatten_elt fixup_chunks(R=Rtbody_elRe((s4/usr/lib64/python2.7/site-packages/lxml/html/diff.pyRs  cCs%|rt|ƒ}nt|dtƒS(s Parses an HTML fragment, returning an lxml element. Note that the HTML will be wrapped in a
tag that was not in the original document. If cleanup is true, make sure there's no or , and get rid of any and tags. t create_parent(t cleanup_htmlRRL(R=R‰((s4/usr/lib64/python2.7/site-packages/lxml/html/diff.pyRŒss s scCsftj|ƒ}|r(||jƒ}ntj|ƒ}|rP||jƒ }ntjd|ƒ}|S(s³ This 'cleans' the HTML, meaning that any page structure is removed (only the contents of are used, if there is any and tags are removed. R (t_body_retsearchRqt _end_body_reRpt _ins_del_retsub(R=tmatch((s4/usr/lib64/python2.7/site-packages/lxml/html/diff.pyR‘,ss [ \t\n\r]$c Csçg}d }g}x¡|D]™}t|tƒrÿ|ddkr±|d}|d}|jdƒrt|d }t}nt}td|d|d|d |ƒ}g}|j|ƒq|dd kr|d}t|d|d tƒ}g}|j|ƒqqnt |ƒra|jdƒr-|d }t}nt}t |d|d |ƒ}g}|j|ƒqt |ƒr}|j|ƒqt |ƒr|rŸ|j|ƒq²|j j|ƒqqW|sÏt d d|ƒgS|dj j|ƒ|S( sM This function takes a list of chunks and produces a list of tokens. itimgiiR7iÿÿÿÿR‡R4R8threfR N(Rot isinstancettupleRVRLRR…R6Rˆtis_wordR:t is_start_tagt is_end_tagR3RJ( Ret tag_accumtcur_wordRRsR/RwR8R™((s4/usr/lib64/python2.7/site-packages/lxml/html/diff.pyRŽ<sT            tparamR˜tareatbrtbasefonttinputtbasetmetatlinktcoltaddresst blockquotetcentertdirtdivtdltfieldsettformth1th2th3th4th5th6thrtisindextmenutnoframestnoscripttoltpR?ttabletultddtdttframesettlittbodyttdttfoottthttheadttrccsS|sC|jdkr5d|jdƒt|ƒfVqCt|ƒVn|jtkrw|j rwt|ƒ rw|j rwdSt|jƒ}x|D]}t|ƒVq�Wx0|D](}xt |d|ƒD] }|VqÂWq©W|jdkr|jdƒr|rd|jdƒfVn|sOt |ƒVt|jƒ}x|D]}t|ƒVq7WndS(s Takes an lxml element el, and generates all the text chunks for that tag. Each start tag is a chunk, each word is a chunk, and each end tag is a chunk. If skip_tag is true, then the outermost container tag is not returned (just its contents).R˜R/NRRR™( Rwtgett start_tagRlRRnttailt split_wordsRR�tend_tag(telRRŠt start_wordstwordtchildtitemt end_words((s4/usr/lib64/python2.7/site-packages/lxml/html/diff.pyR�¤s& 0   $  cCsi| s|jƒ rgSg|jƒjƒD]}|d^q+}tj|ƒse|dd |dR s %s="%s"(RwRtattribtitemsRRL(RÐRutvalue((s4/usr/lib64/python2.7/site-packages/lxml/html/diff.pyRÌÌscCs;|jr$tj|jƒr$d}nd}d|j|fS(sg The text representation of an end tag for a tag. Includes trailing whitespace when appropriate. R7R s%s(RÍtstart_whitespace_reR“Rw(RÐtextra((s4/usr/lib64/python2.7/site-packages/lxml/html/diff.pyRÏÔs cCs|jdƒ S(NRh(Rj(R((s4/usr/lib64/python2.7/site-packages/lxml/html/diff.pyRœÝscCs |jdƒS(Ns or tags inside of any block-level elements, e.g. transform

word

to

word

R‰t skip_outer(RŒRt_fixup_ins_del_tagstserialize_html_fragmentRL(R=R((s4/usr/lib64/python2.7/site-packages/lxml/html/diff.pyRBæs cCs]tj|dddtƒ}|rU||jdƒd}||jdƒ }|jƒS|SdS(s¨ Serialize a single lxml element as HTML. The serialized form includes the elements tail. If skip_outer is true, then don't serialize the outermost tag tmethodR=tencodingt>iRhN(RttostringRtfindtrfindR(RÐRÞR=((s4/usr/lib64/python2.7/site-packages/lxml/html/diff.pyRàïs  cCsex^ddgD]P}xG|jd|ƒD]2}t|ƒs?q'nt|d|ƒ|jƒq'Wq WdS(s?fixup_ins_del_tags that works on an lxml document in-place R{Rsdescendant-or-self::%sRwN(txpatht_contains_block_level_tagt_move_el_inside_blocktdrop_tag(RRwRÐ((s4/usr/lib64/python2.7/site-packages/lxml/html/diff.pyRßs  cCsG|jtks|jtkr"tSx|D]}t|ƒr)tSq)WtS(sPTrue if the element contains any block-level elements, like

, , etc. (Rwtblock_level_tagstblock_level_container_tagsRLRèR(RÐRÓ((s4/usr/lib64/python2.7/site-packages/lxml/html/diff.pyRè s   cCsbxo|D]}t|ƒrPqqWddl}tj|ƒ}|j|_d|_|jt|ƒƒ|g|(dSx©t|ƒD]›}t|ƒrît||ƒ|j rtj|ƒ}|j |_d|_ |j |j |ƒd|ƒqqtj|ƒ}|j ||ƒ|j |ƒqW|jr^tj|ƒ}|j|_d|_|j d|ƒndS(st helper for _fixup_ins_del_tags; actually takes the etc tags and moves them inside any block-level tags. iÿÿÿÿNii(RètsysRtElementRRoRJtlistRéRÍRGRxRHR6(RÐRwRÓRít children_tagttail_tagt child_tagttext_tag((s4/usr/lib64/python2.7/site-packages/lxml/html/diff.pyRés4           #   cCs&|jƒ}|jpd}|jryt|ƒs@||j7}qy|djrf|dj|j7_qy|j|d_n|j|ƒ}|r |dkr£d}n||d}|dkrä|jrØ|j|7_q||_q |jrÿ|j|7_q ||_n|jƒ|||d+dS(s© Removes an element, but merges its contents into its place, e.g., given

Hi there!

, if you remove the element you get

Hi there!

R iÿÿÿÿiiN(t getparentRRÍRnRxRot getchildren(RÐtparentRRxtprevious((s4/usr/lib64/python2.7/site-packages/lxml/html/diff.pyt_merge_element_contents7s*           R cBseZdZdZd„ZRS(st Acts like SequenceMatcher, but tries not to find very small equal blocks amidst large spans of changes icCs{tt|jƒt|jƒƒ}t|j|dƒ}tjj|ƒ}g|D]'}|d|ksq|d rP|^qPS(Nii(tminRnRt thresholdtdifflibtSequenceMatchertget_matching_blocks(R„tsizeRútactualRÔ((s4/usr/lib64/python2.7/site-packages/lxml/html/diff.pyRýas ! (R\R]R`RúRý(((s4/usr/lib64/python2.7/site-packages/lxml/html/diff.pyR Yst__main__(t _diffcommand((( R¡simgR¢R£R¤sinputsbaseR§slinkR©(RªR«scentersdirR®R¯R°R±R²R³R´RµR¶R·R¸R¹RºR»R¼R½R¾sprestableRÀ( RÁRÂRÃRÄRÅRÆRÇRÈRÉRÊ(MRûtlxmlRt lxml.htmlRtret__all__R=RRt ImportErrortcgitunicodeRt NameErrortstrt basestringR RR R R"R R5RRRARRKRMR[R^t ExceptionR_RNRORURbRcRdR:R…RˆRLRRŒtcompiletItSR’R”R•R‘RÖRŽRlRëRìR�RÎRÜRÌRÏRœRžR�RBRàRßRèRéRøRüR R\Rtmain(((s4/usr/lib64/python2.7/site-packages/lxml/html/diff.pytsÌ           (       &    ' ( 2 (    <        ! "