How to Replicate Jupyter Notebook Content Using a JSON File
Have you ever found yourself stuck trying to download a #JupyterNotebook from a website that doesn't allow it? Fear not! With this simple method, you can easily replicate the notebook's content using a #JSON file.
To get started, open the web page with the embedded Jupyter Notebook in your web browser, and right-click anywhere on the page to select "Inspect" or "Inspect Element" from the context menu. This will open the browser's #developertools.
In the developer tools, switch to the "Network" tab and refresh the page to capture all the network #requests made by the page. Look for a request with a URL that contains the name of the notebook - this is likely the request for the notebook file, and the name will usually contain common words with the one displayed at the top of the notebook.
Filter the requests by typing anything in the filter box (“guidelines” in this case). Click on the request to select it and then look for the "Response" tab in the right-hand panel. This should display the contents of the notebook file. Right-click on the contents of the notebook file and select "Save as" or "Save response as". Choose a location on your computer to save the file.
Once you have the JSON file, you can easily replicate the content of the Jupyter Notebook using #Python. Simply open the JSON file and load its contents into a variable using the json package. Next, convert the JSON data into a Pandas DataFrame using the pd.json_normalize method. Finally, iterate over each row of the DataFrame, displaying the Markdown and code cells using the display function from the IPython.display module.