instascraper 0.0.1 → 0.0.2
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.
- data/Rakefile +6 -0
- data/instascraper.gemspec +3 -0
- data/lib/instascraper.rb +3 -1
- data/lib/instascraper/bookmark.rb +3 -1
- data/lib/instascraper/version.rb +1 -1
- data/spec/instascraper_spec.rb +14 -0
- data/spec/spec_helper.rb +3 -0
- metadata +30 -4
data/Rakefile
CHANGED
data/instascraper.gemspec
CHANGED
data/lib/instascraper.rb
CHANGED
@@ -32,7 +32,9 @@ class Instascraper
|
|
32
32
|
page.parser.css('.tableViewCell').each do |bookmark|
|
33
33
|
bookmark.css('.tableViewCellTitleLink').first['href']
|
34
34
|
|
35
|
-
bookmarks << Bookmark.new(bookmark.css('.tableViewCellTitleLink').first['href'],
|
35
|
+
bookmarks << Bookmark.new(bookmark.css('.tableViewCellTitleLink').first['href'],
|
36
|
+
bookmark.css('.tableViewCellTitleLink').first.text,
|
37
|
+
'http://www.instapaper.com'+bookmark.css('.textButton').first['href'])
|
36
38
|
end
|
37
39
|
|
38
40
|
if page.link_with :text => /Older items/
|
data/lib/instascraper/version.rb
CHANGED
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Instascraper do
|
4
|
+
it 'should download all your bookmarks' do
|
5
|
+
i = Instascraper.new('andrewnez+instascraper@gmail.com', 'test')
|
6
|
+
bookmarks = i.bookmarks
|
7
|
+
bookmarks.class.should eql(Array)
|
8
|
+
bookmarks.first.class.should eql(Instascraper::Bookmark)
|
9
|
+
|
10
|
+
bookmarks.first.title.should match /Teabass.com/
|
11
|
+
bookmarks.first.link.should match /http:\/\/teabass.com/
|
12
|
+
bookmarks.first.text.should match /http:\/\/www.instapaper.com\/text\?u=http%3A%2F%2Fteabass.com&article=193664503/
|
13
|
+
end
|
14
|
+
end
|
data/spec/spec_helper.rb
ADDED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: instascraper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-08-07 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mechanize
|
16
|
-
requirement: &
|
16
|
+
requirement: &70204961969640 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,29 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70204961969640
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: bundler
|
27
|
+
requirement: &70204961968800 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ~>
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '1.0'
|
33
|
+
type: :development
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *70204961968800
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: rspec
|
38
|
+
requirement: &70204961959740 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ~>
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '2.6'
|
44
|
+
type: :development
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *70204961959740
|
25
47
|
description: A scraper for instapaper to provide a basic api without hacing to pay
|
26
48
|
per month
|
27
49
|
email:
|
@@ -39,6 +61,8 @@ files:
|
|
39
61
|
- lib/instascraper.rb
|
40
62
|
- lib/instascraper/bookmark.rb
|
41
63
|
- lib/instascraper/version.rb
|
64
|
+
- spec/instascraper_spec.rb
|
65
|
+
- spec/spec_helper.rb
|
42
66
|
homepage: http://github.com/andrew/instascraper
|
43
67
|
licenses: []
|
44
68
|
post_install_message:
|
@@ -63,4 +87,6 @@ rubygems_version: 1.8.6
|
|
63
87
|
signing_key:
|
64
88
|
specification_version: 3
|
65
89
|
summary: Basic, free bookmarks api for instapaper
|
66
|
-
test_files:
|
90
|
+
test_files:
|
91
|
+
- spec/instascraper_spec.rb
|
92
|
+
- spec/spec_helper.rb
|