ó
¡_yec           @  så  d  Z  d d l m Z m Z d d l Z d d l Z d d l Z d d l m Z d d l	 m
 Z
 d d l Z e j j d k  r‘ d d l m Z n d d l Z y e Wn e k
 rÀ Z e Z n Xe
 j d d	 ƒ Z d
 „  Z d „  Z d „  Z d d d „ Z d „  Z d „  Z e d ƒ Z d „  Z d „  Z d „  Z  d „  Z! d „  Z" d „  Z# d „  Z$ d „  Z% d „  Z& d „  Z' e j( d e j) ƒ Z* e j( d ƒ Z+ d „  Z, d „  Z- d „  Z. d  „  Z/ d! „  Z0 d" „  Z1 d# „  Z2 d$ „  Z3 d S(%   u#   
Standard chiron fetcher functions
iÿÿÿÿ(   t   print_functiont   unicode_literalsN(   t   choice(   t   etreei   (   t   csvt   encodingu   UTF-8c         C  s4   t  j |  d t ƒ} t j | j t ƒ } | | f S(   u!   Fetch a URL and return parsed XMLt   stream(   t   requestst   gett   TrueR   t
   fromstringt   contentt   parser(   t   urlt   responset   xml(    (    sZ   /afs/sipb.mit.edu/project/chiron/chiron-scripts-venv/src/chiron-bot/chiron_bot/fetchers.pyt   fetch_and_parse_xml#   s    c           s   ‡  f d †  } | S(   u  
    Return a fetcher for a bugzilla instance

    >>> url, n = fetch_bugzilla("https://bugzilla.redhat.com")("123456")
    >>> url
    u'https://bugzilla.redhat.com/show_bug.cgi?id=123456'
    >>> n
    'System with Syntax - S635MP motherboard will not install'
    c           sO   d ˆ  |  f } t  | ƒ \ } } | j d ƒ } | rA | | f S| d f Sd S(   u   Inner Bugzilla fetcheru   %s/show_bug.cgi?id=%su0   string(//span[@id="short_desc_nonedit_display"])N(   R   t   xpatht   None(   t   ticketR   R   t   dummy_responset   title(   t   base_url(    sZ   /afs/sipb.mit.edu/project/chiron/chiron-scripts-venv/src/chiron-bot/chiron_bot/fetchers.pyt   bugzilla_fetcher9   s    
(    (   R   R   (    (   R   sZ   /afs/sipb.mit.edu/project/chiron/chiron-scripts-venv/src/chiron-bot/chiron_bot/fetchers.pyt   fetch_bugzilla/   s    
	c           s   ‡  f d †  } | S(   u¶  
    Return a fetcher for a Trac instance

    >>> url, n = fetch_trac("https://debathena.mit.edu/trac")("123")
    >>> url
    u'https://debathena.mit.edu/trac/ticket/123'
    >>> n
    u'debathena-ssl-certificates should include a CRL'
    >>> url, n = fetch_trac("https://scripts.mit.edu/trac")("123")
    >>> url
    u'https://scripts.mit.edu/trac/ticket/123'
    >>> n
    u'scripts-remove works poorly with non-Athena accounts'
    c           s}   d ˆ  |  f } t  j | d ƒ } | j d k ro t j | j j d ƒ ƒ } t | ƒ } | | j d d ƒ f S| d f Sd S(   u   Inner Trac fetcheru   %s/ticket/%su   ?format=csviÈ   u   
u   summaryN(	   R   R   t   status_codeR   t
   DictReadert   textt   splitt   nextR   (   R   R   R   t   readert   row(   R   (    sZ   /afs/sipb.mit.edu/project/chiron/chiron-scripts-venv/src/chiron-bot/chiron_bot/fetchers.pyt   trac_fetcherS   s    (    (   R   R    (    (   R   sZ   /afs/sipb.mit.edu/project/chiron/chiron-scripts-venv/src/chiron-bot/chiron_bot/fetchers.pyt
   fetch_tracD   s    
c           sI   ˆ  d k r ˆ ‰  n  ˆ d k r0 t j ƒ  ‰ n  ‡  ‡ ‡ f d †  } | S(   u¸  
    Return a fetcher for a Jira instance

    >>> fetch_jira("https://issues.apache.org")("ZOOKEEPER-1234")
    (u'https://issues.apache.org/jira/browse/ZOOKEEPER-1234', u'basic cleanup in LearnerHandler')

    Some Jira instances may use different hostnames for interactive usage than
    for API usage, for example due to using client certs for API authentication
    and some other mechanism for normal authentication. When the URLs differ,
    set the api_url option as well as the initial "url" parameter. You can also
    supply a custom `requests.Session` object with custom cookies, client
    certs, or other parameters needed to authenticate.

    For example:
    >>> def make_fetch_jira():
    ...     r = requests.Session()
    ...     r.verify = "/path/to/ca.pem"
    ...     r.cert = ("/path/to/public.crt", "/path/to/private.key")
    ...     return fetch_jira("https://jira.example.com", api_url="https://api.example.com", req=r)
    c           sj   d ˆ  |  f } d ˆ |  f } ˆ j  | ƒ } y | | j ƒ  d d f SWn t k
 re | d f SXd S(   u   Inner Jira fetcheru*   %s/jira/rest/api/2/issue/%s?fields=summaryu   %s/jira/browse/%su   fieldsu   summaryN(   R   t   jsont   KeyErrorR   (   R   t   full_apit   html_urlt   resp(   t   api_urlt   reqR   (    sZ   /afs/sipb.mit.edu/project/chiron/chiron-scripts-venv/src/chiron-bot/chiron_bot/fetchers.pyt   fetch{   s    N(   R   R   t   Session(   R   R'   R(   R)   (    (   R'   R(   R   sZ   /afs/sipb.mit.edu/project/chiron/chiron-scripts-venv/src/chiron-bot/chiron_bot/fetchers.pyt
   fetch_jira`   s    	
c           s   ‡  ‡ f d †  } | S(   u·   
    Return a fetcher for a Github instance

    >>> fetch_github("sipb", "chiron")("2")
    (u'https://github.com/sipb/chiron/issues/2', u'Teach debothena about its bugtracker')
    c           sc   d ˆ ˆ  |  f } t  j | ƒ } y" | j ƒ  d | j ƒ  d f SWn t k
 r^ | d f SXd S(   u   Inner GitHub fetcheru,   https://api.github.com/repos/%s/%s/issues/%su   html_urlu   titleN(   R   R   R"   R#   R   (   R   R   R   (   t   repot   user(    sZ   /afs/sipb.mit.edu/project/chiron/chiron-scripts-venv/src/chiron-bot/chiron_bot/fetchers.pyR)      s    "(    (   R-   R,   R)   (    (   R,   R-   sZ   /afs/sipb.mit.edu/project/chiron/chiron-scripts-venv/src/chiron-bot/chiron_bot/fetchers.pyt   fetch_githubˆ   s    c         C  sV   d |  f } t  | ƒ \ } } | j d ƒ } | sF | j d ƒ } n  | | pR d f S(   u  
    RFC fetcher

    >>> fetch_rfc("1234")
    (u'https://datatracker.ietf.org/doc/html/rfc1234', 'Tunneling IPX Traffic through IP Networks')
    >>> fetch_rfc("9300")
    (u'https://datatracker.ietf.org/doc/html/rfc9300', 'The Locator/ID Separation Protocol (LISP)')
    u+   https://datatracker.ietf.org/doc/html/rfc%su   string(//span[@class="h1"])u   string(//h1[@id="title"])N(   R   R   R   (   t   numberR   R   R   R   (    (    sZ   /afs/sipb.mit.edu/project/chiron/chiron-scripts-venv/src/chiron-bot/chiron_bot/fetchers.pyt	   fetch_rfc›   s    	u   https://bugzilla.redhat.comc         C  s‘   t  |  ƒ \ } } t d | | f ƒ | r: | d | f Sd |  } t | ƒ \ } } | j d ƒ } | rƒ | d | j ƒ  d f S| d f Sd S(   u´  
    CVE fetcher

    >>> url, n = fetch_cve("CVE-2015-1234")
    RHBZ url='https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2015-1234' title='CVE-2015-1234 chromium-browser: buffer overflow via race condition in GPU'
    >>> url
    u'https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2015-1234'
    >>> n
    u'[RHBZ] CVE-2015-1234 chromium-browser: buffer overflow via race condition in GPU'
    >>> url, n = fetch_cve("CVE-1999-0012")
    RHBZ url='https://bugzilla.redhat.com/show_bug.cgi?id=CVE-1999-0012' title='None'
    >>> url
    u'http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-1999-0012'
    >>> n
    u'\nSome web servers under Microsoft Windows allow remote attackers to bypass access restrictions for files with long file names.\n'
    >>> fetch_cve("CVE-1999-9000")
    RHBZ url='https://bugzilla.redhat.com/show_bug.cgi?id=CVE-1999-9000' title='None'
    (u'http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-1999-9000', None)
    u   RHBZ url='%s' title='%s'u   [RHBZ] u0   http://cve.mitre.org/cgi-bin/cvename.cgi?name=%su/   string(//tr[th="Description"]/following::tr[1])u   
N(   t   fetch_cve_rhbzt   printR   R   t   stripR   (   R   R   R   R   R   (    (    sZ   /afs/sipb.mit.edu/project/chiron/chiron-scripts-venv/src/chiron-bot/chiron_bot/fetchers.pyt	   fetch_cve­   s    
c         C  sI   d |  } t  | ƒ \ } } | j d ƒ } | r; | | f S| d f Sd S(   u¢   
    scripts.mit.edu FAQ fetcher

    >>> fetch_scripts_faq("136")
    (u'http://scripts.mit.edu/faq/136', u'Is scripts.mit.edu appropriate for my\xa0site?')
    u   http://scripts.mit.edu/faq/%su!   string(//h3[@class="storytitle"])N(   R   R   R   (   R   R   R   R   R   (    (    sZ   /afs/sipb.mit.edu/project/chiron/chiron-scripts-venv/src/chiron-bot/chiron_bot/fetchers.pyt   fetch_scripts_faqÐ   s    

c         C  sZ   d |  } t  j | ƒ } y" | j ƒ  d | j ƒ  d f SWn t k
 rU | d f SXd S(   u‰   
    Launchpad fetcher

    >>> fetch_launchpad("123456")
    (u'https://bugs.launchpad.net/bugs/123456', u'podcast crashes amarok')
    u$   http://api.launchpad.net/1.0/bugs/%su   web_linku   titleN(   R   R   R"   R#   R   (   R   R   R   (    (    sZ   /afs/sipb.mit.edu/project/chiron/chiron-scripts-venv/src/chiron-bot/chiron_bot/fetchers.pyt   fetch_launchpadß   s    
"c           s   ‡  f d †  } | S(   u÷   
    Debbugs (Debian bugtracker) fetcher

    >>> url, n = fetch_debbugs("https://bugs.debian.org")("123456")
    >>> url
    u'https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=123456'
    >>> n
    'ITP: eazel-engine -- Crux theme for GTK+'
    c           sO   d ˆ  |  f } t  | ƒ \ } } | j d ƒ } | rA | | f S| d f Sd S(   u   Inner Debbugs fetcheru   %s/cgi-bin/bugreport.cgi?bug=%su&   normalize-space(//h1/child::text()[2])N(   R   R   R   (   R   R   R   R   R   (   R   (    sZ   /afs/sipb.mit.edu/project/chiron/chiron-scripts-venv/src/chiron-bot/chiron_bot/fetchers.pyt   debbugs_fetcher÷   s    
(    (   R   R7   (    (   R   sZ   /afs/sipb.mit.edu/project/chiron/chiron-scripts-venv/src/chiron-bot/chiron_bot/fetchers.pyt   fetch_debbugsí   s    
	c         C  s}   d |  f } t  | ƒ \ } } d } | j | ƒ } | j d ƒ pF d } t d | f ƒ | rm | d } n | } | | f S(   u´   
    Debian Security Advisories fetcher

    >>> fetch_dsa("DSA-1234")
        -> DSA URLs in page: []
    (u'https://security-tracker.debian.org/tracker/DSA-1234', 'ruby1.6')
    u.   https://security-tracker.debian.org/tracker/%suL   //a[text()="Debian"]/@href[starts-with(.,"http://www.debian.org/security/")]u&   string(//tr[td/b="Description"]/td[2])u       -> DSA URLs in page: %si    N(   R   R   R   R2   (   R/   R   R   R   t	   dsa_xpatht   dsa_urlsR   t   dsa_url(    (    sZ   /afs/sipb.mit.edu/project/chiron/chiron-scripts-venv/src/chiron-bot/chiron_bot/fetchers.pyt	   fetch_dsa  s    c         C  sÙ   d } t  j | d ƒ } x³ | j j d ƒ D]Ÿ } | d d !d k r, | j d ƒ d d	 !\ } } yS t | ƒ t |  ƒ k r³ | d
 | d j | j d ƒ d j d ƒ d ƒ f f SWqË t k
 rÇ qË Xq, q, W| d f S(   u^  
    Pokemon fetcher (by Pokedex number) [broken]

    >>> url, n = fetch_pokemon("123")
    >>> url
    u'https://bulbapedia.bulbagarden.net/wiki/List_of_Pok%C3%A9mon_by_National_Pok%C3%A9dex_number'
    >>> n

    Previously returned
    u'Scyther (Bug, Flying)'
    but unfortunately Bulbapedia now seems to have bot-blocking from Cloudflare.
    u\   https://bulbapedia.bulbagarden.net/wiki/List_of_Pok%C3%A9mon_by_National_Pok%C3%A9dex_numberu   ?action=rawu   
i    i   u   {{rdex|u   |i   i   u   %s (%s)u   , u   }i   N(   R   R   R   R   t   intt   joint
   ValueErrorR   (   R   R   R   t   linet   numt   name(    (    sZ   /afs/sipb.mit.edu/project/chiron/chiron-scripts-venv/src/chiron-bot/chiron_bot/fetchers.pyt   fetch_pokemon  s    ;c         C  sR   d |  f } t  | ƒ \ } } | j d ƒ } | rD | | j ƒ  f S| d f Sd S(   uÆ   
    MIT class fetcher

    >>> url, n = fetch_mit_class("6.1810")
    >>> url
    u'http://student.mit.edu/catalog/search.cgi?search=6.1810'
    >>> n
    '6.1810 Operating System Engineering'
    u3   http://student.mit.edu/catalog/search.cgi?search=%su   string(//h3)N(   R   R   R3   R   (   R   R   R   R   R   (    (    sZ   /afs/sipb.mit.edu/project/chiron/chiron-scripts-venv/src/chiron-bot/chiron_bot/fetchers.pyt   fetch_mit_class0  s    
c         C  sS   d |  f } t  | ƒ \ } } | j d ƒ } | rC | j ƒ  } n  | | pO d f S(   uª   
    whats fetcher (MIT SIPB acronym database)

    >>> fetch_whats("SIPB")
    (u'https://stuff.mit.edu/cgi/whats.cgi?SIPB', 'Student Information Processing Board')
    u&   https://stuff.mit.edu/cgi/whats.cgi?%su   string(//dl/dd)N(   R   R   R3   R   (   t   whatsR   R   R   R   (    (    sZ   /afs/sipb.mit.edu/project/chiron/chiron-scripts-venv/src/chiron-bot/chiron_bot/fetchers.pyt   fetch_whatsB  s    c      	   C  s†   d } t  | ƒ \ } } t | j d ƒ ƒ j j ƒ  } t d d d d d d d	 d
 g ƒ } t t j | ƒ ƒ } | d | | | f f S(   u@   Generate a random fake Debathena package name and file to divertu9   http://debathena.mit.edu/trac/wiki/PackageNamesWeDidntUseu   id("content")//liu   /etcu   /binu   /usr/binu   /sbinu	   /usr/sbinu   /dev/mapperu   /etc/defaultu   /var/runu   %s should divert %s/%s(   R   R   R   R   R3   t   ost   listdir(   R   R   R   R   t   packaget	   directoryt   filename(    (    sZ   /afs/sipb.mit.edu/project/chiron/chiron-scripts-venv/src/chiron-bot/chiron_bot/fetchers.pyt   undebathena_funP  s    c         C  sV   d } d
 d |  f d f } t  j | d | ƒ} d } d	 | j | f } | j | f S(   uÁ  
    Bible fetcher using esvapi.org v2

    #>>> fetch_bible_esvapi2("John 4:8")
    #(u'http://www.esvapi.org/v2/rest/passageQuery?key=TEST&passage=John+4%3A8&output-format=plain-text', u'\n=======================================================\nJohn 4:8\n   [8](For his disciples had gone away into the city to buy food.) (ESV)\n(From The Holy Bible, English Standard Version. See http://www.crosswaybibles.org and http://www.esvapi.org/.)')
    u*   http://www.esvapi.org/v2/rest/passageQueryu   keyu   TESTu   passageu   output-formatu
   plain-textt   paramsun   (From The Holy Bible, English Standard Version. See http://www.crosswaybibles.org and http://www.esvapi.org/.)u   
%s
%s(   u   keyu   TEST(   u   output-formatu
   plain-text(   R   R   R   R   (   t   verseR   RM   R   t   copyright_msgR   (    (    sZ   /afs/sipb.mit.edu/project/chiron/chiron-scripts-venv/src/chiron-bot/chiron_bot/fetchers.pyt   fetch_bible_esvapi2Z  s    u.   (?P<book>(\d+ )?[0-9a-z]+) (?P<verse>[0-9:-]+)u   [ ]*
[ ]*c           s   ‡  f d †  } | S(   uz  
    Bible fetcher, using ibibles.net

    >>> fetch_ibibles("niv")("mat 5:3-4") #doctest:+NORMALIZE_WHITESPACE,+ELLIPSIS
    (u'https://ibibles.net/quote.php?niv-mat/5:3-4',
     u'"Blessed are the poor in spirit, ..., for they will be comforted.')
    >>> fetch_ibibles("kjv")("Matthew 5:3") #doctest:+NORMALIZE_WHITESPACE
    (u'https://ibibles.net/quote.php?kjv-Matthew/5:3',
     u'Blessed are the poor in spirit: for theirs is the kingdom of heaven.')
    >>> fetch_ibibles("niv")("1 Timothy 3:9") #doctest:+NORMALIZE_WHITESPACE
    (u'https://ibibles.net/quote.php?niv-1 Timothy/3:9',
     u'They must keep hold of the deep truths of the faith with a clear conscience.')
    >>> fetch_ibibles("niv")("1ti 3:9") #doctest:+NORMALIZE_WHITESPACE
    (u'https://ibibles.net/quote.php?niv-1ti/3:9',
     u'They must keep hold of the deep truths of the faith with a clear conscience.')
    c           s“   t  j |  ƒ } | s d Sˆ  | j d ƒ | j d ƒ f } d | } t | ƒ \ } } | j d ƒ } t j t d d j	 | ƒ j
 ƒ  ƒ } | | f S(	   u   Inner ibibles fetcheru   booku   verseu&   https://ibibles.net/quote.php?%s-%s/%su   //body/text()u   
u    N(   NN(   t   BIBLE_REt   matchR   t   groupR   R   t   ret   subt   STRIP_NL_RER>   R3   (   t
   full_verset   parsed_verseRM   R   R   R   t   bodyR   (   t   translation(    sZ   /afs/sipb.mit.edu/project/chiron/chiron-scripts-venv/src/chiron-bot/chiron_bot/fetchers.pyt   ibibles_fetcher  s    !
$(    (   RZ   R[   (    (   RZ   sZ   /afs/sipb.mit.edu/project/chiron/chiron-scripts-venv/src/chiron-bot/chiron_bot/fetchers.pyt   fetch_ibiblesm  s    c         C  s[   d |  f } t  | ƒ \ } } | j d ƒ } | rM | j d k rM | | f S| d f Sd S(   uj   
    XKCD fetcher

    >>> fetch_xkcd("123")
    (u'http://xkcd.com/123/', 'xkcd: Centrifugal Force')
    u   http://xkcd.com/%s/u   string(//title)iÈ   N(   R   R   R   R   (   t   comicR   R   R   R   (    (    sZ   /afs/sipb.mit.edu/project/chiron/chiron-scripts-venv/src/chiron-bot/chiron_bot/fetchers.pyt
   fetch_xkcdŽ  s    
c         C  s‰   d |  f } t  | ƒ \ } } | j d ƒ } t d | | j f ƒ | r{ | j d k r{ | | d t t |  d ƒ ƒ f S| d f Sd S(   uÏ  
    Unicode fetcher (number->char)

    This would work with a browser, but we seem to be blocked by Cloudflare
    now, so Chiron's Unicode support seems to be broken. So, uh, test that it
    hasn't resumed working.

    >>> url, n = fetch_unicode("2603")
    Unicode: 'Unicode Character 'SNOWMAN' (U+2603)' '200'
    >>> url
    u'https://www.fileformat.info/info/unicode/char/2603/index.htm'
    >>> n
    u"Unicode Character 'SNOWMAN' (U+2603): \u2603"
    u:   https://www.fileformat.info/info/unicode/char/%s/index.htmu   string(//title)u   Unicode: '%s' '%s'iÈ   u   : i   N(   R   R   R2   R   t   unichrR=   R   (   t	   codepointR   R   R   R   (    (    sZ   /afs/sipb.mit.edu/project/chiron/chiron-scripts-venv/src/chiron-bot/chiron_bot/fetchers.pyt   fetch_unicode  s    !c         C  sw   t  t |  ƒ d ƒ } d | f } t | ƒ \ } } | j d ƒ } | rb | j d k rb | | f S| d | f f Sd S(   uç   
    Unicode fetcher (char->number)

    >>> url, n = fetch_unicode_char("áˆ´")
    >>> url
    u'https://www.fileformat.info/info/unicode/char/1234/index.htm'
    >>> n
    "Unicode Character 'ETHIOPIC SYLLABLE SEE' (U+1234)"
    u   xu:   https://www.fileformat.info/info/unicode/char/%s/index.htmu   string(//title)iÈ   u   U+%sN(   t   formatt   ordR   R   R   (   t	   characterR`   R   R   R   R   (    (    sZ   /afs/sipb.mit.edu/project/chiron/chiron-scripts-venv/src/chiron-bot/chiron_bot/fetchers.pyt   fetch_unicode_charµ  s    

c         C  s‰   d |  f } t  | ƒ \ } } | j d ƒ } | j d ƒ } | r{ | j d k r{ | rk d | | f } n | } | | f S| d f Sd S(   uñ   
    Airport fetcher (code->location)

    >>> url, n = fetch_airport("BOS")
    >>> url
    u'http://www.gcmap.com/airport/BOS'
    >>> n
    u'Boston, Massachusetts, United States (General Edward Lawrence Logan International Airport)'
    u   http://www.gcmap.com/airport/%su.   string(//meta[@name="geo.placename"]/@content)u   string(//td[@class="fn org"])iÈ   u   %s (%s)N(   R   R   R   R   (   t   codeR   R   R   t   placeRB   R   (    (    sZ   /afs/sipb.mit.edu/project/chiron/chiron-scripts-venv/src/chiron-bot/chiron_bot/fetchers.pyt   fetch_airportÈ  s    

c         C  s   d S(   u1   Fetcher to reduce misdirected Guild office combosu   NO COMBOS OVER ZEPHYRu    DO @b(NOT) ASK FOR OR SEND THE OFFICE COMBO
OVER ZEPHYR, EVEN PERSONAL ZEPHYR.
Instead, look in /mit/assassin/Office. If you don't have access,
ask to be added.(   u   NO COMBOS OVER ZEPHYRu    DO @b(NOT) ASK FOR OR SEND THE OFFICE COMBO
OVER ZEPHYR, EVEN PERSONAL ZEPHYR.
Instead, look in /mit/assassin/Office. If you don't have access,
ask to be added.(    (   t   _ticket(    (    sZ   /afs/sipb.mit.edu/project/chiron/chiron-scripts-venv/src/chiron-bot/chiron_bot/fetchers.pyt   deal_with_assassinâ  s     c         C  s   d S(   u   "Science" ASCII art fetcheru   SCIENCE!uÔ   
  ____   ____ ___ _____ _   _  ____ _____
 / ___| / ___|_ _| ____| \ | |/ ___| ____|
 \___ \| |    | ||  _| |  \| | |   |  _|
  ___) | |___ | || |___| |\  | |___| |___
 |____/ \____|___|_____|_| \_|\____|_____|
(   u   SCIENCE!uÔ   
  ____   ____ ___ _____ _   _  ____ _____
 / ___| / ___|_ _| ____| \ | |/ ___| ____|
 \___ \| |    | ||  _| |  \| | |   |  _|
  ___) | |___ | || |___| |\  | |___| |___
 |____/ \____|___|_____|_| \_|\____|_____|
(    (   Ri   (    (    sZ   /afs/sipb.mit.edu/project/chiron/chiron-scripts-venv/src/chiron-bot/chiron_bot/fetchers.pyt   invoke_scienceê  s     c         C  s
   |  d f S(   u*   "Debothena" ASCII art fetcher, for testinguÝ   
â•ºâ”³â”“â”â”â•¸â”â”“ â”â”â”“â•ºâ”³â•¸â•» â•»â”â”â•¸â”â”“â•»â”â”â”“
 â”ƒâ”ƒâ”£â•¸ â”£â”»â”“â”ƒ â”ƒ â”ƒ â”£â”â”«â”£â•¸ â”ƒâ”—â”«â”£â”â”«
â•ºâ”»â”›â”—â”â•¸â”—â”â”›â”—â”â”› â•¹ â•¹ â•¹â”—â”â•¸â•¹ â•¹â•¹ â•¹
(    (   R   (    (    sZ   /afs/sipb.mit.edu/project/chiron/chiron-scripts-venv/src/chiron-bot/chiron_bot/fetchers.pyt   invoke_debothenaõ  s    (4   t   __doc__t
   __future__R    R   RG   RT   t   syst   randomR   t   lxmlR   R   t   version_infot   majort	   backportsR   R_   t	   NameErrort   exct   chrt
   HTMLParserR   R   R   R!   R   R+   R.   R0   R1   R4   R5   R6   R8   R<   RC   RD   RF   RL   RP   t   compilet
   IGNORECASERQ   RV   R\   R^   Ra   Re   Rh   Rj   Rk   Rl   (    (    (    sZ   /afs/sipb.mit.edu/project/chiron/chiron-scripts-venv/src/chiron-bot/chiron_bot/fetchers.pyt   <module>   sT   
			(			#								
		!						