Closed SohrabAmin closed 4 years ago
Not directly, but it takes a file-like object, so you can do something like
import requests
r = requests.get(path)
if not r.status_code < 300: #TODO: Make this better..., should only accept success
raise RuntimeError(f'Could not get file {path}, HTTP {r.status_code}')
fileName = path.split('?')[0]
fileName = fileName.split('/')[-1]
fileLike = io.StringIO(r.text)
fileLike.name = path
When using
upload()
do we have the ability to give a URL as mdFile so it works almost like a web clipper?