top-headlines 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1542f55042bc77f2f1aa23ecd4c89abb2c0ec9b8
4
- data.tar.gz: 4850f0ae649a5d26a92bee8798fa4ba4d7299cde
3
+ metadata.gz: 1159c61e226c3264f1b8b085f7f402c35a555af7
4
+ data.tar.gz: a29e19f809175670c4cfa7e72a3438a926f409a1
5
5
  SHA512:
6
- metadata.gz: ad8ae4281a36bb7e7d6e8be29277998b62c46832b1918e5939839731a8234cb5bde867c8d04652047281ff15749d1234fa1c9b8d2a65e26d4dcd448e39d6d9cb
7
- data.tar.gz: f583a444d894e18090028ce75ee4551f113a42a7c620ee0ade4d43ae6807032ff95dc0a2224d594f40d61d8d00aeb16b31a747cdfaea164cde6f8f7f49f31973
6
+ metadata.gz: 1cc7677079f423bbc771a1009a8b949bc96c007e6b4accbb001651bae28f481699de793d3114385b947eeccfb73075fc3046196e22db4c348de28064cc347558
7
+ data.tar.gz: 94fccc97187efd5c63f15a285a6d3c36d9145a379d3b78661a7b04cf441b1b20799b3a7efec482d055b46b1646c282e1c2dac27943bf534f65195534a4048053
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # TopHeadlines
2
2
 
3
- This gem allows users to view the top headlines from major news sources. Users can open the headlines directly from the command line. Functionality includes: BBC, Bloomberg, CNN, FiveThirtyEight, Forbes, Fox News, The Guardian, Huffington Post, MSNBC, New York Times, Politico, Wall Street Journal, and Washington Post.
3
+ This gem allows users to view the top headlines from major news sources. Users can open the headlines directly from the command line. Functionality includes: BBC, Bloomberg, CNN, The Daily Beast, FiveThirtyEight, Forbes, Fox News, The Guardian, Huffington Post, MSNBC, New York Times, Politico, Wall Street Journal, Washington Post, and Yahoo.
4
4
 
5
5
  ## Installation
6
6
 
@@ -136,11 +136,11 @@ class TopHeadlines::CLI
136
136
  ``..------...`
137
137
 
138
138
 
139
- Image: VectorStock (https://www.vectorstock.com/royalty-free-vector/bye-goodbye-vector-6122218)
140
- ASCII Image Conversion: Patrik Roos (http://www.text-image.com/convert/ascii.html)
139
+ Image: VectorStock (https://www.vectorstock.com/royalty-free-vector/bye-goodbye-vector-6122218)
140
+ ASCII Image Conversion: Patrik Roos (http://www.text-image.com/convert/ascii.html)
141
141
 
142
- TopHeadlines Gem made by Zach Newburgh (http://www.zachnewburgh.com/)
143
- Copyright © 2016 Zach Newburgh
142
+ TopHeadlines Gem made by Zach Newburgh (http://www.zachnewburgh.com/)
143
+ Copyright © 2016 Zach Newburgh
144
144
 
145
145
  DOC
146
146
 
@@ -69,8 +69,8 @@ class TopHeadlines::Source
69
69
  },
70
70
  "WASHINGTON POST" => {
71
71
  url: "https://www.washingtonpost.com/",
72
- headlines_selector: "section#main-content a",
73
- urls_selector: "section#main-content",
72
+ headlines_selector: "section#main-content div[class*='headline'] a",
73
+ urls_selector: "section#main-content div[class*='headline']",
74
74
  child_selector: "a"
75
75
  },
76
76
  "BBC" => {
@@ -78,6 +78,18 @@ class TopHeadlines::Source
78
78
  headlines_selector: "div.column--primary span.title-link__title-text",
79
79
  urls_selector: "div.column--primary",
80
80
  child_selector: "a.title-link"
81
+ },
82
+ "THE DAILY BEAST" => {
83
+ url: "http://www.thedailybeast.com/",
84
+ headlines_selector: "li.cheat h3",
85
+ urls_selector: "li.cheat",
86
+ child_selector: "a:nth-child(2)"
87
+ },
88
+ "YAHOO" => {
89
+ url: "https://www.yahoo.com/news",
90
+ headlines_selector: "div#mrt-node-Col1-1-WideHero h3",
91
+ urls_selector: "div#mrt-node-Col1-1-WideHero",
92
+ child_selector: "a[class*='D(b)']"
81
93
  },
82
94
  # "REDDIT" => { ## 429 Error
83
95
  # url: "https://www.reddit.com/r/news/",
@@ -87,16 +99,10 @@ class TopHeadlines::Source
87
99
  # },
88
100
  # "CBS" => {
89
101
  # url: "http://www.cbsnews.com/",
90
- # headlines_selector: "div.col-5.nocontent h3.title",
91
- # urls_selector: "div.col-5.nocontent",
92
- # child_selector: "a" ## NEEDS WORK – only select a child of parent h3.title
93
- # },
94
- # "YAHOO" => {
95
- # url: "https://www.yahoo.com/news/",
96
- # headlines_selector: "div#mrt-node-Col1-1-WideHero h3",
97
- # urls_selector: "div#mrt-node-Col1-1-WideHero",
98
- # child_selector: "a" ## NEEDS WORK – only select a child of parent h3
99
- # },
102
+ # headlines_selector: "div.col-5.nocontent li.item-full-lead h3.title",
103
+ # urls_selector: "div.col-5.nocontent li.item-full-lead",
104
+ # child_selector: "a:first-child" ## NEEDS WORK – only select first parent h3.title
105
+ # },
100
106
  }
101
107
 
102
108
  def self.all
@@ -1,3 +1,3 @@
1
1
  module TopHeadlines
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["zachnewburgh"]
10
10
  spec.email = ["zach.newburgh@gmail.com"]
11
11
 
12
- spec.summary = %q{This gem allows users to view the top headlines from major news sources. Users can open the headlines directly from the command line for articles from BBC, Bloomberg, CNN, FiveThirtyEight, Forbes, Fox News, The Guardian, Huffington Post, MSNBC, New York Times, Politico, Wall Street Journal, and Washington Post.}
12
+ spec.summary = %q{This gem allows users to view the top headlines from major news sources. Users can open the headlines directly from the command line for articles from BBC, Bloomberg, CNN, The Daily Beast, FiveThirtyEight, Forbes, Fox News, The Guardian, Huffington Post, MSNBC, New York Times, Politico, Wall Street Journal, Washington Post, and Yahoo.}
13
13
  spec.homepage = "https://github.com/zachnewburgh/top-headlines-cli-gem"
14
14
  spec.license = "MIT"
15
15
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: top-headlines
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - zachnewburgh
@@ -132,6 +132,7 @@ signing_key:
132
132
  specification_version: 4
133
133
  summary: This gem allows users to view the top headlines from major news sources.
134
134
  Users can open the headlines directly from the command line for articles from BBC,
135
- Bloomberg, CNN, FiveThirtyEight, Forbes, Fox News, The Guardian, Huffington Post,
136
- MSNBC, New York Times, Politico, Wall Street Journal, and Washington Post.
135
+ Bloomberg, CNN, The Daily Beast, FiveThirtyEight, Forbes, Fox News, The Guardian,
136
+ Huffington Post, MSNBC, New York Times, Politico, Wall Street Journal, Washington
137
+ Post, and Yahoo.
137
138
  test_files: []