top-headlines 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/top-headlines/source.rb +24 -0
- data/lib/top-headlines/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f975cdd9af4d92380c35a6ebe8c43e963438fb74
|
4
|
+
data.tar.gz: eca9124291061e3a9d0995de3b0219feeb4c7a7b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72c4aca9ae4faadbbbeb404a393c09bfb9b4f52ba629a2c27c2174a9182975d2d70af88d02418c1aeaaca713694329d8829692ba4802a0d28efa4a9e8bc9e217
|
7
|
+
data.tar.gz: 160b0f3c4aded45e075c52c7ebb49ae5ce6e96c90e4a09ced08ae773db56d86ec3b8f133439923cfca327640f962a8216335f28e6160ddfb92947fe14b237a3f
|
data/lib/top-headlines/source.rb
CHANGED
@@ -97,6 +97,30 @@ class TopHeadlines::Source
|
|
97
97
|
urls_selector: "h5.entry-title.node-title.title",
|
98
98
|
child_selector: "a:first-child"
|
99
99
|
},
|
100
|
+
"LE MONDE" => {
|
101
|
+
url: "http://www.lemonde.fr/",
|
102
|
+
headlines_selector: "div.titres_edito h1, h2", # NEEDS TO REMOVE '14' and '13' from beginning of 1st and 3rd headlines
|
103
|
+
urls_selector: "div.titres_edito article",
|
104
|
+
child_selector: "a"
|
105
|
+
},
|
106
|
+
"INDEPENDENT UK" => {
|
107
|
+
url: "http://www.independent.co.uk",
|
108
|
+
headlines_selector: "h1:not(.box-title), h2",
|
109
|
+
urls_selector: "div.row[data-tb-region='row-2'] div.content h1, div.grid-mod-card-list ul li",
|
110
|
+
child_selector: "a"
|
111
|
+
},
|
112
|
+
"NPR" => {
|
113
|
+
url: "http://www.npr.org/",
|
114
|
+
headlines_selector: "article:not(.hp-item.attachment.volume-low) h1.title:first-child",
|
115
|
+
urls_selector: "section#main-section div.story-text",
|
116
|
+
child_selector: "a:nth-child(2)"
|
117
|
+
},
|
118
|
+
# "TELEGRAPH" => {
|
119
|
+
# url: "http://www.telegraph.co.uk/",
|
120
|
+
# headlines_selector: "main h3 a",
|
121
|
+
# urls_selector: "main div[class*='list-of-entities'] h3", # NEED TO FIX LINKS
|
122
|
+
# child_selector: "a:first-child"
|
123
|
+
# },
|
100
124
|
# "REUTERS" => {
|
101
125
|
# url: "http://www.reuters.com/news",
|
102
126
|
# headlines_selector: "div.column1.gridPanel.grid8 div.moduleBody :not(div.photo) a", # NEED TO ACCOUNT FOR :not(span a) at same level as a
|