effscraper 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/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
|