context.dev 1.35.0 → 1.36.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.
@@ -13,6 +13,14 @@ module ContextDev
13
13
  # @return [String]
14
14
  required :url, String
15
15
 
16
+ # @!attribute country
17
+ # Two-letter ISO 3166-1 alpha-2 country code identifying a supported Context.dev
18
+ # residential proxy exit location. Must be one of Context.dev's supported
19
+ # countries. When provided, Context.dev fetches the target page from that country.
20
+ #
21
+ # @return [Symbol, ContextDev::Models::WebWebCrawlMdParams::Country, nil]
22
+ optional :country, enum: -> { ContextDev::WebWebCrawlMdParams::Country }
23
+
16
24
  # @!attribute exclude_selectors
17
25
  # CSS selectors to remove before each crawled page is converted to Markdown.
18
26
  # Applied after includeSelectors. Exclusion takes precedence: an element matching
@@ -127,12 +135,14 @@ module ContextDev
127
135
  # @return [Integer, nil]
128
136
  optional :wait_for_ms, Integer, api_name: :waitForMs
129
137
 
130
- # @!method initialize(url:, exclude_selectors: nil, follow_subdomains: nil, include_frames: nil, include_images: nil, include_links: nil, include_selectors: nil, max_age_ms: nil, max_depth: nil, max_pages: nil, pdf: nil, shorten_base64_images: nil, stop_after_ms: nil, timeout_ms: nil, url_regex: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
138
+ # @!method initialize(url:, country: nil, exclude_selectors: nil, follow_subdomains: nil, include_frames: nil, include_images: nil, include_links: nil, include_selectors: nil, max_age_ms: nil, max_depth: nil, max_pages: nil, pdf: nil, shorten_base64_images: nil, stop_after_ms: nil, timeout_ms: nil, url_regex: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
131
139
  # Some parameter documentations has been truncated, see
132
140
  # {ContextDev::Models::WebWebCrawlMdParams} for more details.
133
141
  #
134
142
  # @param url [String] The starting URL for the crawl (must include http:// or https:// protocol)
135
143
  #
144
+ # @param country [Symbol, ContextDev::Models::WebWebCrawlMdParams::Country] Two-letter ISO 3166-1 alpha-2 country code identifying a supported Context.dev r
145
+ #
136
146
  # @param exclude_selectors [Array<String>] CSS selectors to remove before each crawled page is converted to Markdown. Appli
137
147
  #
138
148
  # @param follow_subdomains [Boolean] When true, follow links on subdomains of the starting URL's domain (e.g. docs.ex
@@ -167,6 +177,221 @@ module ContextDev
167
177
  #
168
178
  # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
169
179
 
180
+ # Two-letter ISO 3166-1 alpha-2 country code identifying a supported Context.dev
181
+ # residential proxy exit location. Must be one of Context.dev's supported
182
+ # countries. When provided, Context.dev fetches the target page from that country.
183
+ module Country
184
+ extend ContextDev::Internal::Type::Enum
185
+
186
+ AD = :ad
187
+ AE = :ae
188
+ AF = :af
189
+ AG = :ag
190
+ AI = :ai
191
+ AL = :al
192
+ AM = :am
193
+ AO = :ao
194
+ AR = :ar
195
+ AT = :at
196
+ AU = :au
197
+ AW = :aw
198
+ AZ = :az
199
+ BA = :ba
200
+ BB = :bb
201
+ BD = :bd
202
+ BE = :be
203
+ BF = :bf
204
+ BG = :bg
205
+ BH = :bh
206
+ BI = :bi
207
+ BJ = :bj
208
+ BM = :bm
209
+ BN = :bn
210
+ BO = :bo
211
+ BQ = :bq
212
+ BR = :br
213
+ BS = :bs
214
+ BW = :bw
215
+ BY = :by
216
+ BZ = :bz
217
+ CA = :ca
218
+ CD = :cd
219
+ CF = :cf
220
+ CG = :cg
221
+ CH = :ch
222
+ CI = :ci
223
+ CL = :cl
224
+ CM = :cm
225
+ CN = :cn
226
+ CO = :co
227
+ CR = :cr
228
+ CV = :cv
229
+ CW = :cw
230
+ CY = :cy
231
+ CZ = :cz
232
+ DE = :de
233
+ DJ = :dj
234
+ DK = :dk
235
+ DM = :dm
236
+ DO = :do
237
+ DZ = :dz
238
+ EC = :ec
239
+ EE = :ee
240
+ EG = :eg
241
+ ES = :es
242
+ ET = :et
243
+ FI = :fi
244
+ FJ = :fj
245
+ FR = :fr
246
+ GA = :ga
247
+ GB = :gb
248
+ GD = :gd
249
+ GE = :ge
250
+ GF = :gf
251
+ GG = :gg
252
+ GH = :gh
253
+ GM = :gm
254
+ GN = :gn
255
+ GP = :gp
256
+ GQ = :gq
257
+ GR = :gr
258
+ GT = :gt
259
+ GU = :gu
260
+ GW = :gw
261
+ GY = :gy
262
+ HK = :hk
263
+ HN = :hn
264
+ HR = :hr
265
+ HT = :ht
266
+ HU = :hu
267
+ ID = :id
268
+ IE = :ie
269
+ IL = :il
270
+ IM = :im
271
+ IN = :in
272
+ IQ = :iq
273
+ IR = :ir
274
+ IS = :is
275
+ IT = :it
276
+ JE = :je
277
+ JM = :jm
278
+ JO = :jo
279
+ JP = :jp
280
+ KE = :ke
281
+ KG = :kg
282
+ KH = :kh
283
+ KN = :kn
284
+ KR = :kr
285
+ KW = :kw
286
+ KY = :ky
287
+ KZ = :kz
288
+ LA = :la
289
+ LB = :lb
290
+ LC = :lc
291
+ LK = :lk
292
+ LR = :lr
293
+ LS = :ls
294
+ LT = :lt
295
+ LU = :lu
296
+ LV = :lv
297
+ LY = :ly
298
+ MA = :ma
299
+ MC = :mc
300
+ MD = :md
301
+ ME = :me
302
+ MF = :mf
303
+ MG = :mg
304
+ MK = :mk
305
+ ML = :ml
306
+ MM = :mm
307
+ MN = :mn
308
+ MO = :mo
309
+ MQ = :mq
310
+ MR = :mr
311
+ MT = :mt
312
+ MU = :mu
313
+ MV = :mv
314
+ MW = :mw
315
+ MX = :mx
316
+ MY = :my
317
+ MZ = :mz
318
+ NA = :na
319
+ NC = :nc
320
+ NE = :ne
321
+ NG = :ng
322
+ NI = :ni
323
+ NL = :nl
324
+ NO = :no
325
+ NP = :np
326
+ NZ = :nz
327
+ OM = :om
328
+ PA = :pa
329
+ PE = :pe
330
+ PF = :pf
331
+ PG = :pg
332
+ PH = :ph
333
+ PK = :pk
334
+ PL = :pl
335
+ PR = :pr
336
+ PS = :ps
337
+ PT = :pt
338
+ PY = :py
339
+ QA = :qa
340
+ RE = :re
341
+ RO = :ro
342
+ RS = :rs
343
+ RU = :ru
344
+ RW = :rw
345
+ SA = :sa
346
+ SC = :sc
347
+ SD = :sd
348
+ SE = :se
349
+ SG = :sg
350
+ SI = :si
351
+ SK = :sk
352
+ SL = :sl
353
+ SM = :sm
354
+ SN = :sn
355
+ SO = :so
356
+ SR = :sr
357
+ SS = :ss
358
+ ST = :st
359
+ SV = :sv
360
+ SX = :sx
361
+ SY = :sy
362
+ SZ = :sz
363
+ TC = :tc
364
+ TD = :td
365
+ TG = :tg
366
+ TH = :th
367
+ TJ = :tj
368
+ TL = :tl
369
+ TM = :tm
370
+ TN = :tn
371
+ TR = :tr
372
+ TT = :tt
373
+ TW = :tw
374
+ TZ = :tz
375
+ UA = :ua
376
+ UG = :ug
377
+ US = :us
378
+ UY = :uy
379
+ UZ = :uz
380
+ VC = :vc
381
+ VE = :ve
382
+ VG = :vg
383
+ VI = :vi
384
+ VN = :vn
385
+ YE = :ye
386
+ YT = :yt
387
+ ZA = :za
388
+ ZM = :zm
389
+ ZW = :zw
390
+
391
+ # @!method self.values
392
+ # @return [Array<Symbol>]
393
+ end
394
+
170
395
  class Pdf < ContextDev::Internal::Type::BaseModel
171
396
  # @!attribute end_
172
397
  # Last 1-based PDF page to parse. When omitted, parsing ends at the last page.
@@ -13,6 +13,13 @@ module ContextDev
13
13
  # @return [String]
14
14
  required :url, String
15
15
 
16
+ # @!attribute country
17
+ # Two-letter ISO 3166-1 alpha-2 country code for the website request location.
18
+ # When provided, Context.dev fetches the target page from that country.
19
+ #
20
+ # @return [Symbol, ContextDev::Models::WebWebScrapeHTMLParams::Country, nil]
21
+ optional :country, enum: -> { ContextDev::WebWebScrapeHTMLParams::Country }
22
+
16
23
  # @!attribute exclude_selectors
17
24
  # CSS selectors to remove from the result. Applied after includeSelectors.
18
25
  # Exclusion takes precedence: an element matching both is removed. Examples:
@@ -80,12 +87,14 @@ module ContextDev
80
87
  # @return [Integer, nil]
81
88
  optional :wait_for_ms, Integer
82
89
 
83
- # @!method initialize(url:, exclude_selectors: nil, headers: nil, include_frames: nil, include_selectors: nil, max_age_ms: nil, pdf: nil, timeout_ms: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
90
+ # @!method initialize(url:, country: nil, exclude_selectors: nil, headers: nil, include_frames: nil, include_selectors: nil, max_age_ms: nil, pdf: nil, timeout_ms: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
84
91
  # Some parameter documentations has been truncated, see
85
92
  # {ContextDev::Models::WebWebScrapeHTMLParams} for more details.
86
93
  #
87
94
  # @param url [String] Full URL to scrape (must include http:// or https:// protocol)
88
95
  #
96
+ # @param country [Symbol, ContextDev::Models::WebWebScrapeHTMLParams::Country] Two-letter ISO 3166-1 alpha-2 country code for the website request location. Whe
97
+ #
89
98
  # @param exclude_selectors [Array<String>] CSS selectors to remove from the result. Applied after includeSelectors. Exclusi
90
99
  #
91
100
  # @param headers [Hash{Symbol=>String}] Optional outbound HTTP headers forwarded only to the target URL, sent as deep-ob
@@ -106,6 +115,220 @@ module ContextDev
106
115
  #
107
116
  # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
108
117
 
118
+ # Two-letter ISO 3166-1 alpha-2 country code for the website request location.
119
+ # When provided, Context.dev fetches the target page from that country.
120
+ module Country
121
+ extend ContextDev::Internal::Type::Enum
122
+
123
+ AD = :ad
124
+ AE = :ae
125
+ AF = :af
126
+ AG = :ag
127
+ AI = :ai
128
+ AL = :al
129
+ AM = :am
130
+ AO = :ao
131
+ AR = :ar
132
+ AT = :at
133
+ AU = :au
134
+ AW = :aw
135
+ AZ = :az
136
+ BA = :ba
137
+ BB = :bb
138
+ BD = :bd
139
+ BE = :be
140
+ BF = :bf
141
+ BG = :bg
142
+ BH = :bh
143
+ BI = :bi
144
+ BJ = :bj
145
+ BM = :bm
146
+ BN = :bn
147
+ BO = :bo
148
+ BQ = :bq
149
+ BR = :br
150
+ BS = :bs
151
+ BW = :bw
152
+ BY = :by
153
+ BZ = :bz
154
+ CA = :ca
155
+ CD = :cd
156
+ CF = :cf
157
+ CG = :cg
158
+ CH = :ch
159
+ CI = :ci
160
+ CL = :cl
161
+ CM = :cm
162
+ CN = :cn
163
+ CO = :co
164
+ CR = :cr
165
+ CV = :cv
166
+ CW = :cw
167
+ CY = :cy
168
+ CZ = :cz
169
+ DE = :de
170
+ DJ = :dj
171
+ DK = :dk
172
+ DM = :dm
173
+ DO = :do
174
+ DZ = :dz
175
+ EC = :ec
176
+ EE = :ee
177
+ EG = :eg
178
+ ES = :es
179
+ ET = :et
180
+ FI = :fi
181
+ FJ = :fj
182
+ FR = :fr
183
+ GA = :ga
184
+ GB = :gb
185
+ GD = :gd
186
+ GE = :ge
187
+ GF = :gf
188
+ GG = :gg
189
+ GH = :gh
190
+ GM = :gm
191
+ GN = :gn
192
+ GP = :gp
193
+ GQ = :gq
194
+ GR = :gr
195
+ GT = :gt
196
+ GU = :gu
197
+ GW = :gw
198
+ GY = :gy
199
+ HK = :hk
200
+ HN = :hn
201
+ HR = :hr
202
+ HT = :ht
203
+ HU = :hu
204
+ ID = :id
205
+ IE = :ie
206
+ IL = :il
207
+ IM = :im
208
+ IN = :in
209
+ IQ = :iq
210
+ IR = :ir
211
+ IS = :is
212
+ IT = :it
213
+ JE = :je
214
+ JM = :jm
215
+ JO = :jo
216
+ JP = :jp
217
+ KE = :ke
218
+ KG = :kg
219
+ KH = :kh
220
+ KN = :kn
221
+ KR = :kr
222
+ KW = :kw
223
+ KY = :ky
224
+ KZ = :kz
225
+ LA = :la
226
+ LB = :lb
227
+ LC = :lc
228
+ LK = :lk
229
+ LR = :lr
230
+ LS = :ls
231
+ LT = :lt
232
+ LU = :lu
233
+ LV = :lv
234
+ LY = :ly
235
+ MA = :ma
236
+ MC = :mc
237
+ MD = :md
238
+ ME = :me
239
+ MF = :mf
240
+ MG = :mg
241
+ MK = :mk
242
+ ML = :ml
243
+ MM = :mm
244
+ MN = :mn
245
+ MO = :mo
246
+ MQ = :mq
247
+ MR = :mr
248
+ MT = :mt
249
+ MU = :mu
250
+ MV = :mv
251
+ MW = :mw
252
+ MX = :mx
253
+ MY = :my
254
+ MZ = :mz
255
+ NA = :na
256
+ NC = :nc
257
+ NE = :ne
258
+ NG = :ng
259
+ NI = :ni
260
+ NL = :nl
261
+ NO = :no
262
+ NP = :np
263
+ NZ = :nz
264
+ OM = :om
265
+ PA = :pa
266
+ PE = :pe
267
+ PF = :pf
268
+ PG = :pg
269
+ PH = :ph
270
+ PK = :pk
271
+ PL = :pl
272
+ PR = :pr
273
+ PS = :ps
274
+ PT = :pt
275
+ PY = :py
276
+ QA = :qa
277
+ RE = :re
278
+ RO = :ro
279
+ RS = :rs
280
+ RU = :ru
281
+ RW = :rw
282
+ SA = :sa
283
+ SC = :sc
284
+ SD = :sd
285
+ SE = :se
286
+ SG = :sg
287
+ SI = :si
288
+ SK = :sk
289
+ SL = :sl
290
+ SM = :sm
291
+ SN = :sn
292
+ SO = :so
293
+ SR = :sr
294
+ SS = :ss
295
+ ST = :st
296
+ SV = :sv
297
+ SX = :sx
298
+ SY = :sy
299
+ SZ = :sz
300
+ TC = :tc
301
+ TD = :td
302
+ TG = :tg
303
+ TH = :th
304
+ TJ = :tj
305
+ TL = :tl
306
+ TM = :tm
307
+ TN = :tn
308
+ TR = :tr
309
+ TT = :tt
310
+ TW = :tw
311
+ TZ = :tz
312
+ UA = :ua
313
+ UG = :ug
314
+ US = :us
315
+ UY = :uy
316
+ UZ = :uz
317
+ VC = :vc
318
+ VE = :ve
319
+ VG = :vg
320
+ VI = :vi
321
+ VN = :vn
322
+ YE = :ye
323
+ YT = :yt
324
+ ZA = :za
325
+ ZM = :zm
326
+ ZW = :zw
327
+
328
+ # @!method self.values
329
+ # @return [Array<Symbol>]
330
+ end
331
+
109
332
  class Pdf < ContextDev::Internal::Type::BaseModel
110
333
  # @!attribute end_
111
334
  # Last 1-based PDF page to parse. When omitted, parsing ends at the last page.