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
data/docs/WebApi.md
ADDED
|
@@ -0,0 +1,634 @@
|
|
|
1
|
+
# ScrapeBadger::WebApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://scrapebadger.com*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**web_detect_anti_bot_and_captcha_systems**](WebApi.md#web_detect_anti_bot_and_captcha_systems) | **POST** /v1/web/detect | Detect anti-bot and CAPTCHA systems |
|
|
8
|
+
| [**web_extract_structured_data**](WebApi.md#web_extract_structured_data) | **POST** /v1/web/extract | Extract structured data |
|
|
9
|
+
| [**web_get_batch_job_status**](WebApi.md#web_get_batch_job_status) | **GET** /v1/web/batch/{job_id} | Get batch job status |
|
|
10
|
+
| [**web_poll_an_auto_unblock_discovery_job**](WebApi.md#web_poll_an_auto_unblock_discovery_job) | **GET** /v1/web/unblock/{job_id} | Poll an auto-unblock discovery job |
|
|
11
|
+
| [**web_scrape_a_url**](WebApi.md#web_scrape_a_url) | **POST** /v1/web/scrape | Scrape a URL |
|
|
12
|
+
| [**web_submit_batch_scraping_job**](WebApi.md#web_submit_batch_scraping_job) | **POST** /v1/web/batch | Submit batch scraping job |
|
|
13
|
+
| [**web_take_a_screenshot**](WebApi.md#web_take_a_screenshot) | **POST** /v1/web/screenshot | Take a screenshot |
|
|
14
|
+
| [**web_web_scraper_health_check**](WebApi.md#web_web_scraper_health_check) | **GET** /v1/web/health | Web scraper health check |
|
|
15
|
+
| [**web_web_scraper_health_check_head**](WebApi.md#web_web_scraper_health_check_head) | **HEAD** /v1/web/health | Web scraper health check |
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## web_detect_anti_bot_and_captcha_systems
|
|
19
|
+
|
|
20
|
+
> Object web_detect_anti_bot_and_captcha_systems
|
|
21
|
+
|
|
22
|
+
Detect anti-bot and CAPTCHA systems
|
|
23
|
+
|
|
24
|
+
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.
|
|
25
|
+
|
|
26
|
+
### Examples
|
|
27
|
+
|
|
28
|
+
```ruby
|
|
29
|
+
require 'time'
|
|
30
|
+
require 'scrapebadger'
|
|
31
|
+
# setup authorization
|
|
32
|
+
ScrapeBadger.configure do |config|
|
|
33
|
+
# Configure API key authorization: ApiKeyAuth
|
|
34
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
35
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
36
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
api_instance = ScrapeBadger::WebApi.new
|
|
40
|
+
|
|
41
|
+
begin
|
|
42
|
+
# Detect anti-bot and CAPTCHA systems
|
|
43
|
+
result = api_instance.web_detect_anti_bot_and_captcha_systems
|
|
44
|
+
p result
|
|
45
|
+
rescue ScrapeBadger::ApiError => e
|
|
46
|
+
puts "Error when calling WebApi->web_detect_anti_bot_and_captcha_systems: #{e}"
|
|
47
|
+
end
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
#### Using the web_detect_anti_bot_and_captcha_systems_with_http_info variant
|
|
51
|
+
|
|
52
|
+
This returns an Array which contains the response data, status code and headers.
|
|
53
|
+
|
|
54
|
+
> <Array(Object, Integer, Hash)> web_detect_anti_bot_and_captcha_systems_with_http_info
|
|
55
|
+
|
|
56
|
+
```ruby
|
|
57
|
+
begin
|
|
58
|
+
# Detect anti-bot and CAPTCHA systems
|
|
59
|
+
data, status_code, headers = api_instance.web_detect_anti_bot_and_captcha_systems_with_http_info
|
|
60
|
+
p status_code # => 2xx
|
|
61
|
+
p headers # => { ... }
|
|
62
|
+
p data # => Object
|
|
63
|
+
rescue ScrapeBadger::ApiError => e
|
|
64
|
+
puts "Error when calling WebApi->web_detect_anti_bot_and_captcha_systems_with_http_info: #{e}"
|
|
65
|
+
end
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Parameters
|
|
69
|
+
|
|
70
|
+
This endpoint does not need any parameter.
|
|
71
|
+
|
|
72
|
+
### Return type
|
|
73
|
+
|
|
74
|
+
**Object**
|
|
75
|
+
|
|
76
|
+
### Authorization
|
|
77
|
+
|
|
78
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
79
|
+
|
|
80
|
+
### HTTP request headers
|
|
81
|
+
|
|
82
|
+
- **Content-Type**: Not defined
|
|
83
|
+
- **Accept**: application/json
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
## web_extract_structured_data
|
|
87
|
+
|
|
88
|
+
> Object web_extract_structured_data
|
|
89
|
+
|
|
90
|
+
Extract structured data
|
|
91
|
+
|
|
92
|
+
Extract structured data from a URL using CSS or XPath selectors. (Phase 6)
|
|
93
|
+
|
|
94
|
+
### Examples
|
|
95
|
+
|
|
96
|
+
```ruby
|
|
97
|
+
require 'time'
|
|
98
|
+
require 'scrapebadger'
|
|
99
|
+
# setup authorization
|
|
100
|
+
ScrapeBadger.configure do |config|
|
|
101
|
+
# Configure API key authorization: ApiKeyAuth
|
|
102
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
103
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
104
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
api_instance = ScrapeBadger::WebApi.new
|
|
108
|
+
|
|
109
|
+
begin
|
|
110
|
+
# Extract structured data
|
|
111
|
+
result = api_instance.web_extract_structured_data
|
|
112
|
+
p result
|
|
113
|
+
rescue ScrapeBadger::ApiError => e
|
|
114
|
+
puts "Error when calling WebApi->web_extract_structured_data: #{e}"
|
|
115
|
+
end
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
#### Using the web_extract_structured_data_with_http_info variant
|
|
119
|
+
|
|
120
|
+
This returns an Array which contains the response data, status code and headers.
|
|
121
|
+
|
|
122
|
+
> <Array(Object, Integer, Hash)> web_extract_structured_data_with_http_info
|
|
123
|
+
|
|
124
|
+
```ruby
|
|
125
|
+
begin
|
|
126
|
+
# Extract structured data
|
|
127
|
+
data, status_code, headers = api_instance.web_extract_structured_data_with_http_info
|
|
128
|
+
p status_code # => 2xx
|
|
129
|
+
p headers # => { ... }
|
|
130
|
+
p data # => Object
|
|
131
|
+
rescue ScrapeBadger::ApiError => e
|
|
132
|
+
puts "Error when calling WebApi->web_extract_structured_data_with_http_info: #{e}"
|
|
133
|
+
end
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Parameters
|
|
137
|
+
|
|
138
|
+
This endpoint does not need any parameter.
|
|
139
|
+
|
|
140
|
+
### Return type
|
|
141
|
+
|
|
142
|
+
**Object**
|
|
143
|
+
|
|
144
|
+
### Authorization
|
|
145
|
+
|
|
146
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
147
|
+
|
|
148
|
+
### HTTP request headers
|
|
149
|
+
|
|
150
|
+
- **Content-Type**: Not defined
|
|
151
|
+
- **Accept**: application/json
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
## web_get_batch_job_status
|
|
155
|
+
|
|
156
|
+
> Object web_get_batch_job_status(job_id)
|
|
157
|
+
|
|
158
|
+
Get batch job status
|
|
159
|
+
|
|
160
|
+
Get the status of a batch scraping job. (Phase 6)
|
|
161
|
+
|
|
162
|
+
### Examples
|
|
163
|
+
|
|
164
|
+
```ruby
|
|
165
|
+
require 'time'
|
|
166
|
+
require 'scrapebadger'
|
|
167
|
+
# setup authorization
|
|
168
|
+
ScrapeBadger.configure do |config|
|
|
169
|
+
# Configure API key authorization: ApiKeyAuth
|
|
170
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
171
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
172
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
api_instance = ScrapeBadger::WebApi.new
|
|
176
|
+
job_id = 'job_id_example' # String |
|
|
177
|
+
|
|
178
|
+
begin
|
|
179
|
+
# Get batch job status
|
|
180
|
+
result = api_instance.web_get_batch_job_status(job_id)
|
|
181
|
+
p result
|
|
182
|
+
rescue ScrapeBadger::ApiError => e
|
|
183
|
+
puts "Error when calling WebApi->web_get_batch_job_status: #{e}"
|
|
184
|
+
end
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
#### Using the web_get_batch_job_status_with_http_info variant
|
|
188
|
+
|
|
189
|
+
This returns an Array which contains the response data, status code and headers.
|
|
190
|
+
|
|
191
|
+
> <Array(Object, Integer, Hash)> web_get_batch_job_status_with_http_info(job_id)
|
|
192
|
+
|
|
193
|
+
```ruby
|
|
194
|
+
begin
|
|
195
|
+
# Get batch job status
|
|
196
|
+
data, status_code, headers = api_instance.web_get_batch_job_status_with_http_info(job_id)
|
|
197
|
+
p status_code # => 2xx
|
|
198
|
+
p headers # => { ... }
|
|
199
|
+
p data # => Object
|
|
200
|
+
rescue ScrapeBadger::ApiError => e
|
|
201
|
+
puts "Error when calling WebApi->web_get_batch_job_status_with_http_info: #{e}"
|
|
202
|
+
end
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### Parameters
|
|
206
|
+
|
|
207
|
+
| Name | Type | Description | Notes |
|
|
208
|
+
| ---- | ---- | ----------- | ----- |
|
|
209
|
+
| **job_id** | **String** | | |
|
|
210
|
+
|
|
211
|
+
### Return type
|
|
212
|
+
|
|
213
|
+
**Object**
|
|
214
|
+
|
|
215
|
+
### Authorization
|
|
216
|
+
|
|
217
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
218
|
+
|
|
219
|
+
### HTTP request headers
|
|
220
|
+
|
|
221
|
+
- **Content-Type**: Not defined
|
|
222
|
+
- **Accept**: application/json
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
## web_poll_an_auto_unblock_discovery_job
|
|
226
|
+
|
|
227
|
+
> Object web_poll_an_auto_unblock_discovery_job(job_id)
|
|
228
|
+
|
|
229
|
+
Poll an auto-unblock discovery job
|
|
230
|
+
|
|
231
|
+
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).
|
|
232
|
+
|
|
233
|
+
### Examples
|
|
234
|
+
|
|
235
|
+
```ruby
|
|
236
|
+
require 'time'
|
|
237
|
+
require 'scrapebadger'
|
|
238
|
+
# setup authorization
|
|
239
|
+
ScrapeBadger.configure do |config|
|
|
240
|
+
# Configure API key authorization: ApiKeyAuth
|
|
241
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
242
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
243
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
api_instance = ScrapeBadger::WebApi.new
|
|
247
|
+
job_id = 'job_id_example' # String |
|
|
248
|
+
|
|
249
|
+
begin
|
|
250
|
+
# Poll an auto-unblock discovery job
|
|
251
|
+
result = api_instance.web_poll_an_auto_unblock_discovery_job(job_id)
|
|
252
|
+
p result
|
|
253
|
+
rescue ScrapeBadger::ApiError => e
|
|
254
|
+
puts "Error when calling WebApi->web_poll_an_auto_unblock_discovery_job: #{e}"
|
|
255
|
+
end
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
#### Using the web_poll_an_auto_unblock_discovery_job_with_http_info variant
|
|
259
|
+
|
|
260
|
+
This returns an Array which contains the response data, status code and headers.
|
|
261
|
+
|
|
262
|
+
> <Array(Object, Integer, Hash)> web_poll_an_auto_unblock_discovery_job_with_http_info(job_id)
|
|
263
|
+
|
|
264
|
+
```ruby
|
|
265
|
+
begin
|
|
266
|
+
# Poll an auto-unblock discovery job
|
|
267
|
+
data, status_code, headers = api_instance.web_poll_an_auto_unblock_discovery_job_with_http_info(job_id)
|
|
268
|
+
p status_code # => 2xx
|
|
269
|
+
p headers # => { ... }
|
|
270
|
+
p data # => Object
|
|
271
|
+
rescue ScrapeBadger::ApiError => e
|
|
272
|
+
puts "Error when calling WebApi->web_poll_an_auto_unblock_discovery_job_with_http_info: #{e}"
|
|
273
|
+
end
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
### Parameters
|
|
277
|
+
|
|
278
|
+
| Name | Type | Description | Notes |
|
|
279
|
+
| ---- | ---- | ----------- | ----- |
|
|
280
|
+
| **job_id** | **String** | | |
|
|
281
|
+
|
|
282
|
+
### Return type
|
|
283
|
+
|
|
284
|
+
**Object**
|
|
285
|
+
|
|
286
|
+
### Authorization
|
|
287
|
+
|
|
288
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
289
|
+
|
|
290
|
+
### HTTP request headers
|
|
291
|
+
|
|
292
|
+
- **Content-Type**: Not defined
|
|
293
|
+
- **Accept**: application/json
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
## web_scrape_a_url
|
|
297
|
+
|
|
298
|
+
> Object web_scrape_a_url
|
|
299
|
+
|
|
300
|
+
Scrape a URL
|
|
301
|
+
|
|
302
|
+
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.
|
|
303
|
+
|
|
304
|
+
### Examples
|
|
305
|
+
|
|
306
|
+
```ruby
|
|
307
|
+
require 'time'
|
|
308
|
+
require 'scrapebadger'
|
|
309
|
+
# setup authorization
|
|
310
|
+
ScrapeBadger.configure do |config|
|
|
311
|
+
# Configure API key authorization: ApiKeyAuth
|
|
312
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
313
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
314
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
api_instance = ScrapeBadger::WebApi.new
|
|
318
|
+
|
|
319
|
+
begin
|
|
320
|
+
# Scrape a URL
|
|
321
|
+
result = api_instance.web_scrape_a_url
|
|
322
|
+
p result
|
|
323
|
+
rescue ScrapeBadger::ApiError => e
|
|
324
|
+
puts "Error when calling WebApi->web_scrape_a_url: #{e}"
|
|
325
|
+
end
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
#### Using the web_scrape_a_url_with_http_info variant
|
|
329
|
+
|
|
330
|
+
This returns an Array which contains the response data, status code and headers.
|
|
331
|
+
|
|
332
|
+
> <Array(Object, Integer, Hash)> web_scrape_a_url_with_http_info
|
|
333
|
+
|
|
334
|
+
```ruby
|
|
335
|
+
begin
|
|
336
|
+
# Scrape a URL
|
|
337
|
+
data, status_code, headers = api_instance.web_scrape_a_url_with_http_info
|
|
338
|
+
p status_code # => 2xx
|
|
339
|
+
p headers # => { ... }
|
|
340
|
+
p data # => Object
|
|
341
|
+
rescue ScrapeBadger::ApiError => e
|
|
342
|
+
puts "Error when calling WebApi->web_scrape_a_url_with_http_info: #{e}"
|
|
343
|
+
end
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
### Parameters
|
|
347
|
+
|
|
348
|
+
This endpoint does not need any parameter.
|
|
349
|
+
|
|
350
|
+
### Return type
|
|
351
|
+
|
|
352
|
+
**Object**
|
|
353
|
+
|
|
354
|
+
### Authorization
|
|
355
|
+
|
|
356
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
357
|
+
|
|
358
|
+
### HTTP request headers
|
|
359
|
+
|
|
360
|
+
- **Content-Type**: Not defined
|
|
361
|
+
- **Accept**: application/json
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
## web_submit_batch_scraping_job
|
|
365
|
+
|
|
366
|
+
> Object web_submit_batch_scraping_job
|
|
367
|
+
|
|
368
|
+
Submit batch scraping job
|
|
369
|
+
|
|
370
|
+
Submit a batch of URLs for scraping. (Phase 6)
|
|
371
|
+
|
|
372
|
+
### Examples
|
|
373
|
+
|
|
374
|
+
```ruby
|
|
375
|
+
require 'time'
|
|
376
|
+
require 'scrapebadger'
|
|
377
|
+
# setup authorization
|
|
378
|
+
ScrapeBadger.configure do |config|
|
|
379
|
+
# Configure API key authorization: ApiKeyAuth
|
|
380
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
381
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
382
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
383
|
+
end
|
|
384
|
+
|
|
385
|
+
api_instance = ScrapeBadger::WebApi.new
|
|
386
|
+
|
|
387
|
+
begin
|
|
388
|
+
# Submit batch scraping job
|
|
389
|
+
result = api_instance.web_submit_batch_scraping_job
|
|
390
|
+
p result
|
|
391
|
+
rescue ScrapeBadger::ApiError => e
|
|
392
|
+
puts "Error when calling WebApi->web_submit_batch_scraping_job: #{e}"
|
|
393
|
+
end
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
#### Using the web_submit_batch_scraping_job_with_http_info variant
|
|
397
|
+
|
|
398
|
+
This returns an Array which contains the response data, status code and headers.
|
|
399
|
+
|
|
400
|
+
> <Array(Object, Integer, Hash)> web_submit_batch_scraping_job_with_http_info
|
|
401
|
+
|
|
402
|
+
```ruby
|
|
403
|
+
begin
|
|
404
|
+
# Submit batch scraping job
|
|
405
|
+
data, status_code, headers = api_instance.web_submit_batch_scraping_job_with_http_info
|
|
406
|
+
p status_code # => 2xx
|
|
407
|
+
p headers # => { ... }
|
|
408
|
+
p data # => Object
|
|
409
|
+
rescue ScrapeBadger::ApiError => e
|
|
410
|
+
puts "Error when calling WebApi->web_submit_batch_scraping_job_with_http_info: #{e}"
|
|
411
|
+
end
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
### Parameters
|
|
415
|
+
|
|
416
|
+
This endpoint does not need any parameter.
|
|
417
|
+
|
|
418
|
+
### Return type
|
|
419
|
+
|
|
420
|
+
**Object**
|
|
421
|
+
|
|
422
|
+
### Authorization
|
|
423
|
+
|
|
424
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
425
|
+
|
|
426
|
+
### HTTP request headers
|
|
427
|
+
|
|
428
|
+
- **Content-Type**: Not defined
|
|
429
|
+
- **Accept**: application/json
|
|
430
|
+
|
|
431
|
+
|
|
432
|
+
## web_take_a_screenshot
|
|
433
|
+
|
|
434
|
+
> Object web_take_a_screenshot
|
|
435
|
+
|
|
436
|
+
Take a screenshot
|
|
437
|
+
|
|
438
|
+
Take a screenshot of a URL. (Phase 2 — patchright engine)
|
|
439
|
+
|
|
440
|
+
### Examples
|
|
441
|
+
|
|
442
|
+
```ruby
|
|
443
|
+
require 'time'
|
|
444
|
+
require 'scrapebadger'
|
|
445
|
+
# setup authorization
|
|
446
|
+
ScrapeBadger.configure do |config|
|
|
447
|
+
# Configure API key authorization: ApiKeyAuth
|
|
448
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
449
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
450
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
451
|
+
end
|
|
452
|
+
|
|
453
|
+
api_instance = ScrapeBadger::WebApi.new
|
|
454
|
+
|
|
455
|
+
begin
|
|
456
|
+
# Take a screenshot
|
|
457
|
+
result = api_instance.web_take_a_screenshot
|
|
458
|
+
p result
|
|
459
|
+
rescue ScrapeBadger::ApiError => e
|
|
460
|
+
puts "Error when calling WebApi->web_take_a_screenshot: #{e}"
|
|
461
|
+
end
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
#### Using the web_take_a_screenshot_with_http_info variant
|
|
465
|
+
|
|
466
|
+
This returns an Array which contains the response data, status code and headers.
|
|
467
|
+
|
|
468
|
+
> <Array(Object, Integer, Hash)> web_take_a_screenshot_with_http_info
|
|
469
|
+
|
|
470
|
+
```ruby
|
|
471
|
+
begin
|
|
472
|
+
# Take a screenshot
|
|
473
|
+
data, status_code, headers = api_instance.web_take_a_screenshot_with_http_info
|
|
474
|
+
p status_code # => 2xx
|
|
475
|
+
p headers # => { ... }
|
|
476
|
+
p data # => Object
|
|
477
|
+
rescue ScrapeBadger::ApiError => e
|
|
478
|
+
puts "Error when calling WebApi->web_take_a_screenshot_with_http_info: #{e}"
|
|
479
|
+
end
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
### Parameters
|
|
483
|
+
|
|
484
|
+
This endpoint does not need any parameter.
|
|
485
|
+
|
|
486
|
+
### Return type
|
|
487
|
+
|
|
488
|
+
**Object**
|
|
489
|
+
|
|
490
|
+
### Authorization
|
|
491
|
+
|
|
492
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
493
|
+
|
|
494
|
+
### HTTP request headers
|
|
495
|
+
|
|
496
|
+
- **Content-Type**: Not defined
|
|
497
|
+
- **Accept**: application/json
|
|
498
|
+
|
|
499
|
+
|
|
500
|
+
## web_web_scraper_health_check
|
|
501
|
+
|
|
502
|
+
> Object web_web_scraper_health_check
|
|
503
|
+
|
|
504
|
+
Web scraper health check
|
|
505
|
+
|
|
506
|
+
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.
|
|
507
|
+
|
|
508
|
+
### Examples
|
|
509
|
+
|
|
510
|
+
```ruby
|
|
511
|
+
require 'time'
|
|
512
|
+
require 'scrapebadger'
|
|
513
|
+
# setup authorization
|
|
514
|
+
ScrapeBadger.configure do |config|
|
|
515
|
+
# Configure API key authorization: ApiKeyAuth
|
|
516
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
517
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
518
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
519
|
+
end
|
|
520
|
+
|
|
521
|
+
api_instance = ScrapeBadger::WebApi.new
|
|
522
|
+
|
|
523
|
+
begin
|
|
524
|
+
# Web scraper health check
|
|
525
|
+
result = api_instance.web_web_scraper_health_check
|
|
526
|
+
p result
|
|
527
|
+
rescue ScrapeBadger::ApiError => e
|
|
528
|
+
puts "Error when calling WebApi->web_web_scraper_health_check: #{e}"
|
|
529
|
+
end
|
|
530
|
+
```
|
|
531
|
+
|
|
532
|
+
#### Using the web_web_scraper_health_check_with_http_info variant
|
|
533
|
+
|
|
534
|
+
This returns an Array which contains the response data, status code and headers.
|
|
535
|
+
|
|
536
|
+
> <Array(Object, Integer, Hash)> web_web_scraper_health_check_with_http_info
|
|
537
|
+
|
|
538
|
+
```ruby
|
|
539
|
+
begin
|
|
540
|
+
# Web scraper health check
|
|
541
|
+
data, status_code, headers = api_instance.web_web_scraper_health_check_with_http_info
|
|
542
|
+
p status_code # => 2xx
|
|
543
|
+
p headers # => { ... }
|
|
544
|
+
p data # => Object
|
|
545
|
+
rescue ScrapeBadger::ApiError => e
|
|
546
|
+
puts "Error when calling WebApi->web_web_scraper_health_check_with_http_info: #{e}"
|
|
547
|
+
end
|
|
548
|
+
```
|
|
549
|
+
|
|
550
|
+
### Parameters
|
|
551
|
+
|
|
552
|
+
This endpoint does not need any parameter.
|
|
553
|
+
|
|
554
|
+
### Return type
|
|
555
|
+
|
|
556
|
+
**Object**
|
|
557
|
+
|
|
558
|
+
### Authorization
|
|
559
|
+
|
|
560
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
561
|
+
|
|
562
|
+
### HTTP request headers
|
|
563
|
+
|
|
564
|
+
- **Content-Type**: Not defined
|
|
565
|
+
- **Accept**: application/json
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
## web_web_scraper_health_check_head
|
|
569
|
+
|
|
570
|
+
> Object web_web_scraper_health_check_head
|
|
571
|
+
|
|
572
|
+
Web scraper health check
|
|
573
|
+
|
|
574
|
+
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.
|
|
575
|
+
|
|
576
|
+
### Examples
|
|
577
|
+
|
|
578
|
+
```ruby
|
|
579
|
+
require 'time'
|
|
580
|
+
require 'scrapebadger'
|
|
581
|
+
# setup authorization
|
|
582
|
+
ScrapeBadger.configure do |config|
|
|
583
|
+
# Configure API key authorization: ApiKeyAuth
|
|
584
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
585
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
586
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
587
|
+
end
|
|
588
|
+
|
|
589
|
+
api_instance = ScrapeBadger::WebApi.new
|
|
590
|
+
|
|
591
|
+
begin
|
|
592
|
+
# Web scraper health check
|
|
593
|
+
result = api_instance.web_web_scraper_health_check_head
|
|
594
|
+
p result
|
|
595
|
+
rescue ScrapeBadger::ApiError => e
|
|
596
|
+
puts "Error when calling WebApi->web_web_scraper_health_check_head: #{e}"
|
|
597
|
+
end
|
|
598
|
+
```
|
|
599
|
+
|
|
600
|
+
#### Using the web_web_scraper_health_check_head_with_http_info variant
|
|
601
|
+
|
|
602
|
+
This returns an Array which contains the response data, status code and headers.
|
|
603
|
+
|
|
604
|
+
> <Array(Object, Integer, Hash)> web_web_scraper_health_check_head_with_http_info
|
|
605
|
+
|
|
606
|
+
```ruby
|
|
607
|
+
begin
|
|
608
|
+
# Web scraper health check
|
|
609
|
+
data, status_code, headers = api_instance.web_web_scraper_health_check_head_with_http_info
|
|
610
|
+
p status_code # => 2xx
|
|
611
|
+
p headers # => { ... }
|
|
612
|
+
p data # => Object
|
|
613
|
+
rescue ScrapeBadger::ApiError => e
|
|
614
|
+
puts "Error when calling WebApi->web_web_scraper_health_check_head_with_http_info: #{e}"
|
|
615
|
+
end
|
|
616
|
+
```
|
|
617
|
+
|
|
618
|
+
### Parameters
|
|
619
|
+
|
|
620
|
+
This endpoint does not need any parameter.
|
|
621
|
+
|
|
622
|
+
### Return type
|
|
623
|
+
|
|
624
|
+
**Object**
|
|
625
|
+
|
|
626
|
+
### Authorization
|
|
627
|
+
|
|
628
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
629
|
+
|
|
630
|
+
### HTTP request headers
|
|
631
|
+
|
|
632
|
+
- **Content-Type**: Not defined
|
|
633
|
+
- **Accept**: application/json
|
|
634
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# ScrapeBadger::WebhookCreate
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **monitor_id** | **String** | | |
|
|
8
|
+
| **url** | **String** | | |
|
|
9
|
+
| **secret** | **String** | | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'scrapebadger'
|
|
15
|
+
|
|
16
|
+
instance = ScrapeBadger::WebhookCreate.new(
|
|
17
|
+
monitor_id: null,
|
|
18
|
+
url: null,
|
|
19
|
+
secret: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# ScrapeBadger::WebhookListItem
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | | |
|
|
8
|
+
| **monitor_id** | **String** | | |
|
|
9
|
+
| **monitor_name** | **String** | | |
|
|
10
|
+
| **url** | **String** | | |
|
|
11
|
+
| **secret_set** | **Boolean** | | |
|
|
12
|
+
| **created_at** | **Time** | | |
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```ruby
|
|
17
|
+
require 'scrapebadger'
|
|
18
|
+
|
|
19
|
+
instance = ScrapeBadger::WebhookListItem.new(
|
|
20
|
+
id: null,
|
|
21
|
+
monitor_id: null,
|
|
22
|
+
monitor_name: null,
|
|
23
|
+
url: null,
|
|
24
|
+
secret_set: null,
|
|
25
|
+
created_at: null
|
|
26
|
+
)
|
|
27
|
+
```
|
|
28
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# ScrapeBadger::WebhookListResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **webhooks** | [**Array<WebhookListItem>**](WebhookListItem.md) | | |
|
|
8
|
+
| **total** | **Integer** | | |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'scrapebadger'
|
|
14
|
+
|
|
15
|
+
instance = ScrapeBadger::WebhookListResponse.new(
|
|
16
|
+
webhooks: null,
|
|
17
|
+
total: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|