extractula 0.0.3 → 0.0.4

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.
@@ -0,0 +1,8 @@
1
+ module Extractula
2
+ class TwitPic < Extractula::Extractor
3
+ domain 'twitpic'
4
+ media_type 'image'
5
+ content_path '#view-photo-caption'
6
+ image_urls_path '#photo-display'
7
+ end
8
+ end
@@ -0,0 +1,12 @@
1
+ module Extractula
2
+ class Vimeo < Extractula::Extractor
3
+ include Extractula::OEmbed
4
+ domain 'vimeo'
5
+ media_type 'video'
6
+ oembed_endpoint 'http://www.vimeo.com/api/oembed.json'
7
+
8
+ def content
9
+ oembed['description']
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,8 @@
1
+ module Extractula
2
+ class YFrog < Extractula::Extractor
3
+ domain 'yfrog'
4
+ media_type 'image'
5
+ content_path '.twittertweet div div > div'
6
+ image_urls_path '#main_image'
7
+ end
8
+ end
@@ -117,6 +117,10 @@ module Extractula
117
117
  @html = @doc['html']
118
118
  end
119
119
  end
120
+
121
+ def [](field)
122
+ @doc[field]
123
+ end
120
124
  end
121
125
 
122
126
  end
data/lib/extractula.rb CHANGED
@@ -8,7 +8,7 @@ require 'extractula/extracted_content'
8
8
  require 'extractula/extractor'
9
9
 
10
10
  module Extractula
11
- VERSION = "0.0.3"
11
+ VERSION = "0.0.4"
12
12
 
13
13
  @extractors = []
14
14
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: extractula
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Dix
@@ -38,6 +38,9 @@ files:
38
38
  - lib/extractula/oembed.rb
39
39
  - lib/extractula/custom_extractors/dinosaur_comics.rb
40
40
  - lib/extractula/custom_extractors/flickr.rb
41
+ - lib/extractula/custom_extractors/twit_pic.rb
42
+ - lib/extractula/custom_extractors/vimeo.rb
43
+ - lib/extractula/custom_extractors/y_frog.rb
41
44
  - lib/extractula/custom_extractors/you_tube.rb
42
45
  - README.textile
43
46
  - spec/spec.opts