Code Monkey home page Code Monkey logo

scraping-flatiron-code-along's Issues

"magnifying glass"

learn text refers to a "magnifying glass symbol" under the dev tools in google chrome, which is now a symbol of a mouse cursor in a box (page also refers to "inspect element" which is now "inspect" in current version of Google Chrome). easily google-able for students who get confused, but thought i'd point it out in case revisions are underway :)

Spelling error in text

For each iteration over the collection of Nokogiri XML elements returned to use [should be "us"] by the doc.css(".post") line, we are making a new instance of the Course class and giving that instance the title, schedule and description extracted from the XML.

#print_courses method is missing

The curriculum mentions that a #print_courses method was provided as a 'freebie' for this lab in the scraper.rb file. However, this is no #print_courses method already predefined in the scraper.rb file. Near the end of the lab, the curriculum asks students to run Scraper.new.print_courses but again, there is no method defined for #print_courses until you scroll to the bottom of the curriculum, where a screenshot shows the #print_courses method as:

def print_courses
self.make_courses
Course.all.each do |course|
if course.title
puts "Title: #{course.title}"
puts " Schedule: #{course.schedule}"
puts " Description: #{course.description}"
end
end
end

"cannot load such file -- nokogiri (Load Error)" on Learn IDE 3.7.0 and Windows 10 64-bit

A student couldn't proceed with the lab because she was running into the above error. Uninstalling and re-installing nokogiri (various versions between 1.6-1.8) proved unsuccessful. I made sure that we removed the lab and re-cloned it to start fresh, but the issue persisted.

Creating this issue in case another Windows user with the new IDE has the same problem. See screenshot below for details.

aa3f9b77-04b6-4e54-966d-42613c047574

issue with output

Hello, I was trying to follow along with this lesson but was having issues producing the same Nokogiri output on my end. Gabe Jackson helped me figure out that I needed to chain a ".inspect" method on the end of the code in my editor in order for it to work. So for example the below code should have ".inspect" at the end for me to have the same output that the lesson is saying I should be seeing.

require 'nokogiri'
require 'open-uri'

doc = Nokogiri::HTML(open("http://flatironschool.com/"))

doc.css(".grey-text")

puts doc.css(".grey-text")

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.