(self)
return "<%s: %s>" % (self.__class__.__name__, ", ".join(details_strs))
String representation of extracted results.
String representation of extracted results.
String representation of extracted results .
def __repr__(self):
        "String representation of extracted results."
        details = (("title", self.titles),
                   ("url", self.urls),
                   ("image", self.images),
                   ("videos", self.videos),
                   ("description", self.descriptions),
                   ("feed", self.feeds),
                   )

        details_strs = []
        max_shown = 50
        for name, values, in details:
            if values:
                value = values[0]
                count = len(values)
                if count -1 > 0:
                    details_strs.append("(%s: '%s', %s more)" % (name, value[:max_shown], count-1))
                else:
                    details_strs.append("(%s: '%s')" % (name, value[:max_shown]))

        return "<%s: %s>" % (self.__class__.__name__, ", ".join(details_strs))
def __repr__ ( self ) : details = ( ( "title" , self . titles ) , ( "url" , self . urls ) , ( "image" , self . images ) , ( "videos" , self . videos ) , ( "description" , self . descriptions ) , ( "feed" , self . feeds ) , ) details_strs = [ ] max_shown = 50 for name , values , in details : if values : value = values [ 0 ] count = len ( values ) if count - 1 > 0 : details_strs . append ( "(%s: '%s', %s more)" % ( name , value [ : max_shown ] , count - 1 ) ) else : details_strs . append ( "(%s: '%s')" % ( name , value [ : max_shown ] ) ) return "<%s: %s>" % ( self . __class__ . __name__ , ", " . join ( details_strs ) )