Class: Crawlberg::ScrapeResult

Inherits:
Object
  • Object
show all
Defined in:
sig/types.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeScrapeResult

Returns a new instance of ScrapeResult.

Parameters:

  • status_code: (Integer)
  • final_url: (String)
  • content_type: (String)
  • html: (String)
  • body_size: (Integer)
  • metadata: (PageMetadata)
  • links: (Array[LinkInfo])
  • images: (Array[ImageInfo])
  • feeds: (Array[FeedInfo])
  • json_ld: (Array[JsonLdEntry])
  • is_allowed: (Boolean)
  • crawl_delay: (Integer)
  • noindex_detected: (Boolean)
  • nofollow_detected: (Boolean)
  • x_robots_tag: (String)
  • is_pdf: (Boolean)
  • was_skipped: (Boolean)
  • detected_charset: (String)
  • auth_header_sent: (Boolean)
  • response_meta: (ResponseMeta)
  • assets: (Array[DownloadedAsset])
  • js_render_hint: (Boolean)
  • browser_used: (Boolean)
  • markdown: (MarkdownResult)
  • extracted_data: (String)
  • extraction_meta: (ExtractionMeta)
  • screenshot_base64: (String)
  • downloaded_document: (DownloadedDocument)
  • browser: (BrowserExtras)


462
# File 'sig/types.rbs', line 462

def initialize: (?status_code: Integer, ?final_url: String, ?content_type: String, ?html: String, ?body_size: Integer, ?metadata: PageMetadata, ?links: Array[LinkInfo], ?images: Array[ImageInfo], ?feeds: Array[FeedInfo], ?json_ld: Array[JsonLdEntry], ?is_allowed: bool, ?crawl_delay: Integer, ?noindex_detected: bool, ?nofollow_detected: bool, ?x_robots_tag: String, ?is_pdf: bool, ?was_skipped: bool, ?detected_charset: String, ?auth_header_sent: bool, ?response_meta: ResponseMeta, ?assets: Array[DownloadedAsset], ?js_render_hint: bool, ?browser_used: bool, ?markdown: MarkdownResult, ?extracted_data: String, ?extraction_meta: ExtractionMeta, ?screenshot_base64: String, ?downloaded_document: DownloadedDocument, ?browser: BrowserExtras) -> void

Instance Attribute Details

#assetsArray[DownloadedAsset] (readonly)

Returns the value of attribute assets.

Returns:



452
453
454
# File 'sig/types.rbs', line 452

def assets
  @assets
end

#auth_header_sentBoolean (readonly)

Returns the value of attribute auth_header_sent.

Returns:

  • (Boolean)


450
451
452
# File 'sig/types.rbs', line 450

def auth_header_sent
  @auth_header_sent
end

#body_sizeInteger (readonly)

Returns the value of attribute body_size.

Returns:

  • (Integer)


436
437
438
# File 'sig/types.rbs', line 436

def body_size
  @body_size
end

#browserBrowserExtras? (readonly)

Returns the value of attribute browser.

Returns:



460
461
462
# File 'sig/types.rbs', line 460

def browser
  @browser
end

#browser_usedBoolean (readonly)

Returns the value of attribute browser_used.

Returns:

  • (Boolean)


454
455
456
# File 'sig/types.rbs', line 454

def browser_used
  @browser_used
end

#content_typeString (readonly)

Returns the value of attribute content_type.

Returns:

  • (String)


434
435
436
# File 'sig/types.rbs', line 434

def content_type
  @content_type
end

#crawl_delayInteger? (readonly)

Returns the value of attribute crawl_delay.

Returns:

  • (Integer, nil)


443
444
445
# File 'sig/types.rbs', line 443

def crawl_delay
  @crawl_delay
end

#detected_charsetString? (readonly)

Returns the value of attribute detected_charset.

Returns:

  • (String, nil)


449
450
451
# File 'sig/types.rbs', line 449

def detected_charset
  @detected_charset
end

#downloaded_documentDownloadedDocument? (readonly)

Returns the value of attribute downloaded_document.

Returns:



459
460
461
# File 'sig/types.rbs', line 459

def downloaded_document
  @downloaded_document
end

#extracted_dataString? (readonly)

Returns the value of attribute extracted_data.

Returns:

  • (String, nil)


456
457
458
# File 'sig/types.rbs', line 456

def extracted_data
  @extracted_data
end

#extraction_metaExtractionMeta? (readonly)

Returns the value of attribute extraction_meta.

Returns:



457
458
459
# File 'sig/types.rbs', line 457

def extraction_meta
  @extraction_meta
end

#feedsArray[FeedInfo] (readonly)

Returns the value of attribute feeds.

Returns:



440
441
442
# File 'sig/types.rbs', line 440

def feeds
  @feeds
end

#final_urlString (readonly)

Returns the value of attribute final_url.

Returns:

  • (String)


433
434
435
# File 'sig/types.rbs', line 433

def final_url
  @final_url
end

#htmlString (readonly)

Returns the value of attribute html.

Returns:

  • (String)


435
436
437
# File 'sig/types.rbs', line 435

def html
  @html
end

#imagesArray[ImageInfo] (readonly)

Returns the value of attribute images.

Returns:



439
440
441
# File 'sig/types.rbs', line 439

def images
  @images
end

#is_allowedBoolean (readonly)

Returns the value of attribute is_allowed.

Returns:

  • (Boolean)


442
443
444
# File 'sig/types.rbs', line 442

def is_allowed
  @is_allowed
end

#is_pdfBoolean (readonly)

Returns the value of attribute is_pdf.

Returns:

  • (Boolean)


447
448
449
# File 'sig/types.rbs', line 447

def is_pdf
  @is_pdf
end

#js_render_hintBoolean (readonly)

Returns the value of attribute js_render_hint.

Returns:

  • (Boolean)


453
454
455
# File 'sig/types.rbs', line 453

def js_render_hint
  @js_render_hint
end

#json_ldArray[JsonLdEntry] (readonly)

Returns the value of attribute json_ld.

Returns:



441
442
443
# File 'sig/types.rbs', line 441

def json_ld
  @json_ld
end

Returns the value of attribute links.

Returns:



438
439
440
# File 'sig/types.rbs', line 438

def links
  @links
end

#markdownMarkdownResult? (readonly)

Returns the value of attribute markdown.

Returns:



455
456
457
# File 'sig/types.rbs', line 455

def markdown
  @markdown
end

#metadataPageMetadata (readonly)

Returns the value of attribute metadata.

Returns:



437
438
439
# File 'sig/types.rbs', line 437

def 
  @metadata
end

#nofollow_detectedBoolean (readonly)

Returns the value of attribute nofollow_detected.

Returns:

  • (Boolean)


445
446
447
# File 'sig/types.rbs', line 445

def nofollow_detected
  @nofollow_detected
end

#noindex_detectedBoolean (readonly)

Returns the value of attribute noindex_detected.

Returns:

  • (Boolean)


444
445
446
# File 'sig/types.rbs', line 444

def noindex_detected
  @noindex_detected
end

#response_metaResponseMeta? (readonly)

Returns the value of attribute response_meta.

Returns:



451
452
453
# File 'sig/types.rbs', line 451

def response_meta
  @response_meta
end

#screenshot_base64String? (readonly)

Returns the value of attribute screenshot_base64.

Returns:

  • (String, nil)


458
459
460
# File 'sig/types.rbs', line 458

def screenshot_base64
  @screenshot_base64
end

#status_codeInteger (readonly)

Returns the value of attribute status_code.

Returns:

  • (Integer)


432
433
434
# File 'sig/types.rbs', line 432

def status_code
  @status_code
end

#was_skippedBoolean (readonly)

Returns the value of attribute was_skipped.

Returns:

  • (Boolean)


448
449
450
# File 'sig/types.rbs', line 448

def was_skipped
  @was_skipped
end

#x_robots_tagString? (readonly)

Returns the value of attribute x_robots_tag.

Returns:

  • (String, nil)


446
447
448
# File 'sig/types.rbs', line 446

def x_robots_tag
  @x_robots_tag
end