Skip to content
Advertisement

How can I scrape an apple HTML page using python?

I am trying to scrape the h2 tag below from the apple page in the python 3.10.6 code further below. I can see the h2 tag on the page; but my python running on PyCharm 2022.1.4 is unable to scrape it. episode-shelf-header is a unique class in the html code on this page.

I did search for a solution to this but was unable to find one.

Can anyone help?

JavaScript
JavaScript

Advertisement

Answer

  1. Value can be extracted directly from Selenium.
  2. You must wait for the page to fully load.

There is a sample code to extract the final value.

JavaScript

note: selenium version: selenium 4.3.0

Advertisement