Html download not possible

HI,
Im not able o download an html file into my Jupyter/Jovian/Binder files_Sources

My Code (simple urllib:
import urllib.request
urllib.request.urlretrieve(‘SEC FORM 13-F Information Table’,
‘2020-02-14.html’)

Describe what happens when you try to run this code.

This works for me,

import urllib.request
urllib.request.urlretrieve('https://www.sec.gov/Archives/edgar/data/1536411/000153641119000009/xslForm13F_X01/form13f_20190930.xml','myfile.html')

Can you describe what is the error you are facing?

the file doesn’t appear in my Jovian Proejct Notebook_Files
I run it on Binder and I saved in my Jovian Notebook but it doesnt appear.

Maybe xml files are not allowed?

MyProject:

You have to explicitly state which files you would like to have uploaded along with your notebook.

You can do so by using files argument of jovian.commit() function:

jovian.commit(..., files=["nazwa.xml"], ...)

To add to this, you can save this file as an HTML file and upload it as HTML file i.e,
jovian.commit(..., files=["nazwa.html"], ...)

This Error I get during saving proccess…with .xml and .html any further idea? thanks a lot for your support
[jovian] Error: File upload failed: (HTTP 400) Invalid filename or extension (myfile.xml)

You need to be sure that the file downloaded by urllib has the same name (and extension) you provide to files argument.

1 Like

It seems we currently don’t have support to upload HTML or XML file to files or there is some issue here, I will refer this back to the team, thanks for informing. In the meantime, you can still upload these files on the outputs section of the jovian notebook.


2 Likes

thanks birajde / thanks Sebgolos,
so I dont have tomatoes on my eyes :slight_smile:

I will use the workarround with the output section meanwhile

2 Likes

This might be intentional by the team too, as HTML/XML are output files we can get from a project or notebook.