jobparser 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/jobparser/version.rb +1 -1
- data/lib/jobparser.rb +10 -1
- metadata +1 -1
data/lib/jobparser/version.rb
CHANGED
data/lib/jobparser.rb
CHANGED
@@ -13,6 +13,15 @@ require "jobparser/facets/location"
|
|
13
13
|
require "jobparser/facets/apply"
|
14
14
|
require "jobparser/facets/title"
|
15
15
|
|
16
|
+
require "open-uri"
|
17
|
+
|
16
18
|
module JobParser
|
17
|
-
|
19
|
+
def self.parser(url)
|
20
|
+
html = open(url, :allow_redirections => :safe).read
|
21
|
+
if html.include?("http://schema.org/JobPosting")
|
22
|
+
ParseSchema.new(html, url)
|
23
|
+
else
|
24
|
+
ParseHtml.new(html, url)
|
25
|
+
end
|
26
|
+
end
|
18
27
|
end
|