learn-co-curriculum / scraping-reading

Other
0 stars 158 forks source link

Lab needs serious help! #30

Closed marysue closed 5 years ago

marysue commented 5 years ago

I spent way too much time trying to figure out how you knew how to grab the text of the field.

The confusing part of this lab was that you magically extracted the text from the objects without letting us know how you did it. Compounding this problem was the fact that your website has changed so much that your example couldn't be replicated in our own environment.

After reviewing the http://ruby.bastardsbook.com/chapters/html-parsing/ link, it became obvious how you extracted the text.

I have a few suggestions to improve this page:

  1. Provide some mapping to method names that extract certain element attributes. For example, doc.search("span.family").text accesses the innerHTML of the DOM element. That where you have innerHTML, you have access via the .text method of Nokogiri's class.
  2. Speak a little bit to accessing other areas of the DOM elements. For instance - how would you acccess the image name in an img tag ... or the caption in a fig. List a few examples for doing so. Where would you find this information?
  3. Jump into the bastardsbook sooner.
  4. Perhaps make Avi's video at the bottom of this reading an embedded video within this lesson. Better yet, because you know this is a particularly difficult section, have Avi create an intro video to scraping. [If you do this -- email me! I WANT TO WATCH IT!!!]
maxwellbenton commented 5 years ago

Hi @marysue,

Thank you for this thorough feedback. We are in the process of updating this section of material. While we have not been able to incorporate all of your feedback, we've updated this lesson so that the examples and images are up to date with our current website, the lesson speaks more on the use of .text, and goes into greater depth on how to interact with Nokogiri's XML nodes, including how to access other attributes from the scraped HTML. We're also flagging this lesson for additional graphics to be created and are looking at potentially adding more content to support this material.

We apologize for any frustration you might have encountered during this process but thank you for helping us ensure that those who follow in your path will not encounter the same problems that you faced.

If you do not believe that this issue has been addressed, please re-open this issue. 💙