learn-co-curriculum / scraping-reading

Other
0 stars 158 forks source link

CSS selectors won't work, the class and id attributes are not up-to-date #32

Closed gnappo1 closed 5 years ago

gnappo1 commented 5 years ago

The styling for the page changed over time and the snippets of code are no longer valid!

For example, in order to get the headline <h1 class="headline-26OIBN">Change things.</h1>, the right selector is no longer:

doc.css(".site-header__hero__headline")

but instead:

doc.css(".headline-26OIBN")

Of course, in order to get to the text inside the h1 tag, we can trail a .text to the previous command 👍🏻

sgharms commented 5 years ago

Awesome work! Thanks! Will merge your PR in!