@@ -11,7 +11,8 @@ def __init__(self, ecommerce_instance) -> None:
11
11
Initializes an instance of the GoogleShopping class.
12
12
13
13
Args:
14
- ecommerce_instance: The Ecommerce instance associated with the GoogleShopping class.
14
+ ecommerce_instance: The Ecommerce instance associated with the
15
+ GoogleShopping class.
15
16
"""
16
17
self ._ecommerce_instance = ecommerce_instance
17
18
@@ -26,7 +27,8 @@ def scrape_shopping_search(
26
27
27
28
Args:
28
29
query (str): UTF-encoded keyword
29
- opts (dict, optional): Configuration options for the search. Defaults to:
30
+ opts (dict, optional): Configuration options for the search.
31
+ Defaults to:
30
32
{
31
33
"domain": com,
32
34
"start_page": 1,
@@ -42,7 +44,9 @@ def scrape_shopping_search(
42
44
"parsing_instructions": None,
43
45
}
44
46
This parameter allows customization of the search request.
45
- request_timeout (int | 160, optional): The interval in seconds for the request to time out if no response is returned. Defaults to 160.
47
+ request_timeout (int | 165, optional): The interval in seconds for
48
+ the request to time out if no response is returned.
49
+ Defaults to 165.
46
50
47
51
Returns:
48
52
dict: The response from the server after the job is completed.
@@ -64,7 +68,8 @@ def scrape_shopping_url(
64
68
65
69
Args:
66
70
url (str): Direct URL (link) to Google page
67
- opts (GoogleShoppingUrlOpts, optional): Configuration options for the search. Defaults to:
71
+ opts (GoogleShoppingUrlOpts, optional): Configuration options for
72
+ the search. Defaults to:
68
73
{
69
74
"user_agent_type": desktop,
70
75
"render": None,
@@ -93,7 +98,8 @@ def scrape_shopping_products(
93
98
94
99
Args:
95
100
query (str): UTF-encoded product code.
96
- opts (GoogleShoppingProductOpts, optional): Configuration options for the search. Defaults to:
101
+ opts (GoogleShoppingProductOpts, optional): Configuration options
102
+ for the search. Defaults to:
97
103
{
98
104
"domain": com,
99
105
"locale": None,
@@ -125,7 +131,8 @@ def scrape_product_pricing(
125
131
126
132
Args:
127
133
query (str): UTF-encoded product code.
128
- opts (GoogleShoppingUrlOpts, optional): Configuration options for the search. Defaults to:
134
+ opts (GoogleShoppingUrlOpts, optional): Configuration options for
135
+ the search. Defaults to:
129
136
{
130
137
"domain": com,
131
138
"locale": None,
@@ -155,7 +162,8 @@ def __init__(self, ecommerce_async_instance) -> None:
155
162
Initializes an instance of the GoogleShoppingAsync class.
156
163
157
164
Args:
158
- ecommerce_async_instance: The EcommerceAsync instance associated with the GoogleShoppingAsync class.
165
+ ecommerce_async_instance: The EcommerceAsync instance associated
166
+ with the GoogleShoppingAsync class.
159
167
"""
160
168
self ._ecommerce_async_instance = ecommerce_async_instance
161
169
@@ -172,7 +180,8 @@ async def scrape_shopping_search(
172
180
173
181
Args:
174
182
query (str): UTF-encoded keyword.
175
- opts (dict, optional): Configuration options for the search. Defaults to:
183
+ opts (dict, optional): Configuration options for the search.
184
+ Defaults to:
176
185
{
177
186
"domain": com,
178
187
"start_page": 1,
@@ -188,8 +197,11 @@ async def scrape_shopping_search(
188
197
"parsing_instructions": None,
189
198
}
190
199
This parameter allows customization of the search request.
191
- request_timeout (int | 160, optional): The interval in seconds for the request to time out if no response is returned. Defaults to 160.
192
- poll_interval (int, optional): The interval in seconds for the request to poll the server for a response. Defaults to 2.
200
+ request_timeout (int | 165, optional): The interval in seconds for
201
+ the request to time out if no response is returned.
202
+ Defaults to 165.
203
+ poll_interval (int, optional): The interval in seconds for the
204
+ request to poll the server for a response. Defaults to 5.
193
205
194
206
Returns:
195
207
dict: The response from the server after the job is completed.
@@ -220,7 +232,8 @@ async def scrape_shopping_url(
220
232
221
233
Args:
222
234
url (str): Direct URL (link) to Google page.
223
- opts (GoogleShoppingUrlOpts, optional): Configuration options for the search. Defaults to:
235
+ opts (GoogleShoppingUrlOpts, optional): Configuration options for
236
+ the search. Defaults to:
224
237
{
225
238
"user_agent_type": desktop,
226
239
"render": None,
@@ -229,8 +242,11 @@ async def scrape_shopping_url(
229
242
"parse": None,
230
243
"parsing_instructions": None,
231
244
}
232
- request_timeout (int | 160, optional): The interval in seconds for the request to time out if no response is returned. Defaults to 160.
233
- poll_interval (int, optional): The interval in seconds for the request to poll the server for a response. Defaults to 2.
245
+ request_timeout (int | 165, optional): The interval in seconds
246
+ for the request to time out if no response is returned.
247
+ Defaults to 165.
248
+ poll_interval (int, optional): The interval in seconds for the
249
+ request to poll the server for a response. Defaults to 5.
234
250
Returns:
235
251
dict: The response from the server after the job is completed.
236
252
"""
@@ -260,7 +276,8 @@ async def scrape_shopping_products(
260
276
261
277
Args:
262
278
query (str): UTF-encoded product code.
263
- opts (GoogleShoppingProductOpts, optional): Configuration options for the search. Defaults to:
279
+ opts (GoogleShoppingProductOpts, optional): Configuration options
280
+ for the search. Defaults to:
264
281
{
265
282
"domain": com,
266
283
"locale": None,
@@ -272,8 +289,11 @@ async def scrape_shopping_products(
272
289
"parse": None,
273
290
"parsing_instructions": None,
274
291
}
275
- request_timeout (int | 160, optional): The interval in seconds for the request to time out if no response is returned. Defaults to 160.
276
- poll_interval (int, optional): The interval in seconds for the request to poll the server for a response. Defaults to 2.
292
+ request_timeout (int | 165, optional): The interval in seconds for
293
+ the request to time out if no response is returned.
294
+ Defaults to 165.
295
+ poll_interval (int, optional): The interval in seconds for the
296
+ request to poll the server for a response. Defaults to 5.
277
297
Returns:
278
298
dict: The response from the server after the job is completed.
279
299
"""
@@ -303,7 +323,8 @@ async def scrape_product_pricing(
303
323
304
324
Args:
305
325
url (str): UTF-encoded product code.
306
- opts (GoogleShoppingUrlOpts, optional): Configuration options for the search. Defaults to:
326
+ opts (GoogleShoppingUrlOpts, optional): Configuration options for
327
+ the search. Defaults to:
307
328
{
308
329
"domain": com,
309
330
"start_page": 1,
@@ -317,8 +338,11 @@ async def scrape_product_pricing(
317
338
"parse": None,
318
339
"parsing_instructions": None,
319
340
}
320
- request_timeout (int | 160, optional): The interval in seconds for the request to time out if no response is returned. Defaults to 160.
321
- poll_interval (int, optional): The interval in seconds for the request to poll the server for a response. Defaults to 2.
341
+ request_timeout (int | 165, optional): The interval in seconds for
342
+ the request to time out if no response is returned.
343
+ Defaults to 165.
344
+ poll_interval (int, optional): The interval in seconds for the
345
+ request to poll the server for a response. Defaults to 5.
322
346
Returns:
323
347
dict: The response from the server after the job is completed.
324
348
"""
0 commit comments