This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'nokogiri' | |
require 'open-uri' | |
html_data = open('https://www.nytimes.com/2020/06/15/technology/restaurants-coronavirus.html').read | |
nokogiri_object = Nokogiri::HTML(html_data) | |
related_posts = nokogiri_object.css("div.recirculation > h3 > a") | |
related_posts.each do |related_post| | |
puts related_post.text | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"request": { | |
"options": [ | |
"format=json" | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="Drawing Shapes W/ D3 -"/> | |
<meta charset="utf-8"> | |
<title>Bar Chart Features</title> | |
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script> | |
<script src="http://d3js.org/topojson.v1.min.js"></script> | |
<style type="text/css"> |