crawlberg 1.12.0 → 1.12.3

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.
data/sig/types.rbs CHANGED
@@ -1,5 +1,5 @@
1
1
  # This file is auto-generated by alef — DO NOT EDIT.
2
- # alef:hash:a2ea8938a47348aa37d91448784e4263e6b5f4df1fe3a7ff1f9a8bdd3bf04009
2
+ # alef:hash:4cdc9eb4c9b67c7adb9baf33b70eb0c6ee54e28b0c0973121fbef2934ff8a431
3
3
  # To regenerate: alef generate
4
4
  # To verify freshness: alef verify
5
5
 
@@ -89,8 +89,9 @@ def initialize: (?results: Array[BatchScrapeResult], ?total_count: Integer, ?com
89
89
  attr_reader chrome_args: Array[String]
90
90
  attr_reader scroll_containers: bool
91
91
  attr_reader dom_quiet_window: Integer
92
+ attr_reader dom_quiet_cap: Integer
92
93
 
93
- def initialize: (?mode: enum_BrowserMode, ?backend: enum_BrowserBackend, ?endpoint: String, ?timeout: Integer, ?overall_timeout: Integer, ?shutdown_timeout: Integer, ?wait: enum_BrowserWait, ?wait_selector: String, ?extra_wait: Integer, ?proxy: ProxyConfig, ?block_url_patterns: Array[String], ?eval_script: String, ?robots_user_agent: String, ?capture_network_events: bool, ?session_affinity: bool, ?chrome_path: String, ?chrome_args: Array[String], ?scroll_containers: bool, ?dom_quiet_window: Integer) -> void
94
+ def initialize: (?mode: enum_BrowserMode, ?backend: enum_BrowserBackend, ?endpoint: String, ?timeout: Integer, ?overall_timeout: Integer, ?shutdown_timeout: Integer, ?wait: enum_BrowserWait, ?wait_selector: String, ?extra_wait: Integer, ?proxy: ProxyConfig, ?block_url_patterns: Array[String], ?eval_script: String, ?robots_user_agent: String, ?capture_network_events: bool, ?session_affinity: bool, ?chrome_path: String, ?chrome_args: Array[String], ?scroll_containers: bool, ?dom_quiet_window: Integer, ?dom_quiet_cap: Integer) -> void
94
95
  end
95
96
 
96
97
  class BrowserExtras
@@ -137,8 +138,12 @@ def initialize: (?content: String, ?references: Array[CitationReference]) -> voi
137
138
  attr_reader compact_tables: bool
138
139
  attr_reader keep_inline_images_in: Array[String]
139
140
  attr_reader keep_hidden: bool
141
+ attr_reader expand_abbreviations: bool
142
+ attr_reader escape_misc: bool
143
+ attr_reader escape_asterisks: bool
144
+ attr_reader include_icon_labels: bool
140
145
 
141
- def initialize: (?output_format: String, ?preprocessing_preset: String, ?remove_navigation: bool, ?remove_forms: bool, ?strip_tags: Array[String], ?preserve_tags: Array[String], ?exclude_selectors: Array[String], ?skip_images: bool, ?max_depth: Integer, ?wrap: bool, ?wrap_width: Integer, ?include_document_structure: bool, ?extract_metadata: bool, ?strip_newlines: bool, ?bullets: String, ?list_indent_width: Integer, ?strong_em_symbol: String, ?compact_tables: bool, ?keep_inline_images_in: Array[String], ?keep_hidden: bool) -> void
146
+ def initialize: (?output_format: String, ?preprocessing_preset: String, ?remove_navigation: bool, ?remove_forms: bool, ?strip_tags: Array[String], ?preserve_tags: Array[String], ?exclude_selectors: Array[String], ?skip_images: bool, ?max_depth: Integer, ?wrap: bool, ?wrap_width: Integer, ?include_document_structure: bool, ?extract_metadata: bool, ?strip_newlines: bool, ?bullets: String, ?list_indent_width: Integer, ?strong_em_symbol: String, ?compact_tables: bool, ?keep_inline_images_in: Array[String], ?keep_hidden: bool, ?expand_abbreviations: bool, ?escape_misc: bool, ?escape_asterisks: bool, ?include_icon_labels: bool) -> void
142
147
  end
143
148
 
144
149
  class CookieInfo
@@ -207,8 +212,9 @@ def initialize: (?output_format: String, ?preprocessing_preset: String, ?remove_
207
212
  attr_reader ssrf: SsrfPolicy
208
213
  attr_reader ssrf_deny_private_explicit: bool?
209
214
  attr_reader danger_accept_invalid_certs: bool
215
+ attr_reader subdomain_header_allowlist: Array[String]
210
216
 
211
- def initialize: (?max_depth: Integer, ?max_pages: Integer, ?max_links_per_page: Integer, ?max_concurrent: Integer, ?crawl_strategy: enum_CrawlStrategyKind, ?content_filter: enum_ContentFilterKind, ?bm25_query: String, ?bm25_threshold: Float, ?respect_robots_txt: bool, ?soft_http_errors: bool, ?user_agent: String, ?stay_on_domain: bool, ?allow_subdomains: bool, ?include_paths: Array[String], ?exclude_paths: Array[String], ?path_patterns_match_query: bool, ?path_patterns_match_url: bool, ?dedup_include_query: bool, ?strip_tracking_params: bool, ?tracking_params: Array[String], ?custom_headers: Hash[String, String], ?request_timeout: Integer, ?rate_limit_ms: Integer, ?max_redirects: Integer, ?retry_count: Integer, ?retry_codes: Array[Integer], ?retry_initial_delay_ms: Integer, ?retry_max_delay_ms: Integer, ?rate_limit_jitter_ratio: Float, ?cookies_enabled: bool, ?auth: AuthConfig, ?max_body_size: Integer, ?remove_tags: Array[String], ?content: ContentConfig, ?map_limit: Integer, ?map_search: String, ?download_assets: bool, ?asset_types: Array[enum_AssetCategory], ?max_asset_size: Integer, ?browser: BrowserConfig, ?proxy: ProxyConfig, ?user_agents: Array[String], ?capture_screenshot: bool, ?follow_document_urls: bool, ?document_url_depth: Integer, ?download_documents: bool, ?document_max_size: Integer, ?document_mime_types: Array[String], ?document_output_dir: String, ?document_content_encoding: enum_DocumentContentEncoding, ?warc_output: String, ?browser_profile: String, ?save_browser_profile: bool, ?ssrf: SsrfPolicy, ?ssrf_deny_private_explicit: bool, ?danger_accept_invalid_certs: bool) -> void
217
+ def initialize: (?max_depth: Integer, ?max_pages: Integer, ?max_links_per_page: Integer, ?max_concurrent: Integer, ?crawl_strategy: enum_CrawlStrategyKind, ?content_filter: enum_ContentFilterKind, ?bm25_query: String, ?bm25_threshold: Float, ?respect_robots_txt: bool, ?soft_http_errors: bool, ?user_agent: String, ?stay_on_domain: bool, ?allow_subdomains: bool, ?include_paths: Array[String], ?exclude_paths: Array[String], ?path_patterns_match_query: bool, ?path_patterns_match_url: bool, ?dedup_include_query: bool, ?strip_tracking_params: bool, ?tracking_params: Array[String], ?custom_headers: Hash[String, String], ?request_timeout: Integer, ?rate_limit_ms: Integer, ?max_redirects: Integer, ?retry_count: Integer, ?retry_codes: Array[Integer], ?retry_initial_delay_ms: Integer, ?retry_max_delay_ms: Integer, ?rate_limit_jitter_ratio: Float, ?cookies_enabled: bool, ?auth: AuthConfig, ?max_body_size: Integer, ?remove_tags: Array[String], ?content: ContentConfig, ?map_limit: Integer, ?map_search: String, ?download_assets: bool, ?asset_types: Array[enum_AssetCategory], ?max_asset_size: Integer, ?browser: BrowserConfig, ?proxy: ProxyConfig, ?user_agents: Array[String], ?capture_screenshot: bool, ?follow_document_urls: bool, ?document_url_depth: Integer, ?download_documents: bool, ?document_max_size: Integer, ?document_mime_types: Array[String], ?document_output_dir: String, ?document_content_encoding: enum_DocumentContentEncoding, ?warc_output: String, ?browser_profile: String, ?save_browser_profile: bool, ?ssrf: SsrfPolicy, ?ssrf_deny_private_explicit: bool, ?danger_accept_invalid_certs: bool, ?subdomain_header_allowlist: Array[String]) -> void
212
218
  def validate: () -> void
213
219
  end
214
220
 
@@ -524,7 +530,46 @@ def initialize: (?deny_private: bool, ?allowlist: Array[HostMatcher], ?denylist:
524
530
 
525
531
  type enum_AssetCategory = :document | :image | :audio | :video | :font | :stylesheet | :script | :archive | :data | :other
526
532
 
527
- class AuthConfig
533
+ module AuthConfig
534
+ def self.from_hash: (untyped hash) -> untyped
535
+ end
536
+
537
+ class AuthConfigBasic
538
+ include AuthConfig
539
+ attr_reader username: String
540
+ attr_reader password: String
541
+
542
+ def basic?: () -> bool
543
+ def bearer?: () -> bool
544
+ def header?: () -> bool
545
+
546
+ def self.from_hash: (untyped hash) -> untyped
547
+ def self.new: (username: String, password: String) -> AuthConfigBasic
548
+ end
549
+
550
+ class AuthConfigBearer
551
+ include AuthConfig
552
+ attr_reader token: String
553
+
554
+ def basic?: () -> bool
555
+ def bearer?: () -> bool
556
+ def header?: () -> bool
557
+
558
+ def self.from_hash: (untyped hash) -> untyped
559
+ def self.new: (token: String) -> AuthConfigBearer
560
+ end
561
+
562
+ class AuthConfigHeader
563
+ include AuthConfig
564
+ attr_reader name: String
565
+ attr_reader value: String
566
+
567
+ def basic?: () -> bool
568
+ def bearer?: () -> bool
569
+ def header?: () -> bool
570
+
571
+ def self.from_hash: (untyped hash) -> untyped
572
+ def self.new: (name: String, value: String) -> AuthConfigHeader
528
573
  end
529
574
 
530
575
  type enum_BrowserBackend = :chromiumoxide | :native
@@ -535,7 +580,45 @@ def initialize: (?deny_private: bool, ?allowlist: Array[HostMatcher], ?denylist:
535
580
 
536
581
  type enum_ContentFilterKind = :bm25
537
582
 
538
- class CrawlEvent
583
+ module CrawlEvent
584
+ def self.from_hash: (untyped hash) -> untyped
585
+ end
586
+
587
+ class CrawlEventPage
588
+ include CrawlEvent
589
+ attr_reader result: CrawlPageResult
590
+
591
+ def page?: () -> bool
592
+ def error?: () -> bool
593
+ def complete?: () -> bool
594
+
595
+ def self.from_hash: (untyped hash) -> untyped
596
+ def self.new: (result: CrawlPageResult) -> CrawlEventPage
597
+ end
598
+
599
+ class CrawlEventError
600
+ include CrawlEvent
601
+ attr_reader url: String
602
+ attr_reader error: String
603
+
604
+ def page?: () -> bool
605
+ def error?: () -> bool
606
+ def complete?: () -> bool
607
+
608
+ def self.from_hash: (untyped hash) -> untyped
609
+ def self.new: (url: String, error: String) -> CrawlEventError
610
+ end
611
+
612
+ class CrawlEventComplete
613
+ include CrawlEvent
614
+ attr_reader pages_crawled: Integer
615
+
616
+ def page?: () -> bool
617
+ def error?: () -> bool
618
+ def complete?: () -> bool
619
+
620
+ def self.from_hash: (untyped hash) -> untyped
621
+ def self.new: (pages_crawled: Integer) -> CrawlEventComplete
539
622
  end
540
623
 
541
624
  type enum_CrawlStrategyKind = :bfs | :dfs | :best_first | :adaptive
@@ -544,14 +627,190 @@ def initialize: (?deny_private: bool, ?allowlist: Array[HostMatcher], ?denylist:
544
627
 
545
628
  type enum_FeedType = :rss | :atom | :json_feed
546
629
 
547
- class HostMatcher
630
+ module HostMatcher
631
+ def self.from_hash: (untyped hash) -> untyped
632
+ end
633
+
634
+ class HostMatcherExact
635
+ include HostMatcher
636
+ attr_reader value: String
637
+
638
+ def exact?: () -> bool
639
+ def suffix?: () -> bool
640
+ def cidr?: () -> bool
641
+
642
+ def self.from_hash: (untyped hash) -> untyped
643
+ def self.new: (value: String) -> HostMatcherExact
644
+ end
645
+
646
+ class HostMatcherSuffix
647
+ include HostMatcher
648
+ attr_reader value: String
649
+
650
+ def exact?: () -> bool
651
+ def suffix?: () -> bool
652
+ def cidr?: () -> bool
653
+
654
+ def self.from_hash: (untyped hash) -> untyped
655
+ def self.new: (value: String) -> HostMatcherSuffix
656
+ end
657
+
658
+ class HostMatcherCidr
659
+ include HostMatcher
660
+ attr_reader value: String
661
+
662
+ def exact?: () -> bool
663
+ def suffix?: () -> bool
664
+ def cidr?: () -> bool
665
+
666
+ def self.from_hash: (untyped hash) -> untyped
667
+ def self.new: (value: String) -> HostMatcherCidr
548
668
  end
549
669
 
550
670
  type enum_ImageSource = :img | :picture_source | :"og:image" | :"twitter:image"
551
671
 
552
672
  type enum_LinkType = :internal | :external | :anchor | :document
553
673
 
554
- class PageAction
674
+ module PageAction
675
+ def self.from_hash: (untyped hash) -> untyped
676
+ end
677
+
678
+ class PageActionClick
679
+ include PageAction
680
+ attr_reader selector: String
681
+
682
+ def click?: () -> bool
683
+ def type_text?: () -> bool
684
+ def press?: () -> bool
685
+ def scroll?: () -> bool
686
+ def wait?: () -> bool
687
+ def screenshot?: () -> bool
688
+ def execute_js?: () -> bool
689
+ def scrape?: () -> bool
690
+
691
+ def self.from_hash: (untyped hash) -> untyped
692
+ def self.new: (selector: String) -> PageActionClick
693
+ end
694
+
695
+ class PageActionTypeText
696
+ include PageAction
697
+ attr_reader selector: String
698
+ attr_reader text: String
699
+
700
+ def click?: () -> bool
701
+ def type_text?: () -> bool
702
+ def press?: () -> bool
703
+ def scroll?: () -> bool
704
+ def wait?: () -> bool
705
+ def screenshot?: () -> bool
706
+ def execute_js?: () -> bool
707
+ def scrape?: () -> bool
708
+
709
+ def self.from_hash: (untyped hash) -> untyped
710
+ def self.new: (selector: String, text: String) -> PageActionTypeText
711
+ end
712
+
713
+ class PageActionPress
714
+ include PageAction
715
+ attr_reader key: String
716
+
717
+ def click?: () -> bool
718
+ def type_text?: () -> bool
719
+ def press?: () -> bool
720
+ def scroll?: () -> bool
721
+ def wait?: () -> bool
722
+ def screenshot?: () -> bool
723
+ def execute_js?: () -> bool
724
+ def scrape?: () -> bool
725
+
726
+ def self.from_hash: (untyped hash) -> untyped
727
+ def self.new: (key: String) -> PageActionPress
728
+ end
729
+
730
+ class PageActionScroll
731
+ include PageAction
732
+ attr_reader direction: enum_ScrollDirection
733
+ attr_reader selector: String?
734
+ attr_reader amount: Integer?
735
+
736
+ def click?: () -> bool
737
+ def type_text?: () -> bool
738
+ def press?: () -> bool
739
+ def scroll?: () -> bool
740
+ def wait?: () -> bool
741
+ def screenshot?: () -> bool
742
+ def execute_js?: () -> bool
743
+ def scrape?: () -> bool
744
+
745
+ def self.from_hash: (untyped hash) -> untyped
746
+ def self.new: (direction: enum_ScrollDirection, selector: String, amount: Integer) -> PageActionScroll
747
+ end
748
+
749
+ class PageActionWait
750
+ include PageAction
751
+ attr_reader milliseconds: Integer?
752
+ attr_reader selector: String?
753
+
754
+ def click?: () -> bool
755
+ def type_text?: () -> bool
756
+ def press?: () -> bool
757
+ def scroll?: () -> bool
758
+ def wait?: () -> bool
759
+ def screenshot?: () -> bool
760
+ def execute_js?: () -> bool
761
+ def scrape?: () -> bool
762
+
763
+ def self.from_hash: (untyped hash) -> untyped
764
+ def self.new: (milliseconds: Integer, selector: String) -> PageActionWait
765
+ end
766
+
767
+ class PageActionScreenshot
768
+ include PageAction
769
+ attr_reader full_page: bool?
770
+
771
+ def click?: () -> bool
772
+ def type_text?: () -> bool
773
+ def press?: () -> bool
774
+ def scroll?: () -> bool
775
+ def wait?: () -> bool
776
+ def screenshot?: () -> bool
777
+ def execute_js?: () -> bool
778
+ def scrape?: () -> bool
779
+
780
+ def self.from_hash: (untyped hash) -> untyped
781
+ def self.new: (full_page: bool) -> PageActionScreenshot
782
+ end
783
+
784
+ class PageActionExecuteJs
785
+ include PageAction
786
+ attr_reader script: String
787
+
788
+ def click?: () -> bool
789
+ def type_text?: () -> bool
790
+ def press?: () -> bool
791
+ def scroll?: () -> bool
792
+ def wait?: () -> bool
793
+ def screenshot?: () -> bool
794
+ def execute_js?: () -> bool
795
+ def scrape?: () -> bool
796
+
797
+ def self.from_hash: (untyped hash) -> untyped
798
+ def self.new: (script: String) -> PageActionExecuteJs
799
+ end
800
+
801
+ class PageActionScrape
802
+ include PageAction
803
+ def click?: () -> bool
804
+ def type_text?: () -> bool
805
+ def press?: () -> bool
806
+ def scroll?: () -> bool
807
+ def wait?: () -> bool
808
+ def screenshot?: () -> bool
809
+ def execute_js?: () -> bool
810
+ def scrape?: () -> bool
811
+
812
+ def self.from_hash: (untyped hash) -> untyped
813
+ def self.new: -> PageActionScrape
555
814
  end
556
815
 
557
816
  type enum_ScrollDirection = :up | :down
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crawlberg
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.0
4
+ version: 1.12.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Na'aman Hirschfeld
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2026-10-22 00:00:00.000000000 Z
12
+ date: 2026-10-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rb_sys
@@ -18,9 +18,6 @@ dependencies:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
20
  version: 0.9.130
21
- - - "<"
22
- - !ruby/object:Gem::Version
23
- version: '0.10'
24
21
  type: :runtime
25
22
  prerelease: false
26
23
  version_requirements: !ruby/object:Gem::Requirement
@@ -28,9 +25,6 @@ dependencies:
28
25
  - - ">="
29
26
  - !ruby/object:Gem::Version
30
27
  version: 0.9.130
31
- - - "<"
32
- - !ruby/object:Gem::Version
33
- version: '0.10'
34
28
  - !ruby/object:Gem::Dependency
35
29
  name: sorbet-runtime
36
30
  requirement: !ruby/object:Gem::Requirement