effscraper 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/effscraper.rb +8 -6
- metadata +1 -1
data/lib/effscraper.rb
CHANGED
@@ -50,18 +50,20 @@ class EFFScraper
|
|
50
50
|
dochash[:path] = path[path.length-1].chomp.strip
|
51
51
|
end
|
52
52
|
end
|
53
|
-
print
|
54
53
|
|
55
54
|
# Get date and title
|
56
55
|
dochash[:doc_date] = l.css("span.date-display-single").text
|
57
56
|
dochash[:title] = l.css("a")[1].text
|
58
57
|
|
59
58
|
# Extract metadata and text
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
59
|
+
begin
|
60
|
+
u = UploadConvert.new(dochash[:path])
|
61
|
+
metadata = u.extractMetadataPDF
|
62
|
+
metadata.each{|k, v| dochash[k] = v}
|
63
|
+
dochash[:text] = u.detectPDFType
|
64
|
+
@casearray.push(dochash)
|
65
|
+
rescue
|
66
|
+
end
|
65
67
|
end
|
66
68
|
end
|
67
69
|
end
|