amazoned 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/amazoned/client.rb +1 -1
- data/lib/amazoned/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 541ba9f2538aa8c43fe1ea005c0fad9ac997725a
|
4
|
+
data.tar.gz: a55e881280e3403225242c5f6fd52024d736f5e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7f6493ad97382f8402837f47df60658f9b1e876a144f12425fc44572a986d0e7bdb632bfa68807effd8b870047206a5e25bc9da655818508c76657da79fb4bf
|
7
|
+
data.tar.gz: 5a3f199d29f2b03dbd1f43e6f943ac804c5119b57dfe028e58e9781adb23b7a7162d0a0ba4cc719faacb37caf4df80926b11b65c03c09aa52019050d19dce3b0
|
data/lib/amazoned/client.rb
CHANGED
@@ -15,7 +15,7 @@ class Amazoned::Client
|
|
15
15
|
def get_product(num_retries = 1)
|
16
16
|
agent = Mechanize.new.tap do |web|
|
17
17
|
web.html_parser = HtmlParser # Avoid encoding issues: https://stackoverflow.com/a/20666246/3448554
|
18
|
-
web.user_agent_alias = (
|
18
|
+
web.user_agent_alias = (["Linux Firefox", "Linux Mozilla", "Mac Firefox", "Mac Mozilla", "Mac Safari", "Windows Chrome", "Windows IE 10", "Windows IE 11", "Windows Edge", "Windows Mozilla", "Windows Firefox"]).sample # spoof every request with common User Agents available in Mechanize as a way to hit fewer CAPTCHA walls
|
19
19
|
end
|
20
20
|
|
21
21
|
begin
|
data/lib/amazoned/version.rb
CHANGED