ó
OYc           @   sJ   d  d l  Z  d  d l Z d  d l Z d  d l m Z d   Z d   Z d S(   i˙˙˙˙N(   t
   strip_tagsc         C   s.   t  |   } t j d |  } t |  } | S(   Ns   \w+(   R    t   ret   findallt   len(   t   html_stringt   word_stringt   matching_wordst   count(    (    s=   /home/octaedro/webapps/api_horoscopo/src/predictions/utils.pyt   count_words	   s    c         C   s)   t  |   } t j | d  } t |  S(   Ng      i@(   R   t   matht   ceilt   int(   R   R   t   read_time_min(    (    s=   /home/octaedro/webapps/api_horoscopo/src/predictions/utils.pyt   get_read_time   s    (   t   datetimeR	   R   t   django.utils.htmlR    R   R   (    (    (    s=   /home/octaedro/webapps/api_horoscopo/src/predictions/utils.pyt   <module>   s
   	
