steam_scraper 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/steam_scraper/game_page_scraper.rb +3 -0
- data/lib/steam_scraper/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: 9958f39a1e2f9c51372f238918e2303b0c15259a
|
4
|
+
data.tar.gz: ecfd0ba052682695efa842f7a8e0a47a63c9891c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 930c86979409dc3afdf5f110f29cf094a43a0da053a538f41bca0f627070f0cf1ec953a5ad16347840112a933df1906c1a8937210fec9371c0172e89f4b89e45
|
7
|
+
data.tar.gz: 5e858bac10ac562da81560db4f9ab258788b03a4dc0631b268fd9311338aa8632ff7ab98a342eb32c9d88833585ef32ddac762cffa9d5d558d98bafb571fdfad
|
data/README.md
CHANGED
@@ -21,14 +21,14 @@ Or install it yourself as:
|
|
21
21
|
To scrape all pages from the steam store:
|
22
22
|
|
23
23
|
```Ruby
|
24
|
-
scraper = SteamScraper.new
|
24
|
+
scraper = SteamScraper::SteamScraper.new
|
25
25
|
results = scraper.scrape
|
26
26
|
```
|
27
27
|
|
28
28
|
To scrape a range of pages from the steam store:
|
29
29
|
|
30
30
|
```Ruby
|
31
|
-
scraper = SteamScraper.new
|
31
|
+
scraper = SteamScraper::SteamScraper.new
|
32
32
|
results = scraper.scrape(first_page, last_page)
|
33
33
|
```
|
34
34
|
|
@@ -68,6 +68,9 @@ class GamePageScraper
|
|
68
68
|
|
69
69
|
def scrape_min_spec(page_contents)
|
70
70
|
spec_block = page_contents.xpath("//div[@data-os='win']/div[@class='game_area_sys_req_leftCol']/ul/ul")
|
71
|
+
if spec_block.empty?
|
72
|
+
spec_block = page_contents.xpath("//div[@data-os='win']/div[@class='game_area_sys_req_full']/ul/ul")
|
73
|
+
end
|
71
74
|
scrape_spec(spec_block)
|
72
75
|
end
|
73
76
|
|