(self, sr, progress_updater=None)
return binary data or None
return binary data or None
return binary data or None
def download(self, sr, progress_updater=None):
        """ return binary data or None"""
        fetcher_inst = self.fetcher_cls(sr)

        succ = fetcher_inst.download(progress_updater)
        if not succ:
            return None

        data = fetcher_inst.get_data()
        ft = check_buf_pdf(data)
        if ft == True:
            ft = check_legal_pdf(data)
            if ft == True:
                return data
            else:
                log_err("Found a broken pdf")
        else:
            log_err("Wrong Format.")
def download ( self , sr , progress_updater = None ) : fetcher_inst = self . fetcher_cls ( sr ) succ = fetcher_inst . download ( progress_updater ) if not succ : return None data = fetcher_inst . get_data ( ) ft = check_buf_pdf ( data ) if ft == True : ft = check_legal_pdf ( data ) if ft == True : return data else : log_err ( "Found a broken pdf" ) else : log_err ( "Wrong Format." )