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: (json_value)
  • extraction_meta: (ExtractionMeta)
  • downloaded_document: (DownloadedDocument)
  • browser: (BrowserExtras)


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

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: json_value, ?extraction_meta: ExtractionMeta, ?downloaded_document: DownloadedDocument, ?browser: BrowserExtras) -> void

Instance Attribute Details

#assetsArray[DownloadedAsset]?

Returns the value of attribute assets.

Returns:



171
172
173
# File 'sig/types.rbs', line 171

def assets
  @assets
end

#auth_header_sentBoolean?

Returns the value of attribute auth_header_sent.

Returns:

  • (Boolean, nil)


169
170
171
# File 'sig/types.rbs', line 169

def auth_header_sent
  @auth_header_sent
end

#body_sizeInteger?

Returns the value of attribute body_size.

Returns:

  • (Integer, nil)


155
156
157
# File 'sig/types.rbs', line 155

def body_size
  @body_size
end

#browserBrowserExtras?

Returns the value of attribute browser.

Returns:



178
179
180
# File 'sig/types.rbs', line 178

def browser
  @browser
end

#browser_usedBoolean?

Returns the value of attribute browser_used.

Returns:

  • (Boolean, nil)


173
174
175
# File 'sig/types.rbs', line 173

def browser_used
  @browser_used
end

#content_typeString?

Returns the value of attribute content_type.

Returns:

  • (String, nil)


153
154
155
# File 'sig/types.rbs', line 153

def content_type
  @content_type
end

#crawl_delayInteger?

Returns the value of attribute crawl_delay.

Returns:

  • (Integer, nil)


162
163
164
# File 'sig/types.rbs', line 162

def crawl_delay
  @crawl_delay
end

#detected_charsetString?

Returns the value of attribute detected_charset.

Returns:

  • (String, nil)


168
169
170
# File 'sig/types.rbs', line 168

def detected_charset
  @detected_charset
end

#downloaded_documentDownloadedDocument?

Returns the value of attribute downloaded_document.

Returns:



177
178
179
# File 'sig/types.rbs', line 177

def downloaded_document
  @downloaded_document
end

#extracted_datajson_value?

Returns the value of attribute extracted_data.

Returns:

  • (json_value, nil)


175
176
177
# File 'sig/types.rbs', line 175

def extracted_data
  @extracted_data
end

#extraction_metaExtractionMeta?

Returns the value of attribute extraction_meta.

Returns:



176
177
178
# File 'sig/types.rbs', line 176

def extraction_meta
  @extraction_meta
end

#feedsArray[FeedInfo]?

Returns the value of attribute feeds.

Returns:



159
160
161
# File 'sig/types.rbs', line 159

def feeds
  @feeds
end

#final_urlString?

Returns the value of attribute final_url.

Returns:

  • (String, nil)


152
153
154
# File 'sig/types.rbs', line 152

def final_url
  @final_url
end

#htmlString?

Returns the value of attribute html.

Returns:

  • (String, nil)


154
155
156
# File 'sig/types.rbs', line 154

def html
  @html
end

#imagesArray[ImageInfo]?

Returns the value of attribute images.

Returns:



158
159
160
# File 'sig/types.rbs', line 158

def images
  @images
end

#is_allowedBoolean?

Returns the value of attribute is_allowed.

Returns:

  • (Boolean, nil)


161
162
163
# File 'sig/types.rbs', line 161

def is_allowed
  @is_allowed
end

#is_pdfBoolean?

Returns the value of attribute is_pdf.

Returns:

  • (Boolean, nil)


166
167
168
# File 'sig/types.rbs', line 166

def is_pdf
  @is_pdf
end

#js_render_hintBoolean?

Returns the value of attribute js_render_hint.

Returns:

  • (Boolean, nil)


172
173
174
# File 'sig/types.rbs', line 172

def js_render_hint
  @js_render_hint
end

#json_ldArray[JsonLdEntry]?

Returns the value of attribute json_ld.

Returns:



160
161
162
# File 'sig/types.rbs', line 160

def json_ld
  @json_ld
end

Returns the value of attribute links.

Returns:



157
158
159
# File 'sig/types.rbs', line 157

def links
  @links
end

#markdownMarkdownResult?

Returns the value of attribute markdown.

Returns:



174
175
176
# File 'sig/types.rbs', line 174

def markdown
  @markdown
end

#metadataPageMetadata?

Returns the value of attribute metadata.

Returns:



156
157
158
# File 'sig/types.rbs', line 156

def 
  @metadata
end

#nofollow_detectedBoolean?

Returns the value of attribute nofollow_detected.

Returns:

  • (Boolean, nil)


164
165
166
# File 'sig/types.rbs', line 164

def nofollow_detected
  @nofollow_detected
end

#noindex_detectedBoolean?

Returns the value of attribute noindex_detected.

Returns:

  • (Boolean, nil)


163
164
165
# File 'sig/types.rbs', line 163

def noindex_detected
  @noindex_detected
end

#response_metaResponseMeta?

Returns the value of attribute response_meta.

Returns:



170
171
172
# File 'sig/types.rbs', line 170

def response_meta
  @response_meta
end

#status_codeInteger?

Returns the value of attribute status_code.

Returns:

  • (Integer, nil)


151
152
153
# File 'sig/types.rbs', line 151

def status_code
  @status_code
end

#was_skippedBoolean?

Returns the value of attribute was_skipped.

Returns:

  • (Boolean, nil)


167
168
169
# File 'sig/types.rbs', line 167

def was_skipped
  @was_skipped
end

#x_robots_tagString?

Returns the value of attribute x_robots_tag.

Returns:

  • (String, nil)


165
166
167
# File 'sig/types.rbs', line 165

def x_robots_tag
  @x_robots_tag
end