sportsref/nfl/teams.py
def _year_info_pq(self, year, keyword):
        """Returns a PyQuery object containing the info from the meta div at
        the top of the team year page with the given keyword.

        :year: Int representing the season.
        :keyword: A keyword to filter to a single p tag in the meta div.
        :returns: A PyQuery object for the selected p element.
        """
        doc = self.get_year_doc(year)
        p_tags = doc('div#meta div:not(.logo) p')
        texts = [p_tag.text_content().strip() for p_tag in p_tags]
        try:
            return next(
                pq(p_tag) for p_tag, text in zip(p_tags, texts)
                if keyword.lower() in text.lower()
            )
        except StopIteration:
            if len(texts):
                raise ValueError('Keyword not found in any p tag.')
            else:
                raise ValueError('No meta div p tags found.')
def _year_info_pq(self, year, keyword):
        doc = self.get_year_doc(year)
        p_tags = doc('div#meta div:not(.logo) p')
        texts = [p_tag.text_content().strip() for p_tag in p_tags]
        try:
            return next(
                pq(p_tag) for p_tag, text in zip(p_tags, texts)
                if keyword.lower() in text.lower()
            )
        except StopIteration:
            if len(texts):
                raise ValueError('Keyword not found in any p tag.')
            else:
                raise ValueError('No meta div p tags found.')
def _year_info_pq ( self , year , keyword ) : doc = self . get_year_doc ( year ) p_tags = doc ( 'div#meta div:not(.logo) p' ) texts = [ p_tag . text_content ( ) . strip ( ) for p_tag in p_tags ] try : return next ( pq ( p_tag ) for p_tag , text in zip ( p_tags , texts ) if keyword . lower ( ) in text . lower ( ) ) except StopIteration : if len ( texts ) : raise ValueError ( 'Keyword not found in any p tag.' ) else : raise ValueError ( 'No meta div p tags found.' )
Returns a PyQuery object containing the info from the meta div at
        the top of the team year page with the given keyword.

        :year: Int representing the season.
        :keyword: A keyword to filter to a single p tag in the meta div.
        :returns: A PyQuery object for the selected p element.
Returns a PyQuery object containing the info from the meta div at the top of the team year page with the given keyword .