
    IZj,                        d Z ddlmZ dZ eddei           ed           eddei           ed	dei           ed
          gZ eddei           eddei           eddei           ed          gZ eddei          gZ eddei           eddei          gZ ed          gZd dD             Z	 ed          gZ
 ed           ed           eddei          gZ eddei           eddei           eddei          gZ eddei           ed          gZ eddei           ed           ed            ed!           ed"           ed#          gZ ed$           ed%           ed&dei           ed'          gZ ed(dei           ed)           ed*          gZd+S ),z^
X-Path expressions used to extract or filter the main text content,
and to extract metadata.
    XPathz$http://exslt.org/regular-expressionsaH  
        .//*[self::article or self::div or self::main or self::section][
        @class='post' or @class='entry' or
        @itemprop='articleBody' or @id='articleContent' or
        re:test(@id, '(?:entry|article|art)-content|article__content|article(?:-|__)?body|articleBody|body-text') or
        re:test(@class, 'post[-_]text|post-body|post-?entry|post[-_]?content|postContent|post_inner_wrapper|article-?text|articleText|(?:entry|page|text|article|art)-content|article__content|article(?:-|__)?body|articleBody|ArticleContent|body-text|article__container')
        ][1]
        re)
namespacesz(.//article)[1]a,  
        (.//*[self::article or self::div or self::main or self::section][
        @role='article' or
        @id='article' or @id='story' or
        @class='postarea' or @class='art-postcontent' or @class='text' or @class='cell' or @class='story' or
        re:test(@id, '^primary|story-body') or
        contains(translate(@class, 'FULTEX','fultex'), 'fulltext') or
        re:test(@class, '^article |post-bodycopy|story-?content|(?:theme|blog|section|single)-content|single-post|main-column|wpb_text_column|story-body|field-body')
        ])[1]
        a  
        (.//*[self::article or self::div or self::main or self::section][
        @id='content' or @class='content' or
        re:test(@id, 'content-main|content-body|contentBody') or
        re:test(@class, 'content[-_]main|content(?:-|__)body') or
        contains(translate(@id, 'CM','cm'), 'main-content') or contains(translate(@class, 'CM','cm'), 'main-content') or
        contains(translate(@class, 'CP','cp'), 'page-content')
        ])[1]
        z
        (.//*[self::article or self::div or self::section][
        starts-with(@class, 'main') or starts-with(@id, 'main') or starts-with(@role, 'main')])[1]|(.//main)[1]
        z
        .//*[self::div or self::list or self::section][
        re:test(@id|@class, 'comment-?list') or
        re:test(@class, 'comment-page|comments-content|post-comments')]
        z
        .//*[self::div or self::section or self::list][
        re:test(@id|@class, '^comment[s-]') or
        re:test(@class, '^Comments|article-comments')]
        z
        .//*[self::div or self::section or self::list][
        re:test(@id, '^(?:comol|disqus_thread|dsq-comments)')]
        zv
        .//*[self::div or self::section][
        starts-with(@id, 'social') or contains(@class, 'comment')]
        z
        .//*[self::div or self::list or self::section][
        re:test(@id, '^(?:[Cc]omment|comol|disqus_thread|dsq-comments)') or
        re:test(@class, '^[Cc]omment|(?:article|post)-comments')]
        a  
        .//*[self::div or self::item or self::list or self::p or self::section or self::span][
        @data-lp-replacement-content or
        contains(translate(@role, 'N', 'n'), 'nav') or
        contains(@data-component, 'MostPopularStories') or
        re:test(@id|@class, '^shar|viral|social|syndication|newsletter|cookie|tags|sidebar|banner|bread-?crumb|author|button') or
        re:test(@id, '^(?:jp-|dpsp-content)|footer|Footer|share|Share|nav|Nav|related|menu|message-container|bmdh|premium') or
        re:test(@class, '^(?:nav|post-nav|ZendeskForm)| ad |footer|Footer|byline|Byline|elated|share-|sociable|embedded|embed|subnav|tag-list|bar|meta|menu|avigation|navbar|navbox|rating|widget|attachment|timestamp|user-info|user-profile|-ad-|-icon|article-infos|nfoline|outbrain|taboola|criteo|options|expand|consent|modal-content|permission|next-|-stories|most-popular|mol-factbox|message-container|yin|zlylin|xg1|slide|viewport|overlay|paid-?content|obfuscated|blurred')]
        a  
        .//*[@class='comments-title' or
        starts-with(@id|@class, 'reply-') or
        re:test(@id|@style, 'hidden') or
        contains(@style, 'display:none') or contains(@style, 'display: none') or
        re:test(@id, 'reader-comments|akismet') or
        re:test(@class, '^hide-|comments-title|nocomments|-reply-|message|akismet|suggest-links|-hide-|hide-print| hidden| hide|noprint|notloaded') or @aria-hidden='true']
        z
    .//*[self::div or self::item or self::list or self::p or self::section or self::span][
    contains(translate(@id, 'T', 't'), 'teaser') or contains(translate(@class, 'T', 't'), 'teaser')]
    c                 ,    g | ]}t          |          S  r   ).0xs     ^/Users/jameslopez/projects/MentorCore/.venv/lib/python3.11/site-packages/trafilatura/xpaths.py
<listcomp>r      s.     	 	 		 
!HH	 	 	    )z	.//headerz
    .//*[self::div or self::item or self::list or self::p or self::section or self::span][
    contains(@id|@class, 'bottom') or contains(@id|@class, 'link') or contains(@style, 'border')]
    z
    .//*[self::div or self::item or self::list or self::p or self::section or self::span][
    contains(@id, 'caption') or contains(@class, 'caption')]
    z=.//*[self::div or self::section][starts-with(@id, 'respond')]z.//cite|.//quotez
        .//*[
        @class='comments-title' or 
        contains(@style, 'display:none') or
        re:test(@class, 'comments-title|nocomments|-reply-|message|signin') or
        re:test(@id|@class, '^reply-|akismet')]
        a`  
        //*[self::a or self::address or self::div or self::link or self::p or self::span or self::strong][
        @rel='author' or @id='author' or @class='author' or @itemprop='author name' or rel='me' or
        @data-testid='AuthorCard' or @data-testid='AuthorURL' or
        re:test(@class, 'author-?name|AuthorName|authorName')]|//author
        a}  
        //*[self::a or self::div or self::h3 or self::h4 or self::p or self::span][
        @class='byline' or @class='username' or @class='byl' or @class='BBL' or
        contains(@itemprop, 'author') or
        re:test(@id, 'author|zuozhe|bianji|xiaobian') or
        re:test(@class, 'author|channel-name|zuozhe|bianji|xiaobian|submitted-by|posted-by|journalist-name')]
        z
        //*[
        contains(@data-component, 'Byline') or contains(@itemprop, 'author') or
        re:test(@id, '[Aa]uthor') or
        re:test(@class, '[Aa]uthor|screenname|writer|[Bb]yline')]
        a  
        .//*[self::a or self::div or self::section or self::span][
        @id='comments' or @class='comments' or @class='title' or @class='date' or
        re:test(@id, '^comments|comment-?list|ProductReviews') or
        re:test(@class, '^[Cc]omments|commentlist|comments-list|sidebar|is-hidden|quote|embedly-instagram|article-(?:share|support)|print|category|meta-date|meta-reviewer') or
        contains(@data-component, 'Figure')]
        z//time|//figurez
        //div[
        re:test(@class, '^(?:post-?info|post-?meta|meta|entry-meta|entry-info|entry-utility)') or
        starts-with(@id, 'postpath')]//a[@href]
        z//p[starts-with(@class, 'postmeta') or starts-with(@class, 'entry-categories') or
     @class='postinfo' or @id='filedunder']//a[@href]z\//footer[starts-with(@class, 'entry-meta') or starts-with(@class, 'entry-footer')]//a[@href]z//*[self::li or self::span][@class='post-category' or @class='postcategory' or
     @class='entry-category' or contains(@class, 'cat-links')]//a[@href]z)//header[@class='entry-header']//a[@href]z.//div[@class='row' or @class='tags']//a[@href]z//div[@class='tags']//a[@href]z0//p[starts-with(@class, 'entry-tags')]//a[@href]z//div[@class='row' or @class='jp-relatedposts' or @class='entry-utility' or
    re:test(@class, '^(?:tag|postmeta|meta)')]//a[@href]zg//*[@class='entry-meta' or contains(@class, 'topics') or
     contains(@class, 'tags-links')]//a[@href]z
        //*[self::h1 or self::h2][
        re:test(@class, '(?:post-|entry-|article-|post__)title|headline') or 
        contains(@id, 'headline') or contains(@itemprop, 'headline')]
        z0//*[@class='entry-title' or @class='post-title']z_//*[self::h1 or self::h2 or self::h3][
    contains(@class, 'title') or contains(@id, 'title')]N)__doc__
lxml.etreer   regexpNS
BODY_XPATHCOMMENTS_XPATHREMOVE_COMMENTS_XPATHOVERALL_DISCARD_XPATHTEASER_DISCARD_XPATHPRECISION_DISCARD_XPATHDISCARD_IMAGE_ELEMENTSCOMMENTS_DISCARD_XPATHAUTHOR_XPATHSAUTHOR_DISCARD_XPATHSCATEGORIES_XPATHSTAGS_XPATHSTITLE_XPATHSr   r   r   <module>r      s_   
      1 
E	 (#
 
 
 
E
	E		 (#   
E	 (#   
E	 O-
t 
E	
 (#   
E	
 (#   
E	 (#   
E	 1D 
E	
 (#  	  
E	 (#   
E	 (#
 
 
 N 
E	  	 		 	 	  
E	   
E
MNN	E
 !!	E	 (#	 	 	 * 
E	 (#	 	 	 
E	 (#
 
 
 
E	 (#	 	 	- H 
E	 (#	 	 	 
E
   
E	
 (#   
E 9 : :	E
lmm	E L M M	E
9::	E
>?? * 
E
.//	E
@AA	E	<(#  
 
E 2 3 3
  
E	
 (#   
E
@AA	E < = =r   