gscraper 0.1.1 → 0.1.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/History.txt +6 -0
- data/lib/gscraper/gscraper.rb +9 -2
- data/lib/gscraper/search/query.rb +1 -1
- data/lib/gscraper/version.rb +1 -1
- metadata +1 -1
data/History.txt
CHANGED
data/lib/gscraper/gscraper.rb
CHANGED
|
@@ -3,14 +3,21 @@ require 'open-uri'
|
|
|
3
3
|
|
|
4
4
|
module GScraper
|
|
5
5
|
#
|
|
6
|
-
# Returns the GScraper
|
|
6
|
+
# Returns the supported GScraper User-Agent Aliases.
|
|
7
|
+
#
|
|
8
|
+
def GScraper.user_agent_aliases
|
|
9
|
+
WWW::Mechanize::AGENT_ALIASES
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
#
|
|
13
|
+
# Returns the GScraper User-Agent
|
|
7
14
|
#
|
|
8
15
|
def GScraper.user_agent
|
|
9
16
|
@user_agent
|
|
10
17
|
end
|
|
11
18
|
|
|
12
19
|
#
|
|
13
|
-
# Sets the GScraper
|
|
20
|
+
# Sets the GScraper User-Agent to the specified _agent_.
|
|
14
21
|
#
|
|
15
22
|
def GScraper.user_agent=(agent)
|
|
16
23
|
@user_agent = agent
|
|
@@ -201,7 +201,7 @@ module GScraper
|
|
|
201
201
|
when '(cc_publicdomain|cc_attribute|cc_sharealike|cc_nonderived).-(cc_noncommercial)'
|
|
202
202
|
opts[:rights] = Licenses::CC_BY_SA
|
|
203
203
|
when '(cc_publicdomain|cc_attribute|cc_sharealike|cc_noncommercial).-(cc_nonderived)'
|
|
204
|
-
opts[:rights] = Licenses::
|
|
204
|
+
opts[:rights] = Licenses::CC_BY_NC
|
|
205
205
|
when '(cc_publicdomain|cc_attribute|cc_sharealike).-(cc_noncommercial|cc_nonderived)'
|
|
206
206
|
opts[:rights] = Licenses::CC_BY
|
|
207
207
|
end
|
data/lib/gscraper/version.rb
CHANGED
metadata
CHANGED