(self, ctx, sr)
return True
run this parser against the SearchResult given
            return True/False indicate success,
            will update ctx metadata and ctx.success,

            on success, either ctx will be filled with fetched data,
                        or ctx.existing will contain a existing doc in db.
run this parser against the SearchResult given
            return True/False indicate success,
            will update ctx metadata and ctx.success,
run this parser against the SearchResult given return True / False indicate success will update ctx metadata and ctx . success
def fetch_info(self, ctx, sr):
        """ run this parser against the SearchResult given
            return True/False indicate success,
            will update ctx metadata and ctx.success,

            on success, either ctx will be filled with fetched data,
                        or ctx.existing will contain a existing doc in db.
        """
        url = sr.url
        log_info("Parsing url {0} with parser {1}".
                 format(url, self.name))
        fetcher_inst = self.cb(sr)
        if fetcher_inst is None:
            return False

        newt = fetcher_inst.get_title()
        if newt and ctx.update_new_title(newt):
            # check updated title against db before download
            if ukconfig.USE_DB:
                doc = search_exact(newt)
                if doc:
                    ctx.existing = doc[0]
                    ukdbconn.update_meta(doc[0]['_id'], fetcher_inst.get_meta())
                    return True
        meta = fetcher_inst.get_meta()
        if len(meta):
            log_info("Fetcher {} Update Metadata: {}".format(
                fetcher_inst.name, str(meta.keys())))
        ctx.update_meta_dict(meta)
        return True
def fetch_info ( self , ctx , sr ) : url = sr . url log_info ( "Parsing url {0} with parser {1}" . format ( url , self . name ) ) fetcher_inst = self . cb ( sr ) if fetcher_inst is None : return False newt = fetcher_inst . get_title ( ) if newt and ctx . update_new_title ( newt ) : # check updated title against db before download if ukconfig . USE_DB : doc = search_exact ( newt ) if doc : ctx . existing = doc [ 0 ] ukdbconn . update_meta ( doc [ 0 ] [ '_id' ] , fetcher_inst . get_meta ( ) ) return True meta = fetcher_inst . get_meta ( ) if len ( meta ) : log_info ( "Fetcher {} Update Metadata: {}" . format ( fetcher_inst . name , str ( meta . keys ( ) ) ) ) ctx . update_meta_dict ( meta ) return True