|
@@ -79,16 +79,15 @@ def request(query, params):
|
79
|
79
|
if params['time_range'] and params['time_range'] not in time_range_dict:
|
80
|
80
|
return params
|
81
|
81
|
|
82
|
|
- offset = 30 + (params['pageno'] - 1) * 50
|
83
|
|
- dc_param = offset + 1
|
|
82
|
+ offset = (params['pageno'] - 1) * 30
|
84
|
83
|
|
85
|
84
|
region_code = get_region_code(params['language'])
|
86
|
85
|
if region_code:
|
87
|
86
|
params['url'] = url.format(
|
88
|
|
- query=urlencode({'q': query, 'kl': region_code}), offset=offset, dc_param=dc_param)
|
|
87
|
+ query=urlencode({'q': query, 'kl': region_code}), offset=offset, dc_param=offset)
|
89
|
88
|
else:
|
90
|
89
|
params['url'] = url.format(
|
91
|
|
- query=urlencode({'q': query}), offset=offset, dc_param=dc_param)
|
|
90
|
+ query=urlencode({'q': query}), offset=offset, dc_param=offset)
|
92
|
91
|
|
93
|
92
|
if params['time_range'] in time_range_dict:
|
94
|
93
|
params['url'] += time_range_url.format(range=time_range_dict[params['time_range']])
|