gared 0.0.19 → 0.0.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gared/jpress.rb +31 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9fb915630aab9c72a2a65c7eabbdc499960696bf76bc16d8203ae4a9b646cc11
|
4
|
+
data.tar.gz: 0be0b0bac6462762dfc7b8ebc3a4cd971807672840471ae1870ce09b7b4a0504
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6e66324d695c4e0acf36a6be81da9a57820b1c9b46034129f05779cd3381b7f3a95af5b488f29a57ad257c25428b01f156ed68bf2bee6fc4b85910c1ff872ab
|
7
|
+
data.tar.gz: 97b2e67d76e165404f2a8235557945e332718b0af72676039635a5b1f4b3a5c1388a1b5432af632a8068b8ffd431b994e558aa8fcae503385ba1b599caa855a0
|
data/lib/gared/jpress.rb
CHANGED
@@ -1,4 +1,35 @@
|
|
1
1
|
module Gared
|
2
2
|
class Jpress
|
3
|
+
require 'watir'
|
4
|
+
|
5
|
+
def initialize
|
6
|
+
@browser = Watir::Browser.new :chrome, options: {args: ['--no-sandbox', '--headless']}
|
7
|
+
end
|
8
|
+
|
9
|
+
def query_persons(q)
|
10
|
+
end
|
11
|
+
|
12
|
+
def query_person(person)
|
13
|
+
end
|
14
|
+
|
15
|
+
def query_publications(q)
|
16
|
+
end
|
17
|
+
|
18
|
+
def query_publication(publication)
|
19
|
+
end
|
20
|
+
|
21
|
+
# return in-memory Publication instances with associated Holdings
|
22
|
+
def query_publications_by_person(person, ctx = nil)
|
23
|
+
@browser.goto 'http://web.nli.org.il/sites/JPress/Hebrew/Pages/default.aspx'
|
24
|
+
@browser.wait
|
25
|
+
|
26
|
+
t = @browser.text_field(id: 'ctl00_PlaceHolderHeader_PlaceHolderSearchArea_ctl00_ctl00_ctl00_SD01C0892_InputKeywords') # srsly, Micro$oft
|
27
|
+
t.set(person)
|
28
|
+
@browser.a(id: 'ctl00_PlaceHolderHeader_PlaceHolderSearchArea_ctl00_ctl00_ctl00_SD01C0892_go').click # "quick search" - not necessarily by author!
|
29
|
+
@browser.wait
|
30
|
+
ret = []
|
31
|
+
begin
|
32
|
+
|
33
|
+
end
|
3
34
|
end
|
4
35
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gared
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Asaf Bartov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-09-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: zoom
|
@@ -56,14 +56,14 @@ dependencies:
|
|
56
56
|
name: nokogiri
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">"
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '1.8'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '1.8'
|
69
69
|
- !ruby/object:Gem::Dependency
|