scrapebadger 0.1.0
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 +7 -0
- data/Gemfile +9 -0
- data/LICENSE +21 -0
- data/README.md +548 -0
- data/Rakefile +10 -0
- data/docs/AccountApi.md +76 -0
- data/docs/AccountInfo.md +28 -0
- data/docs/AmazonApi.md +1244 -0
- data/docs/ApartmentsApi.md +373 -0
- data/docs/BaiduApi.md +447 -0
- data/docs/BillingLogListResponse.md +24 -0
- data/docs/BillingLogResponse.md +32 -0
- data/docs/BingApi.md +610 -0
- data/docs/ChatGPTApi.md +521 -0
- data/docs/DepopApi.md +542 -0
- data/docs/DuckDuckGoApi.md +700 -0
- data/docs/EBayApi.md +1019 -0
- data/docs/FacebookApi.md +1671 -0
- data/docs/FilterRuleCreate.md +28 -0
- data/docs/FilterRuleDeliveryLogListResponse.md +24 -0
- data/docs/FilterRuleDeliveryLogResponse.md +44 -0
- data/docs/FilterRuleListResponse.md +24 -0
- data/docs/FilterRuleResponse.md +40 -0
- data/docs/FilterRuleUpdate.md +30 -0
- data/docs/FilterRuleValidateRequest.md +18 -0
- data/docs/FilterRuleValidateResponse.md +22 -0
- data/docs/GoogleApi.md +3175 -0
- data/docs/HTTPValidationError.md +18 -0
- data/docs/IdealistaApi.md +822 -0
- data/docs/ImmobiliareApi.md +773 -0
- data/docs/InstagramApi.md +1673 -0
- data/docs/LeboncoinApi.md +884 -0
- data/docs/LinkedInApi.md +925 -0
- data/docs/LoopNetApi.md +529 -0
- data/docs/PortalApiRoutersV1TwitterFilterRulesFilterRulePricingResponse.md +20 -0
- data/docs/RealtorApi.md +474 -0
- data/docs/RedditApi.md +1677 -0
- data/docs/RedfinApi.md +616 -0
- data/docs/StreamMonitorCreate.md +26 -0
- data/docs/StreamMonitorListResponse.md +24 -0
- data/docs/StreamMonitorResponse.md +42 -0
- data/docs/StreamMonitorUpdate.md +28 -0
- data/docs/SubscriptionInfo.md +40 -0
- data/docs/TikTokApi.md +2104 -0
- data/docs/TweetDeliveryLogListResponse.md +24 -0
- data/docs/TweetDeliveryLogResponse.md +44 -0
- data/docs/TwitterApi.md +4091 -0
- data/docs/ValidationError.md +22 -0
- data/docs/ValidationErrorLocInner.md +15 -0
- data/docs/VintedApi.md +766 -0
- data/docs/WalmartApi.md +904 -0
- data/docs/WebApi.md +634 -0
- data/docs/WebhookCreate.md +22 -0
- data/docs/WebhookListItem.md +28 -0
- data/docs/WebhookListResponse.md +20 -0
- data/docs/WebhookResponse.md +26 -0
- data/docs/WebhookTestRequest.md +18 -0
- data/docs/WebhookTestResponse.md +24 -0
- data/docs/YahooApi.md +602 -0
- data/docs/YandexApi.md +450 -0
- data/docs/YouTubeApi.md +2872 -0
- data/docs/ZillowApi.md +622 -0
- data/git_push.sh +57 -0
- data/lib/scrapebadger/api/account_api.rb +79 -0
- data/lib/scrapebadger/api/amazon_api.rb +1165 -0
- data/lib/scrapebadger/api/apartments_api.rb +377 -0
- data/lib/scrapebadger/api/baidu_api.rb +436 -0
- data/lib/scrapebadger/api/bing_api.rb +580 -0
- data/lib/scrapebadger/api/chat_gpt_api.rb +466 -0
- data/lib/scrapebadger/api/depop_api.rb +518 -0
- data/lib/scrapebadger/api/duck_duck_go_api.rb +675 -0
- data/lib/scrapebadger/api/e_bay_api.rb +1029 -0
- data/lib/scrapebadger/api/facebook_api.rb +1492 -0
- data/lib/scrapebadger/api/google_api.rb +3191 -0
- data/lib/scrapebadger/api/idealista_api.rb +864 -0
- data/lib/scrapebadger/api/immobiliare_api.rb +734 -0
- data/lib/scrapebadger/api/instagram_api.rb +1555 -0
- data/lib/scrapebadger/api/leboncoin_api.rb +818 -0
- data/lib/scrapebadger/api/linked_in_api.rb +832 -0
- data/lib/scrapebadger/api/loop_net_api.rb +503 -0
- data/lib/scrapebadger/api/realtor_api.rb +481 -0
- data/lib/scrapebadger/api/reddit_api.rb +1601 -0
- data/lib/scrapebadger/api/redfin_api.rb +625 -0
- data/lib/scrapebadger/api/tik_tok_api.rb +2029 -0
- data/lib/scrapebadger/api/twitter_api.rb +3696 -0
- data/lib/scrapebadger/api/vinted_api.rb +705 -0
- data/lib/scrapebadger/api/walmart_api.rb +876 -0
- data/lib/scrapebadger/api/web_api.rb +547 -0
- data/lib/scrapebadger/api/yahoo_api.rb +560 -0
- data/lib/scrapebadger/api/yandex_api.rb +422 -0
- data/lib/scrapebadger/api/you_tube_api.rb +2520 -0
- data/lib/scrapebadger/api/zillow_api.rb +634 -0
- data/lib/scrapebadger/api_client.rb +394 -0
- data/lib/scrapebadger/api_error.rb +58 -0
- data/lib/scrapebadger/configuration.rb +308 -0
- data/lib/scrapebadger/models/account_info.rb +288 -0
- data/lib/scrapebadger/models/billing_log_list_response.rb +272 -0
- data/lib/scrapebadger/models/billing_log_response.rb +334 -0
- data/lib/scrapebadger/models/filter_rule_create.rb +427 -0
- data/lib/scrapebadger/models/filter_rule_delivery_log_list_response.rb +272 -0
- data/lib/scrapebadger/models/filter_rule_delivery_log_response.rb +422 -0
- data/lib/scrapebadger/models/filter_rule_list_response.rb +272 -0
- data/lib/scrapebadger/models/filter_rule_response.rb +390 -0
- data/lib/scrapebadger/models/filter_rule_update.rb +389 -0
- data/lib/scrapebadger/models/filter_rule_validate_request.rb +250 -0
- data/lib/scrapebadger/models/filter_rule_validate_response.rb +248 -0
- data/lib/scrapebadger/models/http_validation_error.rb +216 -0
- data/lib/scrapebadger/models/portal_api_routers_v1_twitter_filter_rules_filter_rule_pricing_response.rb +238 -0
- data/lib/scrapebadger/models/stream_monitor_create.rb +373 -0
- data/lib/scrapebadger/models/stream_monitor_list_response.rb +272 -0
- data/lib/scrapebadger/models/stream_monitor_response.rb +406 -0
- data/lib/scrapebadger/models/stream_monitor_update.rb +335 -0
- data/lib/scrapebadger/models/subscription_info.rb +352 -0
- data/lib/scrapebadger/models/tweet_delivery_log_list_response.rb +272 -0
- data/lib/scrapebadger/models/tweet_delivery_log_response.rb +422 -0
- data/lib/scrapebadger/models/validation_error.rb +255 -0
- data/lib/scrapebadger/models/validation_error_loc_inner.rb +104 -0
- data/lib/scrapebadger/models/webhook_create.rb +282 -0
- data/lib/scrapebadger/models/webhook_list_item.rb +302 -0
- data/lib/scrapebadger/models/webhook_list_response.rb +240 -0
- data/lib/scrapebadger/models/webhook_response.rb +286 -0
- data/lib/scrapebadger/models/webhook_test_request.rb +223 -0
- data/lib/scrapebadger/models/webhook_test_response.rb +259 -0
- data/lib/scrapebadger/version.rb +15 -0
- data/lib/scrapebadger.rb +96 -0
- data/scrapebadger.gemspec +39 -0
- data/spec/api/account_api_spec.rb +46 -0
- data/spec/api/amazon_api_spec.rb +258 -0
- data/spec/api/apartments_api_spec.rb +98 -0
- data/spec/api/baidu_api_spec.rb +109 -0
- data/spec/api/bing_api_spec.rb +141 -0
- data/spec/api/chat_gpt_api_spec.rb +123 -0
- data/spec/api/depop_api_spec.rb +132 -0
- data/spec/api/duck_duck_go_api_spec.rb +162 -0
- data/spec/api/e_bay_api_spec.rb +222 -0
- data/spec/api/facebook_api_spec.rb +326 -0
- data/spec/api/google_api_spec.rb +649 -0
- data/spec/api/idealista_api_spec.rb +197 -0
- data/spec/api/immobiliare_api_spec.rb +174 -0
- data/spec/api/instagram_api_spec.rb +309 -0
- data/spec/api/leboncoin_api_spec.rb +184 -0
- data/spec/api/linked_in_api_spec.rb +197 -0
- data/spec/api/loop_net_api_spec.rb +127 -0
- data/spec/api/realtor_api_spec.rb +123 -0
- data/spec/api/reddit_api_spec.rb +331 -0
- data/spec/api/redfin_api_spec.rb +147 -0
- data/spec/api/tik_tok_api_spec.rb +413 -0
- data/spec/api/twitter_api_spec.rb +735 -0
- data/spec/api/vinted_api_spec.rb +169 -0
- data/spec/api/walmart_api_spec.rb +192 -0
- data/spec/api/web_api_spec.rb +136 -0
- data/spec/api/yahoo_api_spec.rb +137 -0
- data/spec/api/yandex_api_spec.rb +111 -0
- data/spec/api/you_tube_api_spec.rb +500 -0
- data/spec/api/zillow_api_spec.rb +150 -0
- data/spec/models/account_info_spec.rb +66 -0
- data/spec/models/billing_log_list_response_spec.rb +54 -0
- data/spec/models/billing_log_response_spec.rb +78 -0
- data/spec/models/filter_rule_create_spec.rb +66 -0
- data/spec/models/filter_rule_delivery_log_list_response_spec.rb +54 -0
- data/spec/models/filter_rule_delivery_log_response_spec.rb +114 -0
- data/spec/models/filter_rule_list_response_spec.rb +54 -0
- data/spec/models/filter_rule_response_spec.rb +102 -0
- data/spec/models/filter_rule_update_spec.rb +72 -0
- data/spec/models/filter_rule_validate_request_spec.rb +36 -0
- data/spec/models/filter_rule_validate_response_spec.rb +48 -0
- data/spec/models/http_validation_error_spec.rb +36 -0
- data/spec/models/portal_api_routers_v1_twitter_filter_rules_filter_rule_pricing_response_spec.rb +42 -0
- data/spec/models/stream_monitor_create_spec.rb +60 -0
- data/spec/models/stream_monitor_list_response_spec.rb +54 -0
- data/spec/models/stream_monitor_response_spec.rb +108 -0
- data/spec/models/stream_monitor_update_spec.rb +66 -0
- data/spec/models/subscription_info_spec.rb +102 -0
- data/spec/models/tweet_delivery_log_list_response_spec.rb +54 -0
- data/spec/models/tweet_delivery_log_response_spec.rb +114 -0
- data/spec/models/validation_error_loc_inner_spec.rb +21 -0
- data/spec/models/validation_error_spec.rb +48 -0
- data/spec/models/webhook_create_spec.rb +48 -0
- data/spec/models/webhook_list_item_spec.rb +66 -0
- data/spec/models/webhook_list_response_spec.rb +42 -0
- data/spec/models/webhook_response_spec.rb +60 -0
- data/spec/models/webhook_test_request_spec.rb +36 -0
- data/spec/models/webhook_test_response_spec.rb +54 -0
- data/spec/spec_helper.rb +111 -0
- metadata +324 -0
|
@@ -0,0 +1,547 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#ScrapeBadger API
|
|
3
|
+
|
|
4
|
+
#Unified credit-based scraping API. https://docs.scrapebadger.com
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.10.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module ScrapeBadger
|
|
16
|
+
class WebApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Detect anti-bot and CAPTCHA systems
|
|
23
|
+
# Detect which anti-bot and CAPTCHA systems are present on a URL. Uses rnet to fetch the page and identify DataDome, Cloudflare, Akamai, Kasada, Amazon WAF, reCAPTCHA, hCaptcha, GeeTest, and more. Cost: 1 credit.
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @return [Object]
|
|
26
|
+
def web_detect_anti_bot_and_captcha_systems(opts = {})
|
|
27
|
+
data, _status_code, _headers = web_detect_anti_bot_and_captcha_systems_with_http_info(opts)
|
|
28
|
+
data
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Detect anti-bot and CAPTCHA systems
|
|
32
|
+
# Detect which anti-bot and CAPTCHA systems are present on a URL. Uses rnet to fetch the page and identify DataDome, Cloudflare, Akamai, Kasada, Amazon WAF, reCAPTCHA, hCaptcha, GeeTest, and more. Cost: 1 credit.
|
|
33
|
+
# @param [Hash] opts the optional parameters
|
|
34
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
35
|
+
def web_detect_anti_bot_and_captcha_systems_with_http_info(opts = {})
|
|
36
|
+
if @api_client.config.debugging
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: WebApi.web_detect_anti_bot_and_captcha_systems ...'
|
|
38
|
+
end
|
|
39
|
+
# resource path
|
|
40
|
+
local_var_path = '/v1/web/detect'
|
|
41
|
+
|
|
42
|
+
# query parameters
|
|
43
|
+
query_params = opts[:query_params] || {}
|
|
44
|
+
|
|
45
|
+
# header parameters
|
|
46
|
+
header_params = opts[:header_params] || {}
|
|
47
|
+
# HTTP header 'Accept' (if needed)
|
|
48
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
49
|
+
|
|
50
|
+
# form parameters
|
|
51
|
+
form_params = opts[:form_params] || {}
|
|
52
|
+
|
|
53
|
+
# http body (model)
|
|
54
|
+
post_body = opts[:debug_body]
|
|
55
|
+
|
|
56
|
+
# return_type
|
|
57
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
58
|
+
|
|
59
|
+
# auth_names
|
|
60
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
61
|
+
|
|
62
|
+
new_options = opts.merge(
|
|
63
|
+
:operation => :"WebApi.web_detect_anti_bot_and_captcha_systems",
|
|
64
|
+
:header_params => header_params,
|
|
65
|
+
:query_params => query_params,
|
|
66
|
+
:form_params => form_params,
|
|
67
|
+
:body => post_body,
|
|
68
|
+
:auth_names => auth_names,
|
|
69
|
+
:return_type => return_type
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
73
|
+
if @api_client.config.debugging
|
|
74
|
+
@api_client.config.logger.debug "API called: WebApi#web_detect_anti_bot_and_captcha_systems\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
75
|
+
end
|
|
76
|
+
return data, status_code, headers
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Extract structured data
|
|
80
|
+
# Extract structured data from a URL using CSS or XPath selectors. (Phase 6)
|
|
81
|
+
# @param [Hash] opts the optional parameters
|
|
82
|
+
# @return [Object]
|
|
83
|
+
def web_extract_structured_data(opts = {})
|
|
84
|
+
data, _status_code, _headers = web_extract_structured_data_with_http_info(opts)
|
|
85
|
+
data
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Extract structured data
|
|
89
|
+
# Extract structured data from a URL using CSS or XPath selectors. (Phase 6)
|
|
90
|
+
# @param [Hash] opts the optional parameters
|
|
91
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
92
|
+
def web_extract_structured_data_with_http_info(opts = {})
|
|
93
|
+
if @api_client.config.debugging
|
|
94
|
+
@api_client.config.logger.debug 'Calling API: WebApi.web_extract_structured_data ...'
|
|
95
|
+
end
|
|
96
|
+
# resource path
|
|
97
|
+
local_var_path = '/v1/web/extract'
|
|
98
|
+
|
|
99
|
+
# query parameters
|
|
100
|
+
query_params = opts[:query_params] || {}
|
|
101
|
+
|
|
102
|
+
# header parameters
|
|
103
|
+
header_params = opts[:header_params] || {}
|
|
104
|
+
# HTTP header 'Accept' (if needed)
|
|
105
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
106
|
+
|
|
107
|
+
# form parameters
|
|
108
|
+
form_params = opts[:form_params] || {}
|
|
109
|
+
|
|
110
|
+
# http body (model)
|
|
111
|
+
post_body = opts[:debug_body]
|
|
112
|
+
|
|
113
|
+
# return_type
|
|
114
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
115
|
+
|
|
116
|
+
# auth_names
|
|
117
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
118
|
+
|
|
119
|
+
new_options = opts.merge(
|
|
120
|
+
:operation => :"WebApi.web_extract_structured_data",
|
|
121
|
+
:header_params => header_params,
|
|
122
|
+
:query_params => query_params,
|
|
123
|
+
:form_params => form_params,
|
|
124
|
+
:body => post_body,
|
|
125
|
+
:auth_names => auth_names,
|
|
126
|
+
:return_type => return_type
|
|
127
|
+
)
|
|
128
|
+
|
|
129
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
130
|
+
if @api_client.config.debugging
|
|
131
|
+
@api_client.config.logger.debug "API called: WebApi#web_extract_structured_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
132
|
+
end
|
|
133
|
+
return data, status_code, headers
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Get batch job status
|
|
137
|
+
# Get the status of a batch scraping job. (Phase 6)
|
|
138
|
+
# @param job_id [String]
|
|
139
|
+
# @param [Hash] opts the optional parameters
|
|
140
|
+
# @return [Object]
|
|
141
|
+
def web_get_batch_job_status(job_id, opts = {})
|
|
142
|
+
data, _status_code, _headers = web_get_batch_job_status_with_http_info(job_id, opts)
|
|
143
|
+
data
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Get batch job status
|
|
147
|
+
# Get the status of a batch scraping job. (Phase 6)
|
|
148
|
+
# @param job_id [String]
|
|
149
|
+
# @param [Hash] opts the optional parameters
|
|
150
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
151
|
+
def web_get_batch_job_status_with_http_info(job_id, opts = {})
|
|
152
|
+
if @api_client.config.debugging
|
|
153
|
+
@api_client.config.logger.debug 'Calling API: WebApi.web_get_batch_job_status ...'
|
|
154
|
+
end
|
|
155
|
+
# verify the required parameter 'job_id' is set
|
|
156
|
+
if @api_client.config.client_side_validation && job_id.nil?
|
|
157
|
+
fail ArgumentError, "Missing the required parameter 'job_id' when calling WebApi.web_get_batch_job_status"
|
|
158
|
+
end
|
|
159
|
+
# resource path
|
|
160
|
+
local_var_path = '/v1/web/batch/{job_id}'.sub('{' + 'job_id' + '}', CGI.escape(job_id.to_s))
|
|
161
|
+
|
|
162
|
+
# query parameters
|
|
163
|
+
query_params = opts[:query_params] || {}
|
|
164
|
+
|
|
165
|
+
# header parameters
|
|
166
|
+
header_params = opts[:header_params] || {}
|
|
167
|
+
# HTTP header 'Accept' (if needed)
|
|
168
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
169
|
+
|
|
170
|
+
# form parameters
|
|
171
|
+
form_params = opts[:form_params] || {}
|
|
172
|
+
|
|
173
|
+
# http body (model)
|
|
174
|
+
post_body = opts[:debug_body]
|
|
175
|
+
|
|
176
|
+
# return_type
|
|
177
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
178
|
+
|
|
179
|
+
# auth_names
|
|
180
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
181
|
+
|
|
182
|
+
new_options = opts.merge(
|
|
183
|
+
:operation => :"WebApi.web_get_batch_job_status",
|
|
184
|
+
:header_params => header_params,
|
|
185
|
+
:query_params => query_params,
|
|
186
|
+
:form_params => form_params,
|
|
187
|
+
:body => post_body,
|
|
188
|
+
:auth_names => auth_names,
|
|
189
|
+
:return_type => return_type
|
|
190
|
+
)
|
|
191
|
+
|
|
192
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
193
|
+
if @api_client.config.debugging
|
|
194
|
+
@api_client.config.logger.debug "API called: WebApi#web_get_batch_job_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
195
|
+
end
|
|
196
|
+
return data, status_code, headers
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# Poll an auto-unblock discovery job
|
|
200
|
+
# Return the status + progress narration for an auto-unblock job. Polled by the playground loader. ``job_id`` is an unguessable UUID handed out in the ``202 unblocking`` envelope and acts as a capability token, so any authenticated caller holding it can read the job (this is what lets several users share one discovery run's loader).
|
|
201
|
+
# @param job_id [String]
|
|
202
|
+
# @param [Hash] opts the optional parameters
|
|
203
|
+
# @return [Object]
|
|
204
|
+
def web_poll_an_auto_unblock_discovery_job(job_id, opts = {})
|
|
205
|
+
data, _status_code, _headers = web_poll_an_auto_unblock_discovery_job_with_http_info(job_id, opts)
|
|
206
|
+
data
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# Poll an auto-unblock discovery job
|
|
210
|
+
# Return the status + progress narration for an auto-unblock job. Polled by the playground loader. ``job_id`` is an unguessable UUID handed out in the ``202 unblocking`` envelope and acts as a capability token, so any authenticated caller holding it can read the job (this is what lets several users share one discovery run's loader).
|
|
211
|
+
# @param job_id [String]
|
|
212
|
+
# @param [Hash] opts the optional parameters
|
|
213
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
214
|
+
def web_poll_an_auto_unblock_discovery_job_with_http_info(job_id, opts = {})
|
|
215
|
+
if @api_client.config.debugging
|
|
216
|
+
@api_client.config.logger.debug 'Calling API: WebApi.web_poll_an_auto_unblock_discovery_job ...'
|
|
217
|
+
end
|
|
218
|
+
# verify the required parameter 'job_id' is set
|
|
219
|
+
if @api_client.config.client_side_validation && job_id.nil?
|
|
220
|
+
fail ArgumentError, "Missing the required parameter 'job_id' when calling WebApi.web_poll_an_auto_unblock_discovery_job"
|
|
221
|
+
end
|
|
222
|
+
# resource path
|
|
223
|
+
local_var_path = '/v1/web/unblock/{job_id}'.sub('{' + 'job_id' + '}', CGI.escape(job_id.to_s))
|
|
224
|
+
|
|
225
|
+
# query parameters
|
|
226
|
+
query_params = opts[:query_params] || {}
|
|
227
|
+
|
|
228
|
+
# header parameters
|
|
229
|
+
header_params = opts[:header_params] || {}
|
|
230
|
+
# HTTP header 'Accept' (if needed)
|
|
231
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
232
|
+
|
|
233
|
+
# form parameters
|
|
234
|
+
form_params = opts[:form_params] || {}
|
|
235
|
+
|
|
236
|
+
# http body (model)
|
|
237
|
+
post_body = opts[:debug_body]
|
|
238
|
+
|
|
239
|
+
# return_type
|
|
240
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
241
|
+
|
|
242
|
+
# auth_names
|
|
243
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
244
|
+
|
|
245
|
+
new_options = opts.merge(
|
|
246
|
+
:operation => :"WebApi.web_poll_an_auto_unblock_discovery_job",
|
|
247
|
+
:header_params => header_params,
|
|
248
|
+
:query_params => query_params,
|
|
249
|
+
:form_params => form_params,
|
|
250
|
+
:body => post_body,
|
|
251
|
+
:auth_names => auth_names,
|
|
252
|
+
:return_type => return_type
|
|
253
|
+
)
|
|
254
|
+
|
|
255
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
256
|
+
if @api_client.config.debugging
|
|
257
|
+
@api_client.config.logger.debug "API called: WebApi#web_poll_an_auto_unblock_discovery_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
258
|
+
end
|
|
259
|
+
return data, status_code, headers
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
# Scrape a URL
|
|
263
|
+
# Scrape a URL and return its content. The Generic Web Scraping API is fully user-driven: callers pick their own request parameters (engine, proxy tier, country, JS rendering, …). A blocked target surfaces the raw 422 ``blocking_page_detected`` so the caller can tune parameters themselves — we do NOT auto-trigger host discovery. Curated per-origin overrides (which the dedicated scraper APIs depend on) still apply.
|
|
264
|
+
# @param [Hash] opts the optional parameters
|
|
265
|
+
# @return [Object]
|
|
266
|
+
def web_scrape_a_url(opts = {})
|
|
267
|
+
data, _status_code, _headers = web_scrape_a_url_with_http_info(opts)
|
|
268
|
+
data
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
# Scrape a URL
|
|
272
|
+
# Scrape a URL and return its content. The Generic Web Scraping API is fully user-driven: callers pick their own request parameters (engine, proxy tier, country, JS rendering, …). A blocked target surfaces the raw 422 ``blocking_page_detected`` so the caller can tune parameters themselves — we do NOT auto-trigger host discovery. Curated per-origin overrides (which the dedicated scraper APIs depend on) still apply.
|
|
273
|
+
# @param [Hash] opts the optional parameters
|
|
274
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
275
|
+
def web_scrape_a_url_with_http_info(opts = {})
|
|
276
|
+
if @api_client.config.debugging
|
|
277
|
+
@api_client.config.logger.debug 'Calling API: WebApi.web_scrape_a_url ...'
|
|
278
|
+
end
|
|
279
|
+
# resource path
|
|
280
|
+
local_var_path = '/v1/web/scrape'
|
|
281
|
+
|
|
282
|
+
# query parameters
|
|
283
|
+
query_params = opts[:query_params] || {}
|
|
284
|
+
|
|
285
|
+
# header parameters
|
|
286
|
+
header_params = opts[:header_params] || {}
|
|
287
|
+
# HTTP header 'Accept' (if needed)
|
|
288
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
289
|
+
|
|
290
|
+
# form parameters
|
|
291
|
+
form_params = opts[:form_params] || {}
|
|
292
|
+
|
|
293
|
+
# http body (model)
|
|
294
|
+
post_body = opts[:debug_body]
|
|
295
|
+
|
|
296
|
+
# return_type
|
|
297
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
298
|
+
|
|
299
|
+
# auth_names
|
|
300
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
301
|
+
|
|
302
|
+
new_options = opts.merge(
|
|
303
|
+
:operation => :"WebApi.web_scrape_a_url",
|
|
304
|
+
:header_params => header_params,
|
|
305
|
+
:query_params => query_params,
|
|
306
|
+
:form_params => form_params,
|
|
307
|
+
:body => post_body,
|
|
308
|
+
:auth_names => auth_names,
|
|
309
|
+
:return_type => return_type
|
|
310
|
+
)
|
|
311
|
+
|
|
312
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
313
|
+
if @api_client.config.debugging
|
|
314
|
+
@api_client.config.logger.debug "API called: WebApi#web_scrape_a_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
315
|
+
end
|
|
316
|
+
return data, status_code, headers
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
# Submit batch scraping job
|
|
320
|
+
# Submit a batch of URLs for scraping. (Phase 6)
|
|
321
|
+
# @param [Hash] opts the optional parameters
|
|
322
|
+
# @return [Object]
|
|
323
|
+
def web_submit_batch_scraping_job(opts = {})
|
|
324
|
+
data, _status_code, _headers = web_submit_batch_scraping_job_with_http_info(opts)
|
|
325
|
+
data
|
|
326
|
+
end
|
|
327
|
+
|
|
328
|
+
# Submit batch scraping job
|
|
329
|
+
# Submit a batch of URLs for scraping. (Phase 6)
|
|
330
|
+
# @param [Hash] opts the optional parameters
|
|
331
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
332
|
+
def web_submit_batch_scraping_job_with_http_info(opts = {})
|
|
333
|
+
if @api_client.config.debugging
|
|
334
|
+
@api_client.config.logger.debug 'Calling API: WebApi.web_submit_batch_scraping_job ...'
|
|
335
|
+
end
|
|
336
|
+
# resource path
|
|
337
|
+
local_var_path = '/v1/web/batch'
|
|
338
|
+
|
|
339
|
+
# query parameters
|
|
340
|
+
query_params = opts[:query_params] || {}
|
|
341
|
+
|
|
342
|
+
# header parameters
|
|
343
|
+
header_params = opts[:header_params] || {}
|
|
344
|
+
# HTTP header 'Accept' (if needed)
|
|
345
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
346
|
+
|
|
347
|
+
# form parameters
|
|
348
|
+
form_params = opts[:form_params] || {}
|
|
349
|
+
|
|
350
|
+
# http body (model)
|
|
351
|
+
post_body = opts[:debug_body]
|
|
352
|
+
|
|
353
|
+
# return_type
|
|
354
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
355
|
+
|
|
356
|
+
# auth_names
|
|
357
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
358
|
+
|
|
359
|
+
new_options = opts.merge(
|
|
360
|
+
:operation => :"WebApi.web_submit_batch_scraping_job",
|
|
361
|
+
:header_params => header_params,
|
|
362
|
+
:query_params => query_params,
|
|
363
|
+
:form_params => form_params,
|
|
364
|
+
:body => post_body,
|
|
365
|
+
:auth_names => auth_names,
|
|
366
|
+
:return_type => return_type
|
|
367
|
+
)
|
|
368
|
+
|
|
369
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
370
|
+
if @api_client.config.debugging
|
|
371
|
+
@api_client.config.logger.debug "API called: WebApi#web_submit_batch_scraping_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
372
|
+
end
|
|
373
|
+
return data, status_code, headers
|
|
374
|
+
end
|
|
375
|
+
|
|
376
|
+
# Take a screenshot
|
|
377
|
+
# Take a screenshot of a URL. (Phase 2 — patchright engine)
|
|
378
|
+
# @param [Hash] opts the optional parameters
|
|
379
|
+
# @return [Object]
|
|
380
|
+
def web_take_a_screenshot(opts = {})
|
|
381
|
+
data, _status_code, _headers = web_take_a_screenshot_with_http_info(opts)
|
|
382
|
+
data
|
|
383
|
+
end
|
|
384
|
+
|
|
385
|
+
# Take a screenshot
|
|
386
|
+
# Take a screenshot of a URL. (Phase 2 — patchright engine)
|
|
387
|
+
# @param [Hash] opts the optional parameters
|
|
388
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
389
|
+
def web_take_a_screenshot_with_http_info(opts = {})
|
|
390
|
+
if @api_client.config.debugging
|
|
391
|
+
@api_client.config.logger.debug 'Calling API: WebApi.web_take_a_screenshot ...'
|
|
392
|
+
end
|
|
393
|
+
# resource path
|
|
394
|
+
local_var_path = '/v1/web/screenshot'
|
|
395
|
+
|
|
396
|
+
# query parameters
|
|
397
|
+
query_params = opts[:query_params] || {}
|
|
398
|
+
|
|
399
|
+
# header parameters
|
|
400
|
+
header_params = opts[:header_params] || {}
|
|
401
|
+
# HTTP header 'Accept' (if needed)
|
|
402
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
403
|
+
|
|
404
|
+
# form parameters
|
|
405
|
+
form_params = opts[:form_params] || {}
|
|
406
|
+
|
|
407
|
+
# http body (model)
|
|
408
|
+
post_body = opts[:debug_body]
|
|
409
|
+
|
|
410
|
+
# return_type
|
|
411
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
412
|
+
|
|
413
|
+
# auth_names
|
|
414
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
415
|
+
|
|
416
|
+
new_options = opts.merge(
|
|
417
|
+
:operation => :"WebApi.web_take_a_screenshot",
|
|
418
|
+
:header_params => header_params,
|
|
419
|
+
:query_params => query_params,
|
|
420
|
+
:form_params => form_params,
|
|
421
|
+
:body => post_body,
|
|
422
|
+
:auth_names => auth_names,
|
|
423
|
+
:return_type => return_type
|
|
424
|
+
)
|
|
425
|
+
|
|
426
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
427
|
+
if @api_client.config.debugging
|
|
428
|
+
@api_client.config.logger.debug "API called: WebApi#web_take_a_screenshot\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
429
|
+
end
|
|
430
|
+
return data, status_code, headers
|
|
431
|
+
end
|
|
432
|
+
|
|
433
|
+
# Web scraper health check
|
|
434
|
+
# Check health of the web scraper service. Bypasses the proxy abstraction because web-scraper exposes ``/health`` at the root (no ``/api/v1`` prefix, unlike the other scraper services). Accepts ``HEAD`` so external uptime checkers (UptimeRobot uses HEAD by default for HTTP monitors) don't get a 405 Method Not Allowed.
|
|
435
|
+
# @param [Hash] opts the optional parameters
|
|
436
|
+
# @return [Object]
|
|
437
|
+
def web_web_scraper_health_check(opts = {})
|
|
438
|
+
data, _status_code, _headers = web_web_scraper_health_check_with_http_info(opts)
|
|
439
|
+
data
|
|
440
|
+
end
|
|
441
|
+
|
|
442
|
+
# Web scraper health check
|
|
443
|
+
# Check health of the web scraper service. Bypasses the proxy abstraction because web-scraper exposes ``/health`` at the root (no ``/api/v1`` prefix, unlike the other scraper services). Accepts ``HEAD`` so external uptime checkers (UptimeRobot uses HEAD by default for HTTP monitors) don't get a 405 Method Not Allowed.
|
|
444
|
+
# @param [Hash] opts the optional parameters
|
|
445
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
446
|
+
def web_web_scraper_health_check_with_http_info(opts = {})
|
|
447
|
+
if @api_client.config.debugging
|
|
448
|
+
@api_client.config.logger.debug 'Calling API: WebApi.web_web_scraper_health_check ...'
|
|
449
|
+
end
|
|
450
|
+
# resource path
|
|
451
|
+
local_var_path = '/v1/web/health'
|
|
452
|
+
|
|
453
|
+
# query parameters
|
|
454
|
+
query_params = opts[:query_params] || {}
|
|
455
|
+
|
|
456
|
+
# header parameters
|
|
457
|
+
header_params = opts[:header_params] || {}
|
|
458
|
+
# HTTP header 'Accept' (if needed)
|
|
459
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
460
|
+
|
|
461
|
+
# form parameters
|
|
462
|
+
form_params = opts[:form_params] || {}
|
|
463
|
+
|
|
464
|
+
# http body (model)
|
|
465
|
+
post_body = opts[:debug_body]
|
|
466
|
+
|
|
467
|
+
# return_type
|
|
468
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
469
|
+
|
|
470
|
+
# auth_names
|
|
471
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
472
|
+
|
|
473
|
+
new_options = opts.merge(
|
|
474
|
+
:operation => :"WebApi.web_web_scraper_health_check",
|
|
475
|
+
:header_params => header_params,
|
|
476
|
+
:query_params => query_params,
|
|
477
|
+
:form_params => form_params,
|
|
478
|
+
:body => post_body,
|
|
479
|
+
:auth_names => auth_names,
|
|
480
|
+
:return_type => return_type
|
|
481
|
+
)
|
|
482
|
+
|
|
483
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
484
|
+
if @api_client.config.debugging
|
|
485
|
+
@api_client.config.logger.debug "API called: WebApi#web_web_scraper_health_check\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
486
|
+
end
|
|
487
|
+
return data, status_code, headers
|
|
488
|
+
end
|
|
489
|
+
|
|
490
|
+
# Web scraper health check
|
|
491
|
+
# Check health of the web scraper service. Bypasses the proxy abstraction because web-scraper exposes ``/health`` at the root (no ``/api/v1`` prefix, unlike the other scraper services). Accepts ``HEAD`` so external uptime checkers (UptimeRobot uses HEAD by default for HTTP monitors) don't get a 405 Method Not Allowed.
|
|
492
|
+
# @param [Hash] opts the optional parameters
|
|
493
|
+
# @return [Object]
|
|
494
|
+
def web_web_scraper_health_check_head(opts = {})
|
|
495
|
+
data, _status_code, _headers = web_web_scraper_health_check_head_with_http_info(opts)
|
|
496
|
+
data
|
|
497
|
+
end
|
|
498
|
+
|
|
499
|
+
# Web scraper health check
|
|
500
|
+
# Check health of the web scraper service. Bypasses the proxy abstraction because web-scraper exposes ``/health`` at the root (no ``/api/v1`` prefix, unlike the other scraper services). Accepts ``HEAD`` so external uptime checkers (UptimeRobot uses HEAD by default for HTTP monitors) don't get a 405 Method Not Allowed.
|
|
501
|
+
# @param [Hash] opts the optional parameters
|
|
502
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
503
|
+
def web_web_scraper_health_check_head_with_http_info(opts = {})
|
|
504
|
+
if @api_client.config.debugging
|
|
505
|
+
@api_client.config.logger.debug 'Calling API: WebApi.web_web_scraper_health_check_head ...'
|
|
506
|
+
end
|
|
507
|
+
# resource path
|
|
508
|
+
local_var_path = '/v1/web/health'
|
|
509
|
+
|
|
510
|
+
# query parameters
|
|
511
|
+
query_params = opts[:query_params] || {}
|
|
512
|
+
|
|
513
|
+
# header parameters
|
|
514
|
+
header_params = opts[:header_params] || {}
|
|
515
|
+
# HTTP header 'Accept' (if needed)
|
|
516
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
517
|
+
|
|
518
|
+
# form parameters
|
|
519
|
+
form_params = opts[:form_params] || {}
|
|
520
|
+
|
|
521
|
+
# http body (model)
|
|
522
|
+
post_body = opts[:debug_body]
|
|
523
|
+
|
|
524
|
+
# return_type
|
|
525
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
526
|
+
|
|
527
|
+
# auth_names
|
|
528
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
529
|
+
|
|
530
|
+
new_options = opts.merge(
|
|
531
|
+
:operation => :"WebApi.web_web_scraper_health_check_head",
|
|
532
|
+
:header_params => header_params,
|
|
533
|
+
:query_params => query_params,
|
|
534
|
+
:form_params => form_params,
|
|
535
|
+
:body => post_body,
|
|
536
|
+
:auth_names => auth_names,
|
|
537
|
+
:return_type => return_type
|
|
538
|
+
)
|
|
539
|
+
|
|
540
|
+
data, status_code, headers = @api_client.call_api(:HEAD, local_var_path, new_options)
|
|
541
|
+
if @api_client.config.debugging
|
|
542
|
+
@api_client.config.logger.debug "API called: WebApi#web_web_scraper_health_check_head\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
543
|
+
end
|
|
544
|
+
return data, status_code, headers
|
|
545
|
+
end
|
|
546
|
+
end
|
|
547
|
+
end
|