Ñò
‘wwJc           @   s€   d  d k  Z  d  d k l Z d „  Z d „  Z d „  Z d „  Z e e d ƒ ƒ Z e i d ƒ Z x e D] Z	 e e	 ƒ qh Wd S(	   iÿÿÿÿN(   t   BeautifulSoupc         C   s6   d G|  GHt  i d |  ƒ } | i ƒ  } | i ƒ  | S(   Ns   <<s   http://nomic.bob-space.com/(   t   urllibt   urlopent   readt   close(   t   patht   ft   z(    (    s   scrap.pyt   grab   s
    	
c         C   s3   d G|  GHt  |  d ƒ } | i | ƒ | i ƒ  d  S(   Ns   >>t   w(   t   opent   writeR   (   R   t   textR   (    (    s   scrap.pyR      s    	c         C   s   d  S(   N(    (   t   x(    (    s   scrap.pyt	   plaintext   s    c         C   st   t  |  i d ƒ ƒ d j o d  SxL |  i d ƒ D]; } g  } | i d ƒ D] } | t | ƒ qK ~ } | GHq1 Wd  S(   Nt   tablei    t   trt   td(   t   lent   findAllR   (   t   tR   t   _[1]R   t   stuff(    (    s   scrap.pyt   tbl   s      0s    agoralog.aspx?contract=AccountorR   (
   R   R    R   R   R   R   t   soupR   t   tablesR   (    (    (    s   scrap.pyt   <module>   s   				  
