def download_file(self, doc): url = doc.get('URL') if not url: return if url.startswith('data'): return download_file_from_encoded_str(url) else: return download_file_from_url(url)
def download_file(self, doc): url = doc.get('URL') if not url: return if url.startswith('data'): return download_file_from_encoded_str(url) else: return download_file_from_url(url)