Class: ContextDev::Models::BatchSubmitParams::Input::Scrape::Data::HTML::Options

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/context_dev/models/batch_submit_params.rb,
sig/context_dev/models/batch_submit_params.rbs

Overview

See Also:

  • ContextDev::Models::BatchSubmitParams::Input::Scrape::Data::HTML#options

Defined Under Namespace

Modules: Country Classes: Pdf

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(country: nil, exclude_selectors: nil, include_selectors: nil, max_age_ms: nil, pdf: nil, settle_animations: nil, use_main_content_only: nil, wait_for_ms: nil) ⇒ Object

Some parameter documentations has been truncated, see ContextDev::Models::BatchSubmitParams::Input::Scrape::Data::HTML::Options for more details.

Options for HTML output.

Parameters:

  • country (Symbol, ContextDev::Models::BatchSubmitParams::Input::Scrape::Data::HTML::Options::Country) (defaults to: nil)

    Fetch the target page through a residential proxy in this country (ISO 3166-1 al

  • exclude_selectors (Array<String>, nil) (defaults to: nil)

    Remove elements matching these CSS selectors. Applied after includeSelectors,

  • include_selectors (Array<String>, nil) (defaults to: nil)

    Keep only the subtrees matching these CSS selectors. Filtered pages are always f

  • max_age_ms (Integer, nil) (defaults to: nil)

    Return a cached result if a prior scrape for the same parameters exists and is y

  • pdf (ContextDev::Models::BatchSubmitParams::Input::Scrape::Data::HTML::Options::Pdf) (defaults to: nil)

    PDF parsing controls. Use start/end to limit text extraction and embedded-image

  • settle_animations (Boolean) (defaults to: nil)

    Wait briefly for CSS and transition animations to settle before extraction, on p

  • use_main_content_only (Boolean) (defaults to: nil)

    Return the main content without navigation or footers.

  • wait_for_ms (Integer) (defaults to: nil)

    How long to wait after initial page load, in milliseconds. 0 waits 500 ms.



# File 'lib/context_dev/models/batch_submit_params.rb', line 740

Instance Attribute Details

#countrySymbol, ...

Fetch the target page through a residential proxy in this country (ISO 3166-1 alpha-2).



682
# File 'lib/context_dev/models/batch_submit_params.rb', line 682

optional :country, enum: -> { ContextDev::BatchSubmitParams::Input::Scrape::Data::HTML::Options::Country }

#exclude_selectorsArray<String>?

Remove elements matching these CSS selectors. Applied after includeSelectors, so an element matching both is removed.

Parameters:

  • value (::Array[String], nil)

Returns:

  • (Array<String>, nil)


689
690
691
692
# File 'lib/context_dev/models/batch_submit_params.rb', line 689

optional :exclude_selectors,
ContextDev::Internal::Type::ArrayOf[String],
api_name: :excludeSelectors,
nil?: true

#include_selectorsArray<String>?

Keep only the subtrees matching these CSS selectors. Filtered pages are always fetched fresh, ignoring maxAgeMs.

Parameters:

  • value (::Array[String], nil)

Returns:

  • (Array<String>, nil)


699
700
701
702
# File 'lib/context_dev/models/batch_submit_params.rb', line 699

optional :include_selectors,
ContextDev::Internal::Type::ArrayOf[String],
api_name: :includeSelectors,
nil?: true

#max_age_msInteger?

Return a cached result if a prior scrape for the same parameters exists and is younger than this many milliseconds. Defaults to 1 day (86400000 ms) when omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


710
# File 'lib/context_dev/models/batch_submit_params.rb', line 710

optional :max_age_ms, Integer, api_name: :maxAgeMs, nil?: true

#pdfContextDev::Models::BatchSubmitParams::Input::Scrape::Data::HTML::Options::Pdf?

PDF parsing controls. Use start/end to limit text extraction and embedded-image detection/OCR to an inclusive 1-based page range.



717
# File 'lib/context_dev/models/batch_submit_params.rb', line 717

optional :pdf, -> { ContextDev::BatchSubmitParams::Input::Scrape::Data::HTML::Options::Pdf }

#settle_animationsBoolean?

Wait briefly for CSS and transition animations to settle before extraction, on pages that render in a browser.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


724
# File 'lib/context_dev/models/batch_submit_params.rb', line 724

optional :settle_animations, ContextDev::Internal::Type::Boolean, api_name: :settleAnimations

#use_main_content_onlyBoolean?

Return the main content without navigation or footers.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


730
731
732
# File 'lib/context_dev/models/batch_submit_params.rb', line 730

optional :use_main_content_only,
ContextDev::Internal::Type::Boolean,
api_name: :useMainContentOnly

#wait_for_msInteger?

How long to wait after initial page load, in milliseconds. 0 waits 500 ms.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


738
# File 'lib/context_dev/models/batch_submit_params.rb', line 738

optional :wait_for_ms, Integer, api_name: :waitForMs

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/context_dev/models/batch_submit_params.rb', line 975

Instance Method Details

#to_hash{

Returns:

  • ({)


820
# File 'sig/context_dev/models/batch_submit_params.rbs', line 820

def to_hash: -> {