steam_scraper 1.1.10 → 1.1.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c7909b2247f03646799ac09d5a583fca8d28ac7d
4
- data.tar.gz: dbce10bc66b49b092ee1fbb6b8da4e26dc939ed4
3
+ metadata.gz: b0f2b212963ade85d1d84bc30cec7e08492128ba
4
+ data.tar.gz: 9231b4f69f63765d5dc5bcba571d07cd3fb335d7
5
5
  SHA512:
6
- metadata.gz: 83ea06805de56ef7486044e6d22dd66531c52b08ed60ddfc9758596aa8f4dbeb887fbb46b1011627ae01b28c37eb643b7408e4ce55518e93a984ed3f298a10d7
7
- data.tar.gz: e2031d3e7f81c3ee4780280f4a68734b0c8e2856ec7d73434a9d5964b89aa33df77e43ac41e21b62644d20a10ed98475c0963e496afce78d36c9636ff0a659ab
6
+ metadata.gz: 14f9f369bb3a6dd24932c9a7c7268e1b11f0db5116385b053c8a5bd75b9c275dbb5fa519702d165e0b0e7075d36583fb01dfd11feef7031b911c10f6610cb615
7
+ data.tar.gz: 28a90dd8b523db345917d7177a3142b1e2919c50b654a5b52f5141cb594aeae0d8dbf605c28231d5f30016afe6b2bf1d80ba0eb6c52dbce9b682fc3d31101f3c
@@ -7,5 +7,8 @@ Style/WhileUntilModifier:
7
7
  Metrics/LineLength:
8
8
  Max: 120
9
9
 
10
+ Metrics/MethodLength:
11
+ Max: 20
12
+
10
13
  Metrics/AbcSize:
11
14
  Max: 99999
@@ -4,9 +4,19 @@ require 'nokogiri'
4
4
 
5
5
  # Class for retrieving a Nokogiri tree from a URL
6
6
  class PageRetriever
7
+ def get_age_check_url(url)
8
+ url.sub('/app/', '/agecheck/app/')
9
+ end
10
+
7
11
  def retrieve(url)
8
12
  page_contents = HTTParty.get(url)
9
- Nokogiri::HTML(page_contents)
13
+ page = Nokogiri::HTML(page_contents)
14
+ if page.xpath('//form[@id="agecheck_form"]')
15
+ url = get_age_check_url(url)
16
+ page_contents = HTTParty.post(url, body: { ageDay: 1, ageMonth: 1, ageYear: 1980 })
17
+ page = Nokogiri::HTML(page_contents)
18
+ end
19
+ page
10
20
  rescue
11
21
  nil
12
22
  end
@@ -1,3 +1,3 @@
1
1
  module SteamScraper
2
- VERSION = '1.1.10'.freeze
2
+ VERSION = '1.1.11'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: steam_scraper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.10
4
+ version: 1.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Gardner
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-09-12 00:00:00.000000000 Z
11
+ date: 2016-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler