drudge_headline 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/bin/drudge_headline +15 -0
- metadata +45 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 777b67f2bb5988d1879ef97fe94661794cb8bd71
|
|
4
|
+
data.tar.gz: 5ce6121943b3f84c5650c3b3e5b74af3f10d0c90
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 48427e0ade5d6656aab93b32fcec05a53aa476cdc2563a35d8c386aae1ba01d7a94c48bd24abae712bff5d0206cb03a05ccde6e467801f29293c32491852e733
|
|
7
|
+
data.tar.gz: 7286c825c327031ea7ed5195b6bc11d707ccca1adf92dd586950479349c6df42801ac5da333a239959c1cb7f597c52e0e19e23ea3149f843a367c7b57ddca648
|
data/bin/drudge_headline
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
require 'net/http'
|
|
3
|
+
require 'rubygems'
|
|
4
|
+
require 'nokogiri'
|
|
5
|
+
|
|
6
|
+
key = 'MAIN HEADLINE'
|
|
7
|
+
|
|
8
|
+
uri = URI('http://drudgereport.com/index.html?count=10')
|
|
9
|
+
response = Nokogiri::HTML(Net::HTTP.get(uri))
|
|
10
|
+
#response = Net::HTTP.get(uri) # => String
|
|
11
|
+
|
|
12
|
+
maindiv = response.css('div#app_mainheadline')[0]
|
|
13
|
+
puts response.css('div#app_mainheadline')[0].text
|
|
14
|
+
puts response.css('div#app_mainheadline')[0]['href']
|
|
15
|
+
|
metadata
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: drudge_headline
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Ed Bruner
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2018-01-11 00:00:00.000000000 Z
|
|
12
|
+
dependencies: []
|
|
13
|
+
description: Prints the top headline on drudgereport.com
|
|
14
|
+
email: edward.bruner@gmail.com
|
|
15
|
+
executables:
|
|
16
|
+
- drudge_headline
|
|
17
|
+
extensions: []
|
|
18
|
+
extra_rdoc_files: []
|
|
19
|
+
files:
|
|
20
|
+
- bin/drudge_headline
|
|
21
|
+
homepage: http://rubygems.org/gems/drudge_headline
|
|
22
|
+
licenses:
|
|
23
|
+
- MIT
|
|
24
|
+
metadata: {}
|
|
25
|
+
post_install_message:
|
|
26
|
+
rdoc_options: []
|
|
27
|
+
require_paths:
|
|
28
|
+
- lib
|
|
29
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - ">="
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '0'
|
|
34
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
35
|
+
requirements:
|
|
36
|
+
- - ">="
|
|
37
|
+
- !ruby/object:Gem::Version
|
|
38
|
+
version: '0'
|
|
39
|
+
requirements: []
|
|
40
|
+
rubyforge_project:
|
|
41
|
+
rubygems_version: 2.6.14
|
|
42
|
+
signing_key:
|
|
43
|
+
specification_version: 4
|
|
44
|
+
summary: Drudge Top Headline!
|
|
45
|
+
test_files: []
|