示例#1
0
 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)
示例#2
0
 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)