Skip to content

Scraper is broken "How to Convert Python HTML to Jupyter NB" references a missing tag... https://github.com/marsja/jupyter/blob/master/convert_html_jupyter_notebook_tutorial.ipynb #2

@richlysakowski

Description

@richlysakowski

The example on the website below does not work, because the article calls out a tag "post-content" that does not exist in the WordPress page.

The example does not scrape anything because "post-content" is missing from the Response object. The result of the "get_data()" function is a None object.

https://www.marsja.se/converting-html-to-a-jupyter-notebook/
https://github.com/marsja/jupyter/blob/master/convert_html_jupyter_notebook_tutorial.ipynb

The article needs to be updated so that the scraper actually works.

Here's where the article references the tag to parse.

5. Getting the Code Elements from the HTML

In the last step, we are creating a Python function called get_code. This function will take two arguments. First, the beautifulsoup object, we earlier created, and the content_class to search for content in. In the case, of this particular WordPress, blog this will be "post-content"


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions