crawlberg 1.12.2 → 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d94c2b28c7e7bc04835352b1e68dd17e01e73435438d896869793e8205dda557
4
- data.tar.gz: af40fde2be40012801c809a9a29aa588f7b5e173f06c7c97a553b8edabf38fc4
3
+ metadata.gz: 30a868ed0481017eb9b39c702345e1400e344c6a5344e032c3373c2639c4d899
4
+ data.tar.gz: e3c0a251a23a696d8c50f43dac142b125d39a8c63aea27198df4195b5ebe62c9
5
5
  SHA512:
6
- metadata.gz: 40b098a85ecdbead4feb24b6364064e2ce2efcc5bb0feb8b9c2df00cef4a1de529fb3a9b2c5496568aaee0b03b5e9f3913732b0c9cdc882561c91e811d017bca
7
- data.tar.gz: d6d13a3632dbf1f84a21c53dfd1432de7f79be1ed3f818dd19883af9fd4fbc3258a13fb918de4db8b390320b642b5c19543aad67f6ce62928311d675d3c667cc
6
+ metadata.gz: 31908f8286aecb43890904b744b3b7ef377965d3db07e0bab5e84c3384314d2b9eb77cda839a21ec9ed76d656de192c63b1afb1c807b3bfaf957518937b4e704
7
+ data.tar.gz: '028a9b3167894b417bb5c5a3cf47a268123e9f5f749be60f7a04347ae47e19791db3ae185289140cd379851fc93e954883be62228c229b1fddb9461836658744'
@@ -537,9 +537,9 @@ dependencies = [
537
537
 
538
538
  [[package]]
539
539
  name = "crawlberg"
540
- version = "1.12.2"
540
+ version = "1.12.3"
541
541
  source = "registry+https://github.com/rust-lang/crates.io-index"
542
- checksum = "8949315433622c191e4f83b23041a46f02f6096839149706af09715f75280971"
542
+ checksum = "e9cece970a1c583dc55de73dcbc4d85242c565cd1ab5223eb090aa36632c8f05"
543
543
  dependencies = [
544
544
  "ahash",
545
545
  "aho-corasick",
@@ -607,9 +607,9 @@ dependencies = [
607
607
 
608
608
  [[package]]
609
609
  name = "crawlberg-chromiumoxide"
610
- version = "0.9.4"
610
+ version = "0.9.5"
611
611
  source = "registry+https://github.com/rust-lang/crates.io-index"
612
- checksum = "937d12e969f7090c02cb64dff52375f3e26e669cbdda7bc49ce364fb8ce7bb68"
612
+ checksum = "28a8fa6f75a2a698c099f1defa98fe1dd45367e0574d7f52306a1e54d66bf4df"
613
613
  dependencies = [
614
614
  "async-tungstenite",
615
615
  "base64",
@@ -635,7 +635,7 @@ dependencies = [
635
635
 
636
636
  [[package]]
637
637
  name = "crawlberg-rb"
638
- version = "1.12.2"
638
+ version = "1.12.3"
639
639
  dependencies = [
640
640
  "crawlberg",
641
641
  "futures",
@@ -648,9 +648,9 @@ dependencies = [
648
648
 
649
649
  [[package]]
650
650
  name = "crawlberg-robots"
651
- version = "1.12.2"
651
+ version = "1.12.3"
652
652
  source = "registry+https://github.com/rust-lang/crates.io-index"
653
- checksum = "30cb48557123dd4e13fd756b83490faf9aaeb7d70e1bcd74a410c4f12a9b6320"
653
+ checksum = "3a38455515bc47cf5e05e8a02a761d24e2b80970af157bcc828d22a99225962f"
654
654
 
655
655
  [[package]]
656
656
  name = "crc32fast"
@@ -1077,9 +1077,9 @@ checksum = "491194d601b4fa9fac3c9571e014070a0ad1bc3392d1bc10419695196a8b3cc3"
1077
1077
 
1078
1078
  [[package]]
1079
1079
  name = "html-to-markdown-rs"
1080
- version = "3.18.7"
1080
+ version = "3.19.0"
1081
1081
  source = "registry+https://github.com/rust-lang/crates.io-index"
1082
- checksum = "259eff8de02b67e436fa4ccd377dbf6105d530fc405f20489677f417cf673a7a"
1082
+ checksum = "ddada45be32a036999fbda2be5df286dc2001816e60099ec3fd445fc6c3bb69b"
1083
1083
  dependencies = [
1084
1084
  "ahash",
1085
1085
  "astral-tl",
@@ -1,11 +1,11 @@
1
1
  # This file is auto-generated by alef — DO NOT EDIT.
2
- # alef:hash:b3f271455dce968c83cbdf03e1934902e2ad21295928a2c5f148e7dddc67ac2c
2
+ # alef:hash:a86b7727e26a9e336e600fe8a57e0a117bf4bfa5b149da399b9648824aaa6c73
3
3
  # To regenerate: alef generate
4
4
  # To verify freshness: alef verify
5
5
 
6
6
  [package]
7
7
  name = "crawlberg-rb"
8
- version = "1.12.2"
8
+ version = "1.12.3"
9
9
  edition = "2024"
10
10
  authors = ["Na'aman Hirschfeld <naaman@xberg.io>", "Tobias Perlstein <tobias@xberg.io>"]
11
11
  license = "MIT"
@@ -23,7 +23,7 @@ path = "../src/lib.rs"
23
23
  crate-type = ["cdylib"]
24
24
 
25
25
  [dependencies]
26
- crawlberg = { version = "1.12.2", features = ["interact", "browser-chromiumoxide"] }
26
+ crawlberg = { version = "1.12.3", features = ["interact", "browser-chromiumoxide"] }
27
27
  futures = "0.3"
28
28
  magnus = "0.9"
29
29
  rb-sys = ">=0.9.130, <0.10"
@@ -1,10 +1,10 @@
1
1
  # This file is auto-generated by alef — DO NOT EDIT.
2
- # alef:hash:b402d1b3bc989de04db5241785f4bc16c0b5e0f76714438d3687648c64d8c10f
2
+ # alef:hash:4b49e60e4c3bdd958dfccc4aee6deec2a78c41bafced6ee25ec8b66aa0b049ca
3
3
  # To regenerate: alef generate
4
4
  # To verify freshness: alef verify
5
5
  # frozen_string_literal: true
6
6
 
7
7
  module Crawlberg
8
8
  ## The version string for this package.
9
- VERSION = "1.12.2"
9
+ VERSION = "1.12.3"
10
10
  end
data/sig/types.rbs CHANGED
@@ -1,5 +1,5 @@
1
1
  # This file is auto-generated by alef — DO NOT EDIT.
2
- # alef:hash:9aca68325287aae22a855afd34597e3d8bd90c6b7774f3b305591fde4fb051cd
2
+ # alef:hash:4cdc9eb4c9b67c7adb9baf33b70eb0c6ee54e28b0c0973121fbef2934ff8a431
3
3
  # To regenerate: alef generate
4
4
  # To verify freshness: alef verify
5
5
 
@@ -530,7 +530,46 @@ def initialize: (?deny_private: bool, ?allowlist: Array[HostMatcher], ?denylist:
530
530
 
531
531
  type enum_AssetCategory = :document | :image | :audio | :video | :font | :stylesheet | :script | :archive | :data | :other
532
532
 
533
- 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
534
573
  end
535
574
 
536
575
  type enum_BrowserBackend = :chromiumoxide | :native
@@ -541,7 +580,45 @@ def initialize: (?deny_private: bool, ?allowlist: Array[HostMatcher], ?denylist:
541
580
 
542
581
  type enum_ContentFilterKind = :bm25
543
582
 
544
- 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
545
622
  end
546
623
 
547
624
  type enum_CrawlStrategyKind = :bfs | :dfs | :best_first | :adaptive
@@ -550,14 +627,190 @@ def initialize: (?deny_private: bool, ?allowlist: Array[HostMatcher], ?denylist:
550
627
 
551
628
  type enum_FeedType = :rss | :atom | :json_feed
552
629
 
553
- 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
554
668
  end
555
669
 
556
670
  type enum_ImageSource = :img | :picture_source | :"og:image" | :"twitter:image"
557
671
 
558
672
  type enum_LinkType = :internal | :external | :anchor | :document
559
673
 
560
- 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
561
814
  end
562
815
 
563
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.2
4
+ version: 1.12.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Na'aman Hirschfeld