MSV FM

[email protected]: ~ $
Path : /usr/lib64/python2.7/site-packages/lxml/html/
File Upload :
Current < : //usr/lib64/python2.7/site-packages/lxml/html/clean.pyo

�
�aabc@s�dZddlZddlZddlZyddlmZWn!ek
raddlmZnXddlm	Z	ddl
mZddl
mZm
Z
ddl
mZmZyeWnek
r�eZnXyeWnek
r�eZnXyeWnek
reZnXyeWnek
r;eefZnXdd	d
ddd
dgZejdejejB�jZejdej�jZejdejddkr�ejfnf�j Z!ejdej�j"Z#ejdej�j"Z$ejdej�j"Z%d�Z&ejd�jZ'ejdejejB�Z(e	j)d�Z*e	j)ddie
d6�Z+d
e,fd��YZ-e-�Z.e.j/Z/ejdej�ejd ej�gZ0d!d"d#d$d%d&gZ1ejd'ej�ejd(ej�ejd)�gZ2d*gZ3e0e1e2e3d+�Z4d,�Z5d-�Z6e4je6_d"d!d#gZ7d.gZ8d/e7e8ed0�d1�Z9d2�Z:d3�Z;ejd4ej�Z<d5�Z=dS(6scA cleanup tool for HTML.

Removes unwanted tags and content.  See the `Cleaner` class for
details.
i����N(turlsplit(tetree(tdefs(t
fromstringtXHTML_NAMESPACE(t
xhtml_to_htmlt_transform_resultt
clean_htmltcleantCleanertautolinkt
autolink_htmlt
word_breaktword_break_htmlsexpression\s*\(.*?\)s
@\s*imports</?[a-zA-Z]+|\son[a-zA-Z]+\s*=iis^data:image/(.+);base64,s:(javascript|jscript|livescript|vbscript|data|about|mocha):s	(xml|svg)cCsMt}x*t|�D]}t}t|�rtSqW|r=tStt|��S(N(tFalset_find_image_dataurlstTruet_is_unsafe_image_typetboolt_is_possibly_malicious_scheme(tstis_image_urlt
image_type((s5/usr/lib64/python2.7/site-packages/lxml/html/clean.pyt_is_javascript_schemeVss[\s\x00-\x08\x0B\x0C\x0E-\x19]+s\[if[\s\n\r]+.*?][\s\n\r]*>sdescendant-or-self::*[@style]s�descendant-or-self::a  [normalize-space(@href) and substring(normalize-space(@href),1,1) != '#'] |descendant-or-self::x:a[normalize-space(@href) and substring(normalize-space(@href),1,1) != '#']t
namespacestxcBsOeZdZeZeZeZeZdZ
eZeZeZ
eZeZeZeZeZdZdZdZeZeZejZeZdZeddg�Zd�Zedddddd	d
gdddddddd�Z d
�Z!d�Z"d�Z#d�Z$d�Z%dd�Z&d�Z'e(j)de(j*�j+Z,d�Z-d�Z.RS(s
    Instances cleans the document of each of the possible offending
    elements.  The cleaning is controlled by attributes; you can
    override attributes in a subclass, or set them in the constructor.

    ``scripts``:
        Removes any ``<script>`` tags.

    ``javascript``:
        Removes any Javascript, like an ``onclick`` attribute. Also removes stylesheets
        as they could contain Javascript.

    ``comments``:
        Removes any comments.

    ``style``:
        Removes any style tags.

    ``inline_style``
        Removes any style attributes.  Defaults to the value of the ``style`` option.

    ``links``:
        Removes any ``<link>`` tags

    ``meta``:
        Removes any ``<meta>`` tags

    ``page_structure``:
        Structural parts of a page: ``<head>``, ``<html>``, ``<title>``.

    ``processing_instructions``:
        Removes any processing instructions.

    ``embedded``:
        Removes any embedded objects (flash, iframes)

    ``frames``:
        Removes any frame-related tags

    ``forms``:
        Removes any form tags

    ``annoying_tags``:
        Tags that aren't *wrong*, but are annoying.  ``<blink>`` and ``<marquee>``

    ``remove_tags``:
        A list of tags to remove.  Only the tags will be removed,
        their content will get pulled up into the parent tag.

    ``kill_tags``:
        A list of tags to kill.  Killing also removes the tag's content,
        i.e. the whole subtree, not just the tag itself.

    ``allow_tags``:
        A list of tags to include (default include all).

    ``remove_unknown_tags``:
        Remove any tags that aren't standard parts of HTML.

    ``safe_attrs_only``:
        If true, only include 'safe' attributes (specifically the list
        from the feedparser HTML sanitisation web site).

    ``safe_attrs``:
        A set of attribute names to override the default list of attributes
        considered 'safe' (when safe_attrs_only=True).

    ``add_nofollow``:
        If true, then any <a> tags will have ``rel="nofollow"`` added to them.

    ``host_whitelist``:
        A list or set of hosts that you can use for embedded content
        (for content like ``<object>``, ``<link rel="stylesheet">``, etc).
        You can also implement/override the method
        ``allow_embedded_url(el, url)`` or ``allow_element(el)`` to
        implement more complex rules for what can be embedded.
        Anything that passes this test will be shown, regardless of
        the value of (for instance) ``embedded``.

        Note that this parameter might not work as intended if you do not
        make the links absolute before doing the cleaning.

        Note that you may also need to set ``whitelist_tags``.

    ``whitelist_tags``:
        A set of tags that can be included with ``host_whitelist``.
        The default is ``iframe`` and ``embed``; you may wish to
        include other tags like ``script``, or you may want to
        implement ``allow_embedded_url`` for more control.  Set to None to
        include all tags.

    This modifies the document *in place*.
    tiframetembedcKs�xR|j�D]D\}}t||�sAtd||f��nt|||�q
W|jdkrd|kr|j|_ndS(NsUnknown parameter: %s=%rtinline_style(titemsthasattrt	TypeErrortsetattrRtNonetstyle(tselftkwtnametvalue((s5/usr/lib64/python2.7/site-packages/lxml/html/clean.pyt__init__�stscripttsrctlinkthreftapplettcodetobjecttlayertacCs�t|d�r|j�}nt|�x |jd�D]}d|_q8W|jsd|j|�nt|jpsd(�}t|j	p�d)�}t|j
p�d*�}|jr�|jd�n|j
r*t|j�}xS|jtj�D]<}|j}x*|j�D]}||kr||=qqWq�Wn|jr|j
oK|jtjks�xV|jtj�D]?}|j}x-|j�D]}|jd�r}||=q}q}WqaWn|j|jdt�|jsHxt|�D]n}|jd�}	td|	�}
td|
�}
|j|
�r"|jd=q�|
|	kr�|jd|
�q�q�Wn|jsx�t |jd��D]�}|jd	d�j!�j"�d
kr�|j#�qgn|j$p�d}	td|	�}
td|
�}
|j|
�r�d|_$qg|
|	krg|
|_$qgqgWqn|js|j%r0|jtj&�n|j%rL|jtj'�n|jre|jd�n|jr�tj(|d�n|j)r�|jd�nr|js�|jrx]t |jd��D]C}d
|jdd�j!�kr�|j*|�s|j#�qq�q�Wn|j+r%|jd�n|j,r>|j-d+�n|j.r�xvt |jd��D]_}t}|j/�}x+|d'k	r�|jd,kr�|j/�}qxW|d'kr]|j#�q]q]W|j-d-�|j-d.�n|j1r�|j-tj2�n|j3r|jd�|j-d/�n|j4r8|j-d0�ng}
g}x||j�D]n}|j|kr�|j*|�r{qQn|j5|�qQ|j|krQ|j*|�r�qQn|
j5|�qQqQW|
r|
d |kr|
j6d �}d!|_|jj7�nM|rN|d |krN|j6d �}|jdkrAd!|_n|j7�n|j8�x|D]}|j#�q_Wx|
D]}|j9�qzW|j:r�|r�t;d"��nttj<�}n|r_g}x3|j�D]%}|j|kr�|j5|�q�q�W|r_|d |kr>|j6d �}d!|_|jj7�nx|D]}|j9�qEWq_n|j=r�x�t>|�D]r}|j?|�su|jd�}|r�d#|kr�d$d%|kr�qund&|}nd#}|jd|�ququWnd'S(1s&
        Cleans the document.
        tgetroottimagetimgR(tontresolve_base_hrefR"tttypestext/javascripts
/* deleted */R*t
stylesheettreltmetatheadthtmlttitletparamR,R.RRR/tformtbuttontinputtselectttextareatblinktmarqueeitdivsIIt does not make sense to pass in both allow_tags and remove_unknown_tagstnofollows
 nofollow s %s s%s nofollowN((((R;R<R=(R,R.(R,(RRR/R.R>(R@RARBRC(RDRE(@RR1Rtiterttagtcommentstkill_conditional_commentstsett	kill_tagstremove_tagst
allow_tagstscriptstaddtsafe_attrs_onlyt
safe_attrsRtElementtattribtkeyst
javascriptRt
startswitht
rewrite_linkst_remove_javascript_linkRRt_find_styled_elementstgett_replace_css_javascriptt_replace_css_importt_has_sneaky_javascriptR"tlisttlowertstript	drop_treettexttprocessing_instructionstCommenttProcessingInstructiontstrip_attributestlinkst
allow_elementR:tpage_structuretupdatetembeddedt	getparentR!tframest
frame_tagstformst
annoying_tagstappendtpoptcleartreversetdrop_tagtremove_unknown_tagst
ValueErrorttagstadd_nofollowt_find_external_linkstallow_follow(R#tdoctelRMRNRORSRUtanametoldtnewtfound_parenttparentt_removet_killtbadR9((s5/usr/lib64/python2.7/site-packages/lxml/html/clean.pyt__call__s

								
	$
							
		
		



		
	
cCstS(sF
        Override to suppress rel="nofollow" on some anchors.
        (R(R#tanchor((s5/usr/lib64/python2.7/site-packages/lxml/html/clean.pyR}�scCs�|j|jkrtS|j|j}t|ttf�rx=|D]5}|j|�}|satS|j||�sBtSqBWtS|j|�}|s�tS|j||�SdS(N(	RIt_tag_link_attrsRt
isinstanceR`ttupleR\tallow_embedded_urlR(R#Rtattrtone_attrturl((s5/usr/lib64/python2.7/site-packages/lxml/html/clean.pyRj�s
cCs�|jdk	r%|j|jkr%tSt|�\}}}}}|j�jdd�d}|dkrltS||jkrtStS(Nt:iithttpthttps(R�R�(	twhitelist_tagsR!RIRRRatsplitthost_whitelistR(R#RR�tschemetnetloctpathtquerytfragment((s5/usr/lib64/python2.7/site-packages/lxml/html/clean.pyR��scCs#g}|j|d�tj�dS(s�
        IE conditional comments basically embed HTML that the parser
        doesn't normally see.  We can't allow anything like that, so
        we'll kill any comments that could be conditional.
        cSstj|j�S(N(t_conditional_comment_retsearchRd(R((s5/usr/lib64/python2.7/site-packages/lxml/html/clean.pyt<lambda>�R6N(t_kill_elementsRRf(R#R~R�((s5/usr/lib64/python2.7/site-packages/lxml/html/clean.pyRK�s	cCs[g}x3|j|�D]"}||�r|j|�qqWx|D]}|j�qCWdS(N(RHRsRc(R#R~t	conditiontiterateR�R((s5/usr/lib64/python2.7/site-packages/lxml/html/clean.pyR��s
cCs#td|�}t|�rdS|S(NR6(t_substitute_whitespaceR(R#R*R�((s5/usr/lib64/python2.7/site-packages/lxml/html/clean.pyRZ�ss	/\*.*?\*/cCs�|jd|�}|jdd�}td|�}|j�}d|krOtSd|kr_tSd|krotSd|krtSt|�r�tStS(s�
        Depending on the browser, stuff like ``e x p r e s s i o n(...)``
        can get interpreted, or ``expre/* stuff */ssion(...)``.  This
        checks for attempt to do stuff like this.

        Typically the response will be to kill the entire style; if you
        have just a bit of Javascript in the style another rule will catch
        that and remove only the Javascript from the style; this catches
        more sneaky attempts.
        R6s\sjavascript:sexpression(s@imports
</noscript(t_substitute_commentstreplaceR�RaRt_looks_like_tag_contentR(R#R"((s5/usr/lib64/python2.7/site-packages/lxml/html/clean.pyR_�scCsPt|�}t|t�r*t|�}ntj|�}||�t||�S(N(R7R�t
basestringRtcopytdeepcopyR(R#R<tresult_typeR~((s5/usr/lib64/python2.7/site-packages/lxml/html/clean.pyRs
N((/t__name__t
__module__t__doc__RRPRWRJRR"R!RRiR:RkReRmRoRqRrRNRORMRxRRRRSR{R�RLR�R'tdictR�R�R}RjR�RKR�RZtretcompiletStsubR�R_R(((s5/usr/lib64/python2.7/site-packages/lxml/html/clean.pyR	osT]					�						sb(?P<body>https?://(?P<host>[a-z0-9._-]+)(?:/[/\-_.,a-z0-9%&?;=~]*)?(?:\([/\-_.,a-z0-9%&?;=~]*\))?)s9mailto:(?P<body>[a-z0-9._-]+@(?P<host>[a-z0-9_.-]+[a-z]))RCtpreR-R;RBR0s
^localhosts\bexample\.(?:com|org|net)$s^127\.0\.0\.1$tnolinkcCsG|j|krdS|jd�}|rX|j�}x!|D]}||kr;dSq;Wnx�t|�D]�}t|d|d|d|d|�|jret|j||d|j�\}}	|	r�||_|j|�}
|	||
d|
d+q�qeqeW|j	rCt|j	||d|j�\}}|rC||_	||d	*qCndS(
s
    Turn any URLs into links.

    It will search for links identified by the given regular
    expressions (by default mailto and http(s) links).

    It won't link text in an element in avoid_elements, or an element
    with a class in avoid_classes.  It won't link to anything with a
    host that matches one of the regular expressions in avoid_hosts
    (default localhost and 127.0.0.1).

    If you pass in an element, the element's tail will not be
    substituted, only the contents of the element.
    Ntclasstlink_regexestavoid_elementstavoid_hostst
avoid_classestfactoryii(
RIR\R�R`R
ttailt
_link_texttmakeelementtindexRd(RR�R�R�R�t
class_nametmatch_classtchildRdt
tail_childrenR�tpre_children((s5/usr/lib64/python2.7/site-packages/lxml/html/clean.pyR
6s4
	!		!	cCs$d}g}d}xd\}}x�|D]�}	|}
xi|	j|d|
�}|dkr\Pn|jd�}x.|D]%}
|
j|�rr|j�}
PqrqrWPq7W|dkr�q(n|dks�|j�|kr(|}|j�}q(q(W|dkr|r||d_n|}Pn|jd�}|j�}|jd�sN|jd�re|d8}|d }n||j� }|r�||d_n|}|d	�}|jd
|�|jd�}|s�|}n|jd�s�|jd�r�|d }n||_|j	|�||}qW||fS(
NR6itposthosti����t.t,iR0R+tbody(NN(
R!R�tgrouptendtstartR�tendswithRLRdRs(RdR�R�R�tleading_textRitlast_post
best_matchtbest_postregext	regex_postmatchR�t
host_regexR*R�t	prev_textR�R�((s5/usr/lib64/python2.7/site-packages/lxml/html/clean.pyR�cs^



	
	
cOsVt|�}t|t�r*t|�}ntj|�}t|||�t||�S(N(R7R�R�RR�R�R
R(R<targsR$R�R~((s5/usr/lib64/python2.7/site-packages/lxml/html/clean.pyR�stnobreaki(i c	Cs�|jtkrdS|jd�}|rnt}|j�}x$|D]}||krAt}PqAqAW|rndSn|jr�t|j||�|_nxT|D]L}t|d|d|d|d|�|j	r�t|j	||�|_	q�q�WdS(s�
    Breaks any long words found in the body of the text (not attributes).

    Doesn't effect any of the tags in avoid_elements, by default
    ``<textarea>`` and ``<pre>``

    Breaks words by inserting &#8203;, which is a unicode character
    for Zero Width Space character.  This generally takes up no space
    in rendering, but does copy as a space, and in monospace contexts
    usually takes up space.

    See http://www.cs.tut.fi/~jkorpela/html/nobr.html for a discussion
    NR�t	max_widthR�R�tbreak_character(
RIt_avoid_word_break_elementsR\RR�RRdt_break_textRR�(	RR�R�R�R�R�t
dont_breaktavoidR�((s5/usr/lib64/python2.7/site-packages/lxml/html/clean.pyR�s*
	
	cOs5t|�}t|�}t|||�t||�S(N(R7RRR(R<R�R$R�R~((s5/usr/lib64/python2.7/site-packages/lxml/html/clean.pyR
�scCsZ|j�}xG|D]?}t|�|krt|||�}|j||�}qqW|S(N(R�tlent
_insert_breakR�(RdR�R�twordstwordtreplacement((s5/usr/lib64/python2.7/site-packages/lxml/html/clean.pyR��s
s[^a-z]cCs�|}d}x�t|�|kr�|| }ttj|��}|r||d}|j�|dkr|||j� }q|n|||7}|t|�}qW||7}|S(NR6i����i
(R�R`t_break_prefer_retfinditerR�(R�twidthR�t	orig_wordtresultR�tbreakst
last_break((s5/usr/lib64/python2.7/site-packages/lxml/html/clean.pyR��s


(>R�R�R�tsysturlparseRtImportErrorturllib.parsetlxmlRt	lxml.htmlRRRRRtunichrt	NameErrortchrtunicodetstrtbytesR�t__all__R�R�tIR�R]R^tversion_infotASCIIR�R�tfindallRRRRR�R�tXPathR[R|R.R	RRt
_link_regexest_avoid_elementst_avoid_hostst_avoid_classesR
R�RR�t_avoid_word_break_classesRR
R�R�R�(((s5/usr/lib64/python2.7/site-packages/lxml/html/clean.pyt<module>s�







+	
	��			*	:			&		
Bethany
Bethany
0%

THE FINEST HOTEL NEAR LAKE KIVU

The Perfect Base For You

Required fields are followed by *





EC1A68011

About Us

Delicious Interior With The Pinch Of Everything

Bethany Investment group is Presbyterian church in Rwanda(EPR) company that manage Hotel and Guest house in Karongi (Bethany Hotel), ISANO branch in GIKONDO(Kigali), Kiyovu branch(Kigali), AMIZERO branch(Nyagatare-East) and Gisenyi Branch(Rubavu).

Accomodation

Get a Comfortable Room
Feel The Comfort

Get a comfortable room and feel our hotel’s comfort. Bethany Hotel features a variety of fully furnished rooms with extra space, Executive rooms, Deluxe rooms with a beautiful lake view and garden space, Deluxe rooms, comfort rooms, family rooms and standard rooms at your service.

Standard Single

Services

We Provide Top Class Facility
Especially For You

Beach BBQ Party

Kick back on the beach& and enjoy our berbecue from our masterchef

Breakfast

Kick back at our hotels& enjoy our breakfast from our masterchef

Conference Hall

Kick back at our hotels& enjoy our conference halls from all bethany branches

Enjoy with your partner

Honeymoon Package

80%

Get In Touch

Don’t Miss Any Update

    +

    Search your Room

    Required fields are followed by *