-
Notifications
You must be signed in to change notification settings - Fork 0
/
constants.py
199 lines (184 loc) · 9.89 KB
/
constants.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
NEW_LINE = "\n"
EMPTY_SPACE = ""
ALADIN_URL = "https://www.aladin.co.kr/search/wsearchresult.aspx?SearchTarget=UsedStore&KeyTag=&SearchWord=%{}"
USER_AGENT = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36"
BOOK_RESULT_TXT = "검색된 책은 총 {} 권 입니다.\n\n"
INFO_MESSAGE = "이 결과는 알라딘 중고매장에서 검색된 결과 입니다.\n\n"
BOOK_RESULT_HTML = """<div id="Search3_Result" style="padding: 10px 0px 0px 0px;">
<div class="ss_book_box" itemid="30622556">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="25" align="left" valign="top" style="padding-right:5px;">
<table width="18" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<div style="text-align: center;">1.</div>
</td>
</tr>
<tr>
<td>
<div style="text-align: center;"><input name="chkCart.8946044217" type="checkbox"></div>
</td>
</tr>
</tbody>
</table>
</td>
<td width="170" align="left" valign="top">
<table width="150" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="">
<div style="position:relative;"><img
src="https://image.aladin.co.kr/product/3062/25/cover150/8946044217_1.jpg"
width="150" border="0" class="i_cover" style="cursor:pointer;"
onclick="fn_Search_StoreNotice();"></div>
</td>
</tr>
<tr>
<td style="text-align: left;"><a
href="https://www.aladin.co.kr/shop/wproduct.aspx?ItemId=30622556"
target="_blank"><img src="//image.aladin.co.kr/img/search/icon_new2.gif" border="0"></a><a
href="/shop/book/wletslookViewer.aspx?ISBN=8946044217" target="_blank"><img
src="//image.aladin.co.kr/img/search/icon_pre.gif" border="0"></a></td>
</tr>
</tbody>
</table>
</td>
<td width="*" align="left" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="*" valign="top">
<div class="ss_book_list" onclick="fn_Search_StoreNotice();" style="cursor:pointer;">
<ul>
<li><span style="font-size: 14px;">[중고]</span> <b class="bo3">할랄, 신이 허락한
음식만 먹는다 (반양장)</b><span class="ss_f_g2"> - 아랍음식과 문화코드 탐험</span>
</li>
<li>엄익란 (지은이) | 한울(한울아카데미) | 2011년 3월</li>
</ul>
</div>
</td>
<td width="80" valign="top">
<div class="book_Rfloat_02">
<div id="divBasketAddResult_8946044217"></div>
</div>
</td>
</tr>
<tr>
<td colspan="2">
<div style="margin:0px; padding:0px;">
<div class="usedshop_off_text2_box"><a
href="http://www.aladin.co.kr/usedstore/wproduct.aspx?ItemId=30622556&OffCode=killy"
class="usedshop_off_text3">부산 경성대.부경대역점</a>, <a
href="http://www.aladin.co.kr/usedstore/wproduct.aspx?ItemId=30622556&OffCode=Gyesan"
class="usedshop_off_text3">인천계산홈플러스점</a></div>
<div style="clear:both;"></div>
</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<div class="ss_book_box" itemid="2009237">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="25" align="left" valign="top" style="padding-right:5px;">
<table width="18" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<div style="text-align: center;">2.</div>
</td>
</tr>
<tr>
<td>
<div style="text-align: center;"><input name="chkCart.8946038675" type="checkbox"></div>
</td>
</tr>
</tbody>
</table>
</td>
<td width="170" align="left" valign="top">
<table width="150" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="">
<div style="position:relative;"><img
src="https://image.aladin.co.kr/product/200/92/cover150/8946038675_1.jpg"
width="150" border="0" class="i_cover" style="cursor:pointer;"
onclick="fn_Search_StoreNotice();"></div>
</td>
</tr>
<tr>
<td style="text-align: left;"><a
href="https://www.aladin.co.kr/shop/wproduct.aspx?ItemId=2009237"
target="_blank"><img src="//image.aladin.co.kr/img/search/icon_new2.gif" border="0"></a>
</td>
</tr>
</tbody>
</table>
</td>
<td width="*" align="left" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="*" valign="top">
<div class="ss_book_list" onclick="fn_Search_StoreNotice();" style="cursor:pointer;">
<ul>
<li><span style="font-size: 14px;">[중고]</span> <b class="bo3">문화코드, 어떻게 읽을
것인가 (반양장)</b><span class="ss_f_g2"> - 문화연구의 이론과 실제</span>
</li>
<li>일레인 볼드윈 (지은이), 조애리 (옮긴이) | 한울(한울아카데미) | 2008년 2월</li>
</ul>
</div>
</td>
<td width="80" valign="top">
<div class="book_Rfloat_02">
<div id="divBasketAddResult_8946038675"></div>
</div>
</td>
</tr>
<tr>
<td colspan="2">
<div style="margin:0px; padding:0px;">
<div class="usedshop_off_text2_box"><a
href="http://www.aladin.co.kr/usedstore/wproduct.aspx?ItemId=2009237&OffCode=Hapjeong"
class="usedshop_off_text3">합정점</a></div>
<div style="clear:both;"></div>
</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<script type="text/javascript">
$j(document).ready(function () {
$j('.Search3_Result_UsedSellArea').hover(function (e) {
$j(this).parent().find('.Search3_Result_UsedSellLayer').show();
}, function (e) {
$j(this).parent().find('.Search3_Result_UsedSellLayer').hide();
});
$j('.Search3_Result_UsedStoreRealStockArea').hover(function (e) {
$j(this).parent().find('.Search3_Result_UsedStoreRealStockLayer').show();
}, function (e) {
$j(this).parent().find('.Search3_Result_UsedStoreRealStockLayer').hide();
});
$j('.Search3_Result_SafeBasketArea').hover(function (e) {
$j(this).parent().find('.Search3_Result_SafeBasketLayer').show();
}, function (e) {
$j(this).parent().find('.Search3_Result_SafeBasketLayer').hide();
});
});
</script>
</div>"""