stylemooncat 0.0.4 → 0.0.5
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.
- checksums.yaml +4 -4
- data/lib/stylemooncat/scraper.rb +79 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 074f4340d5ccf7f2dc5f5ba8d294c8586cc14c81
|
4
|
+
data.tar.gz: 14466e1f5085d9b00a951b9bce37e0e2039f4bad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6134f6c70e813247f6f02d54cecc413e9ac799afc81e226be4ea381b09affceb75dd302fe955b3622227a79058f00285595d00a8d3e0743509e04a713adf8cb1
|
7
|
+
data.tar.gz: b798b7836f6c3be2f974c21f587efc04978f1d25fcd9656375a62456da2ea49b5092a9e405035a642dc9d9fad606945e07ca503857168ed76170001b4cce7011
|
data/lib/stylemooncat/scraper.rb
CHANGED
@@ -15,13 +15,36 @@ module StyleMoonCat
|
|
15
15
|
|
16
16
|
@@ALL_ITEMS_URI = "#{@@BASE_URI}/PDList.asp?item1=00"
|
17
17
|
@@TOP_URI = "#{@@BASE_URI}/PDList.asp?p1=01"
|
18
|
+
@@TOPS_Clothes_URI = "#{@@BASE_URI}/PDList.asp?p1=01&p2=01"
|
19
|
+
@@TOPS_Tshirt_URI = "#{@@BASE_URI}/PDList.asp?p1=011&p2=02"
|
20
|
+
@@TOPS_Vest_URI = "#{@@BASE_URI}/PDList.asp?p1=01&p2=03"
|
21
|
+
@@TOPS_Blouse_URI = "#{@@BASE_URI}/PDList.asp?p1=01&p2=04"
|
22
|
+
@@TOPS_Knit_URI = "#{@@BASE_URI}/PDList.asp?p1=01&p2=05"
|
18
23
|
@@BOTTOM_URI = "#{@@BASE_URI}/PDList.asp?p1=02"
|
24
|
+
@@BOTTOM_Pants_URI = "#{@@BASE_URI}/PDList.asp?p1=02&p2=01"
|
25
|
+
@@BOTTOM_Skirts_URI = "#{@@BASE_URI}/PDList.asp?p1=02&p2=02"
|
19
26
|
@@OUTER_URI = "#{@@BASE_URI}/PDList.asp?p1=03"
|
27
|
+
@@OUTER_Coat_URI = "#{@@BASE_URI}/PDList.asp?p1=02&p2=01"
|
28
|
+
@@OUTER_Jacket_URI = "#{@@BASE_URI}/PDList.asp?p1=02&p2=02"
|
29
|
+
@@OUTER_Knit_URI = "#{@@BASE_URI}/PDList.asp?p1=02&p2=01"
|
30
|
+
@@OUTER_Vest_URI = "#{@@BASE_URI}/PDList.asp?p1=02&p2=02"
|
20
31
|
@@DRESS_URI = "#{@@BASE_URI}/PDList.asp?p1=04"
|
21
|
-
@@
|
22
|
-
|
32
|
+
@@SHOES_AND_BAGS_URI = "#{@@BASE_URI}/PDList.asp?p1=05"
|
33
|
+
@@SHOES_URI = "#{@@BASE_URI}/PDList.asp?p1=05&p2=01"
|
34
|
+
@@BAG_URI = "#{@@BASE_URI}/PDList.asp?p1=05&p2=02"
|
23
35
|
@@ACCESSORIES_URI = "#{@@BASE_URI}/PDList.asp?p1=06"
|
24
|
-
|
36
|
+
@@ACCESSORIES_Watch_URI = "#{@@BASE_URI}/PDList.asp?p1=06&p2=01"
|
37
|
+
@@ACCESSORIES_Necklace_URI = "#{@@BASE_URI}/PDList.asp?p1=06&p2=02"
|
38
|
+
@@ACCESSORIES_Ring_URI = "#{@@BASE_URI}/PDList.asp?p1=06&p2=03"
|
39
|
+
@@ACCESSORIES_Bracelet_URI = "#{@@BASE_URI}/PDList.asp?p1=06&p2=04"
|
40
|
+
@@ACCESSORIES_Earring_URI = "#{@@BASE_URI}/PDList.asp?p1=06&p2=05"
|
41
|
+
@@ACCESSORIES_Muffler_URI = "#{@@BASE_URI}/PDList.asp?p1=06&p2=06"
|
42
|
+
@@ACCESSORIES_Belt_URI = "#{@@BASE_URI}/PDList.asp?p1=06&p2=07"
|
43
|
+
@@ACCESSORIES_Haircap_URI = "#{@@BASE_URI}/PDList.asp?p1=06&p2=08"
|
44
|
+
@@ACCESSORIES_Glasses_URI = "#{@@BASE_URI}/PDList.asp?p1=06&p2=09"
|
45
|
+
@@ACCESSORIES_Socks_URI = "#{@@BASE_URI}/PDList.asp?p1=06&p2=10"
|
46
|
+
@@ACCESSORIES_Underwear_URI = "#{@@BASE_URI}/PDList.asp?p1=06&p2=11"
|
47
|
+
@@ACCESSORIES_Others_URI = "#{@@BASE_URI}/PDList.asp?p1=06&p2=12"
|
25
48
|
# Selectors
|
26
49
|
@@ITEM_XPATH = "//div[contains(@class, 'goodsBox')]/div[contains(@class, 'goodl')]"
|
27
50
|
@@LINK_XPATH = 'a'
|
@@ -43,18 +66,67 @@ module StyleMoonCat
|
|
43
66
|
uri = uri_with_page(@@SPECIAL_DISCOUNT_URI, page)
|
44
67
|
when "top"
|
45
68
|
uri = uri_with_page(@@TOP_URI, page)
|
69
|
+
when "top_clothes"
|
70
|
+
uri = uri_with_page(@@TOPS_Clothes_URI, page)
|
71
|
+
when "top_Tshirt"
|
72
|
+
uri = uri_with_page(@@TOPS_Tshirt_URI, page)
|
73
|
+
when "top_vest"
|
74
|
+
uri = uri_with_page(@@TOPS_Vest_URI, page)
|
75
|
+
when "top_blouse"
|
76
|
+
uri = uri_with_page(@@TOPS_Blouse_URI, page)
|
77
|
+
when "top_knit"
|
78
|
+
uri = uri_with_page(@@TOPS_Knit_URI, page)
|
46
79
|
when "bottom"
|
47
80
|
uri = uri_with_page(@@BOTTOM_URI, page)
|
81
|
+
when "bottom_pants"
|
82
|
+
uri = uri_with_page(@@BOTTOM_Pants_URI, page)
|
83
|
+
when "bottom_skirts"
|
84
|
+
uri = uri_with_page(@@BOTTOM_Skirts_URI, page)
|
48
85
|
when "outer"
|
49
86
|
uri = uri_with_page(@@OUTER_URI, page)
|
87
|
+
when "outer_coat"
|
88
|
+
uri = uri_with_page(@@OUTER_Coat_URI, page)
|
89
|
+
when "outer_jacket"
|
90
|
+
uri = uri_with_page(@@OUTER_Jacket_URI, page)
|
91
|
+
when "outer_knit"
|
92
|
+
uri = uri_with_page(@@OUTER_Knit_URI, page)
|
93
|
+
when "outer_vest"
|
94
|
+
uri = uri_with_page(@@OUTER_Vest_URI, page)
|
95
|
+
|
50
96
|
when "dress"
|
51
97
|
uri = uri_with_page(@@DRESS_URI, page)
|
52
|
-
when "
|
53
|
-
uri = uri_with_page(@@
|
54
|
-
|
55
|
-
|
98
|
+
when "shoes_and_bag"
|
99
|
+
uri = uri_with_page(@@SHOES_AND_BAGS_URI, page)
|
100
|
+
when "shose"
|
101
|
+
uri = uri_with_page(@@SHOES_URI, page)
|
102
|
+
when "bag"
|
103
|
+
uri = uri_with_page(@@BAG_URI, page)
|
56
104
|
when "accessories"
|
57
105
|
uri = uri_with_page(@@ACCESSORIES_URI, page)
|
106
|
+
when "accessories_watch"
|
107
|
+
uri = uri_with_page(@@ACCESSORIES_Watch_URI, page)
|
108
|
+
when "accessories_necklace"
|
109
|
+
uri = uri_with_page(@@ACCESSORIES_Necklace_URI, page)
|
110
|
+
when "accessories_ring"
|
111
|
+
uri = uri_with_page(@@ACCESSORIES_Ring_URI, page)
|
112
|
+
when "accessories_bracelet"
|
113
|
+
uri = uri_with_page(@@ACCESSORIES_Bracelet_URI, page)
|
114
|
+
when "accessories_earring"
|
115
|
+
uri = uri_with_page(@@ACCESSORIES_Earring_URI, page)
|
116
|
+
when "accessories_muffler"
|
117
|
+
uri = uri_with_page(@@ACCESSORIES_Muffler_URI, page)
|
118
|
+
when "accessories_belt"
|
119
|
+
uri = uri_with_page(@@ACCESSORIES_Belt_URI, page)
|
120
|
+
when "accessories_haircap"
|
121
|
+
uri = uri_with_page(@@ACCESSORIES_Haircap_URI, page)
|
122
|
+
when "accessories_glasses"
|
123
|
+
uri = uri_with_page(@@ACCESSORIES_Glasses_URI, page)
|
124
|
+
when "accessories_socks"
|
125
|
+
uri = uri_with_page(@@ACCESSORIES_Socks_URI, page)
|
126
|
+
when "accessories_underwear"
|
127
|
+
uri = uri_with_page(@@ACCESSORIES_Underwear_URI, page)
|
128
|
+
when "accessories_others"
|
129
|
+
uri = uri_with_page(@@ACCESSORIES_Others_URI, page)
|
58
130
|
else
|
59
131
|
uri = uri_with_page(@@ALL_ITEMS_URI, page)
|
60
132
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stylemooncat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Even Chang
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2016-01-02 00:00:00.000000000 Z
|
15
15
|
dependencies: []
|
16
16
|
description: This is a gem scraping StyleMoonCat's website.Input category name,page
|
17
17
|
number,searcing keyword,and price range,and it will return the items with title,price,image,and
|