crawlberg 1.0.1 → 1.0.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 +4 -4
- data/ext/crawlberg_rb/native/Cargo.lock +68 -32
- data/ext/crawlberg_rb/native/Cargo.toml +2 -2
- data/ext/crawlberg_rb/src/lib.rs +36 -99
- data/lib/crawlberg/native.rb +81 -39
- data/lib/crawlberg/version.rb +2 -2
- data/lib/crawlberg.rb +10 -1
- data/lib/crawlberg_rb.so +0 -0
- data/sig/types.rbs +372 -372
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 14f3cbbce5b53366e44498f012fe7b79b45b8a11a4c5cd712dfd4f5dcbd18934
|
|
4
|
+
data.tar.gz: c18b8a4575a244bd54fff1db81e1b21266a6a52d54cec99e7c760f1abad6f076
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d0a381e2451d54f1e1a016d3d832df167f5aaee8fac4b0eb81631b32cebac8b8000bc6d3f5119d51b9f29a8a92c9b0707ed33aebdf76d7f97a3809dc1c5fb047
|
|
7
|
+
data.tar.gz: 40ff0204c26d0dc39c5b9161036cda1b91157f9e3a9d7e1ac06be03806c6322f68ebd43f5fd8357d1ee75f69d0682e89c702cdac32f25a59f4eb5a59f7dc37a7
|
|
@@ -145,9 +145,9 @@ checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
|
|
|
145
145
|
|
|
146
146
|
[[package]]
|
|
147
147
|
name = "aws-lc-rs"
|
|
148
|
-
version = "1.17.
|
|
148
|
+
version = "1.17.1"
|
|
149
149
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
150
|
-
checksum = "
|
|
150
|
+
checksum = "4342d8937fc7e5dd9b1c60292261c0670c882a2cd1719cfc11b1af41731e32ad"
|
|
151
151
|
dependencies = [
|
|
152
152
|
"aws-lc-sys",
|
|
153
153
|
"zeroize",
|
|
@@ -155,14 +155,15 @@ dependencies = [
|
|
|
155
155
|
|
|
156
156
|
[[package]]
|
|
157
157
|
name = "aws-lc-sys"
|
|
158
|
-
version = "0.
|
|
158
|
+
version = "0.42.0"
|
|
159
159
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
160
|
-
checksum = "
|
|
160
|
+
checksum = "6d9ceb1da931507a12f4fccea479dccd00da1943e1b4ae72d8e502d707361444"
|
|
161
161
|
dependencies = [
|
|
162
162
|
"cc",
|
|
163
163
|
"cmake",
|
|
164
164
|
"dunce",
|
|
165
165
|
"fs_extra",
|
|
166
|
+
"pkg-config",
|
|
166
167
|
]
|
|
167
168
|
|
|
168
169
|
[[package]]
|
|
@@ -544,9 +545,9 @@ dependencies = [
|
|
|
544
545
|
|
|
545
546
|
[[package]]
|
|
546
547
|
name = "crawlberg"
|
|
547
|
-
version = "1.0.
|
|
548
|
+
version = "1.0.3"
|
|
548
549
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
549
|
-
checksum = "
|
|
550
|
+
checksum = "46b3f6dfec53e26f1f989b4685943153a54e1d2101f8bd3ae5afd810b7957423"
|
|
550
551
|
dependencies = [
|
|
551
552
|
"ahash",
|
|
552
553
|
"aho-corasick",
|
|
@@ -586,7 +587,7 @@ dependencies = [
|
|
|
586
587
|
|
|
587
588
|
[[package]]
|
|
588
589
|
name = "crawlberg-rb"
|
|
589
|
-
version = "1.0.
|
|
590
|
+
version = "1.0.3"
|
|
590
591
|
dependencies = [
|
|
591
592
|
"crawlberg",
|
|
592
593
|
"futures",
|
|
@@ -1042,9 +1043,9 @@ dependencies = [
|
|
|
1042
1043
|
|
|
1043
1044
|
[[package]]
|
|
1044
1045
|
name = "html-to-markdown-rs"
|
|
1045
|
-
version = "3.
|
|
1046
|
+
version = "3.8.0"
|
|
1046
1047
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1047
|
-
checksum = "
|
|
1048
|
+
checksum = "da9935e81a6fee38ebbc5a2ca4e9590f99f650ffb8a08734c4115a3e06c3c5d3"
|
|
1048
1049
|
dependencies = [
|
|
1049
1050
|
"ahash",
|
|
1050
1051
|
"astral-tl",
|
|
@@ -1056,7 +1057,7 @@ dependencies = [
|
|
|
1056
1057
|
"lru",
|
|
1057
1058
|
"memchr",
|
|
1058
1059
|
"once_cell",
|
|
1059
|
-
"phf",
|
|
1060
|
+
"phf 0.14.0",
|
|
1060
1061
|
"regex",
|
|
1061
1062
|
"serde",
|
|
1062
1063
|
"serde_json",
|
|
@@ -1765,9 +1766,19 @@ name = "phf"
|
|
|
1765
1766
|
version = "0.13.1"
|
|
1766
1767
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1767
1768
|
checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf"
|
|
1769
|
+
dependencies = [
|
|
1770
|
+
"phf_shared 0.13.1",
|
|
1771
|
+
"serde",
|
|
1772
|
+
]
|
|
1773
|
+
|
|
1774
|
+
[[package]]
|
|
1775
|
+
name = "phf"
|
|
1776
|
+
version = "0.14.0"
|
|
1777
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1778
|
+
checksum = "010378780309880b08997fae13be7834dba947d36393bd372f2b1556deb2a2f6"
|
|
1768
1779
|
dependencies = [
|
|
1769
1780
|
"phf_macros",
|
|
1770
|
-
"phf_shared",
|
|
1781
|
+
"phf_shared 0.14.0",
|
|
1771
1782
|
"serde",
|
|
1772
1783
|
]
|
|
1773
1784
|
|
|
@@ -1777,8 +1788,8 @@ version = "0.13.1"
|
|
|
1777
1788
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1778
1789
|
checksum = "49aa7f9d80421bca176ca8dbfebe668cc7a2684708594ec9f3c0db0805d5d6e1"
|
|
1779
1790
|
dependencies = [
|
|
1780
|
-
"phf_generator",
|
|
1781
|
-
"phf_shared",
|
|
1791
|
+
"phf_generator 0.13.1",
|
|
1792
|
+
"phf_shared 0.13.1",
|
|
1782
1793
|
]
|
|
1783
1794
|
|
|
1784
1795
|
[[package]]
|
|
@@ -1788,17 +1799,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
1788
1799
|
checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737"
|
|
1789
1800
|
dependencies = [
|
|
1790
1801
|
"fastrand",
|
|
1791
|
-
"phf_shared",
|
|
1802
|
+
"phf_shared 0.13.1",
|
|
1803
|
+
]
|
|
1804
|
+
|
|
1805
|
+
[[package]]
|
|
1806
|
+
name = "phf_generator"
|
|
1807
|
+
version = "0.14.0"
|
|
1808
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1809
|
+
checksum = "aeb62e0959d5a1bebc965f4d15d9e2b7cea002b6b0f5ba8cde6cc26738467100"
|
|
1810
|
+
dependencies = [
|
|
1811
|
+
"fastrand",
|
|
1812
|
+
"phf_shared 0.14.0",
|
|
1792
1813
|
]
|
|
1793
1814
|
|
|
1794
1815
|
[[package]]
|
|
1795
1816
|
name = "phf_macros"
|
|
1796
|
-
version = "0.
|
|
1817
|
+
version = "0.14.0"
|
|
1797
1818
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1798
|
-
checksum = "
|
|
1819
|
+
checksum = "5fa8d0ca26d424d27630da600c6624696e7dec8bf7b3b492b383c5dc49e5e085"
|
|
1799
1820
|
dependencies = [
|
|
1800
|
-
"phf_generator",
|
|
1801
|
-
"phf_shared",
|
|
1821
|
+
"phf_generator 0.14.0",
|
|
1822
|
+
"phf_shared 0.14.0",
|
|
1802
1823
|
"proc-macro2",
|
|
1803
1824
|
"quote",
|
|
1804
1825
|
"syn",
|
|
@@ -1813,12 +1834,27 @@ dependencies = [
|
|
|
1813
1834
|
"siphasher",
|
|
1814
1835
|
]
|
|
1815
1836
|
|
|
1837
|
+
[[package]]
|
|
1838
|
+
name = "phf_shared"
|
|
1839
|
+
version = "0.14.0"
|
|
1840
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1841
|
+
checksum = "c6fd9027e2d9319be6349febd1db4e8d02aa544921200c9b777720ac34a3aa89"
|
|
1842
|
+
dependencies = [
|
|
1843
|
+
"siphasher",
|
|
1844
|
+
]
|
|
1845
|
+
|
|
1816
1846
|
[[package]]
|
|
1817
1847
|
name = "pin-project-lite"
|
|
1818
1848
|
version = "0.2.17"
|
|
1819
1849
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1820
1850
|
checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
|
|
1821
1851
|
|
|
1852
|
+
[[package]]
|
|
1853
|
+
name = "pkg-config"
|
|
1854
|
+
version = "0.3.33"
|
|
1855
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1856
|
+
checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e"
|
|
1857
|
+
|
|
1822
1858
|
[[package]]
|
|
1823
1859
|
name = "png"
|
|
1824
1860
|
version = "0.18.1"
|
|
@@ -1901,9 +1937,9 @@ checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3"
|
|
|
1901
1937
|
|
|
1902
1938
|
[[package]]
|
|
1903
1939
|
name = "quick-xml"
|
|
1904
|
-
version = "0.
|
|
1940
|
+
version = "0.41.0"
|
|
1905
1941
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1906
|
-
checksum = "
|
|
1942
|
+
checksum = "e660451e55124f798a69a5af3f49ccfbefbd41910eefd25caf2393e1f3473ec1"
|
|
1907
1943
|
dependencies = [
|
|
1908
1944
|
"memchr",
|
|
1909
1945
|
]
|
|
@@ -2149,9 +2185,9 @@ dependencies = [
|
|
|
2149
2185
|
|
|
2150
2186
|
[[package]]
|
|
2151
2187
|
name = "rustc-hash"
|
|
2152
|
-
version = "2.1.
|
|
2188
|
+
version = "2.1.3"
|
|
2153
2189
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2154
|
-
checksum = "
|
|
2190
|
+
checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d"
|
|
2155
2191
|
|
|
2156
2192
|
[[package]]
|
|
2157
2193
|
name = "rustc_version"
|
|
@@ -2190,9 +2226,9 @@ dependencies = [
|
|
|
2190
2226
|
|
|
2191
2227
|
[[package]]
|
|
2192
2228
|
name = "rustls-pki-types"
|
|
2193
|
-
version = "1.
|
|
2229
|
+
version = "1.15.0"
|
|
2194
2230
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2195
|
-
checksum = "
|
|
2231
|
+
checksum = "764899a24af3980067ee14bc143654f297b22eaebfe3c7b6b211920a5a59b046"
|
|
2196
2232
|
dependencies = [
|
|
2197
2233
|
"web-time",
|
|
2198
2234
|
"zeroize",
|
|
@@ -2468,7 +2504,7 @@ checksum = "a18596f8c785a729f2819c0f6a7eae6ebeebdfffbfe4214ae6b087f690e31901"
|
|
|
2468
2504
|
dependencies = [
|
|
2469
2505
|
"new_debug_unreachable",
|
|
2470
2506
|
"parking_lot",
|
|
2471
|
-
"phf_shared",
|
|
2507
|
+
"phf_shared 0.13.1",
|
|
2472
2508
|
"precomputed-hash",
|
|
2473
2509
|
]
|
|
2474
2510
|
|
|
@@ -2478,8 +2514,8 @@ version = "0.6.1"
|
|
|
2478
2514
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2479
2515
|
checksum = "585635e46db231059f76c5849798146164652513eb9e8ab2685939dd90f29b69"
|
|
2480
2516
|
dependencies = [
|
|
2481
|
-
"phf_generator",
|
|
2482
|
-
"phf_shared",
|
|
2517
|
+
"phf_generator 0.13.1",
|
|
2518
|
+
"phf_shared 0.13.1",
|
|
2483
2519
|
"proc-macro2",
|
|
2484
2520
|
"quote",
|
|
2485
2521
|
]
|
|
@@ -2574,9 +2610,9 @@ dependencies = [
|
|
|
2574
2610
|
|
|
2575
2611
|
[[package]]
|
|
2576
2612
|
name = "time"
|
|
2577
|
-
version = "0.3.
|
|
2613
|
+
version = "0.3.53"
|
|
2578
2614
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2579
|
-
checksum = "
|
|
2615
|
+
checksum = "18dfaaeddcb932337b5e7866ee7d0ce9b76d2fd092997146f187ec09b4558a50"
|
|
2580
2616
|
dependencies = [
|
|
2581
2617
|
"deranged",
|
|
2582
2618
|
"num-conv",
|
|
@@ -2594,9 +2630,9 @@ checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109"
|
|
|
2594
2630
|
|
|
2595
2631
|
[[package]]
|
|
2596
2632
|
name = "time-macros"
|
|
2597
|
-
version = "0.2.
|
|
2633
|
+
version = "0.2.31"
|
|
2598
2634
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2599
|
-
checksum = "
|
|
2635
|
+
checksum = "c431b87111666e491a90baa837f914fb45cd5dc3c268591b0220ff5057f2085f"
|
|
2600
2636
|
dependencies = [
|
|
2601
2637
|
"num-conv",
|
|
2602
2638
|
"time-core",
|
|
@@ -3011,7 +3047,7 @@ version = "0.2.5"
|
|
|
3011
3047
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3012
3048
|
checksum = "075474b12bcb3d2e3d4546580e9de478eeeead668a1761e2a8860c836b7ef297"
|
|
3013
3049
|
dependencies = [
|
|
3014
|
-
"phf",
|
|
3050
|
+
"phf 0.13.1",
|
|
3015
3051
|
"phf_codegen",
|
|
3016
3052
|
"string_cache",
|
|
3017
3053
|
"string_cache_codegen",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "crawlberg-rb"
|
|
3
|
-
version = "1.0.
|
|
3
|
+
version = "1.0.3"
|
|
4
4
|
edition = "2024"
|
|
5
5
|
license = "MIT"
|
|
6
6
|
description = "High-performance web crawling engine"
|
|
@@ -17,7 +17,7 @@ path = "../src/lib.rs"
|
|
|
17
17
|
crate-type = ["cdylib"]
|
|
18
18
|
|
|
19
19
|
[dependencies]
|
|
20
|
-
crawlberg = { version = "1.0.
|
|
20
|
+
crawlberg = { version = "1.0.3", features = ["interact", "browser-chromiumoxide"] }
|
|
21
21
|
futures = "0.3"
|
|
22
22
|
magnus = "0.8"
|
|
23
23
|
rb-sys = ">=0.9, <0.9.128"
|
data/ext/crawlberg_rb/src/lib.rs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file is auto-generated by alef. DO NOT EDIT.
|
|
2
|
-
// alef:hash:
|
|
2
|
+
// alef:hash:e0600612767fdd3d51e9128afdb0ffcd1fb490e9942f3839a5120ab7a4e3b658
|
|
3
3
|
// Re-generate with: alef generate
|
|
4
4
|
#![allow(dead_code, unused_imports, unused_variables)]
|
|
5
5
|
#![allow(
|
|
@@ -438,21 +438,7 @@ unsafe impl TryConvertOwned for BrowserConfig {}
|
|
|
438
438
|
|
|
439
439
|
impl Default for BrowserConfig {
|
|
440
440
|
fn default() -> Self {
|
|
441
|
-
|
|
442
|
-
mode: BrowserMode::Auto,
|
|
443
|
-
backend: BrowserBackend::Chromiumoxide,
|
|
444
|
-
endpoint: None,
|
|
445
|
-
timeout: 30000,
|
|
446
|
-
wait: Default::default(),
|
|
447
|
-
wait_selector: None,
|
|
448
|
-
extra_wait: None,
|
|
449
|
-
proxy: None,
|
|
450
|
-
block_url_patterns: vec![],
|
|
451
|
-
eval_script: None,
|
|
452
|
-
robots_user_agent: None,
|
|
453
|
-
capture_network_events: false,
|
|
454
|
-
session_affinity: true,
|
|
455
|
-
}
|
|
441
|
+
crawlberg::BrowserConfig::default().into()
|
|
456
442
|
}
|
|
457
443
|
}
|
|
458
444
|
|
|
@@ -641,47 +627,7 @@ unsafe impl TryConvertOwned for CrawlConfig {}
|
|
|
641
627
|
|
|
642
628
|
impl Default for CrawlConfig {
|
|
643
629
|
fn default() -> Self {
|
|
644
|
-
|
|
645
|
-
max_depth: None,
|
|
646
|
-
max_pages: None,
|
|
647
|
-
max_concurrent: None,
|
|
648
|
-
respect_robots_txt: false,
|
|
649
|
-
soft_http_errors: false,
|
|
650
|
-
user_agent: None,
|
|
651
|
-
stay_on_domain: false,
|
|
652
|
-
allow_subdomains: false,
|
|
653
|
-
include_paths: vec![],
|
|
654
|
-
exclude_paths: vec![],
|
|
655
|
-
custom_headers: Default::default(),
|
|
656
|
-
request_timeout: 30000,
|
|
657
|
-
rate_limit_ms: None,
|
|
658
|
-
max_redirects: 10,
|
|
659
|
-
retry_count: 0,
|
|
660
|
-
retry_codes: vec![],
|
|
661
|
-
cookies_enabled: false,
|
|
662
|
-
auth: None,
|
|
663
|
-
max_body_size: None,
|
|
664
|
-
remove_tags: vec![],
|
|
665
|
-
content: Default::default(),
|
|
666
|
-
map_limit: None,
|
|
667
|
-
map_search: None,
|
|
668
|
-
download_assets: false,
|
|
669
|
-
asset_types: vec![],
|
|
670
|
-
max_asset_size: None,
|
|
671
|
-
browser: Default::default(),
|
|
672
|
-
proxy: None,
|
|
673
|
-
user_agents: vec![],
|
|
674
|
-
capture_screenshot: false,
|
|
675
|
-
follow_document_urls: false,
|
|
676
|
-
document_url_depth: None,
|
|
677
|
-
download_documents: true,
|
|
678
|
-
document_max_size: None,
|
|
679
|
-
document_mime_types: vec![],
|
|
680
|
-
warc_output: None,
|
|
681
|
-
browser_profile: None,
|
|
682
|
-
save_browser_profile: false,
|
|
683
|
-
ssrf: Default::default(),
|
|
684
|
-
}
|
|
630
|
+
crawlberg::CrawlConfig::default().into()
|
|
685
631
|
}
|
|
686
632
|
}
|
|
687
633
|
|
|
@@ -2410,13 +2356,7 @@ unsafe impl TryConvertOwned for LinkInfo {}
|
|
|
2410
2356
|
|
|
2411
2357
|
impl Default for LinkInfo {
|
|
2412
2358
|
fn default() -> Self {
|
|
2413
|
-
|
|
2414
|
-
url: String::new(),
|
|
2415
|
-
text: String::new(),
|
|
2416
|
-
link_type: Default::default(),
|
|
2417
|
-
rel: None,
|
|
2418
|
-
nofollow: false,
|
|
2419
|
-
}
|
|
2359
|
+
crawlberg::LinkInfo::default().into()
|
|
2420
2360
|
}
|
|
2421
2361
|
}
|
|
2422
2362
|
|
|
@@ -2511,13 +2451,7 @@ unsafe impl TryConvertOwned for ImageInfo {}
|
|
|
2511
2451
|
|
|
2512
2452
|
impl Default for ImageInfo {
|
|
2513
2453
|
fn default() -> Self {
|
|
2514
|
-
|
|
2515
|
-
url: String::new(),
|
|
2516
|
-
alt: None,
|
|
2517
|
-
width: None,
|
|
2518
|
-
height: None,
|
|
2519
|
-
source: Default::default(),
|
|
2520
|
-
}
|
|
2454
|
+
crawlberg::ImageInfo::default().into()
|
|
2521
2455
|
}
|
|
2522
2456
|
}
|
|
2523
2457
|
|
|
@@ -2608,11 +2542,7 @@ unsafe impl TryConvertOwned for FeedInfo {}
|
|
|
2608
2542
|
|
|
2609
2543
|
impl Default for FeedInfo {
|
|
2610
2544
|
fn default() -> Self {
|
|
2611
|
-
|
|
2612
|
-
url: String::new(),
|
|
2613
|
-
title: None,
|
|
2614
|
-
feed_type: Default::default(),
|
|
2615
|
-
}
|
|
2545
|
+
crawlberg::FeedInfo::default().into()
|
|
2616
2546
|
}
|
|
2617
2547
|
}
|
|
2618
2548
|
|
|
@@ -2854,14 +2784,7 @@ unsafe impl TryConvertOwned for DownloadedAsset {}
|
|
|
2854
2784
|
|
|
2855
2785
|
impl Default for DownloadedAsset {
|
|
2856
2786
|
fn default() -> Self {
|
|
2857
|
-
|
|
2858
|
-
url: String::new(),
|
|
2859
|
-
content_hash: String::new(),
|
|
2860
|
-
mime_type: None,
|
|
2861
|
-
size: 0,
|
|
2862
|
-
asset_category: Default::default(),
|
|
2863
|
-
html_tag: None,
|
|
2864
|
-
}
|
|
2787
|
+
crawlberg::DownloadedAsset::default().into()
|
|
2865
2788
|
}
|
|
2866
2789
|
}
|
|
2867
2790
|
|
|
@@ -6556,9 +6479,15 @@ impl From<crawlberg::BrowserBackend> for BrowserBackend {
|
|
|
6556
6479
|
impl From<AuthConfig> for crawlberg::AuthConfig {
|
|
6557
6480
|
fn from(val: AuthConfig) -> Self {
|
|
6558
6481
|
match val {
|
|
6559
|
-
AuthConfig::Basic { username, password } => Self::Basic {
|
|
6560
|
-
|
|
6561
|
-
|
|
6482
|
+
AuthConfig::Basic { username, password } => Self::Basic {
|
|
6483
|
+
username: username,
|
|
6484
|
+
password: password,
|
|
6485
|
+
},
|
|
6486
|
+
AuthConfig::Bearer { token } => Self::Bearer { token: token },
|
|
6487
|
+
AuthConfig::Header { name, value } => Self::Header {
|
|
6488
|
+
name: name,
|
|
6489
|
+
value: value,
|
|
6490
|
+
},
|
|
6562
6491
|
}
|
|
6563
6492
|
}
|
|
6564
6493
|
}
|
|
@@ -6689,7 +6618,9 @@ impl From<crawlberg::CrawlEvent> for CrawlEvent {
|
|
|
6689
6618
|
url: url.to_string(),
|
|
6690
6619
|
error: error.to_string(),
|
|
6691
6620
|
},
|
|
6692
|
-
crawlberg::CrawlEvent::Complete { pages_crawled } => Self::Complete {
|
|
6621
|
+
crawlberg::CrawlEvent::Complete { pages_crawled } => Self::Complete {
|
|
6622
|
+
pages_crawled: pages_crawled,
|
|
6623
|
+
},
|
|
6693
6624
|
}
|
|
6694
6625
|
}
|
|
6695
6626
|
}
|
|
@@ -6697,21 +6628,27 @@ impl From<crawlberg::CrawlEvent> for CrawlEvent {
|
|
|
6697
6628
|
impl From<PageAction> for crawlberg::PageAction {
|
|
6698
6629
|
fn from(val: PageAction) -> Self {
|
|
6699
6630
|
match val {
|
|
6700
|
-
PageAction::Click { selector } => Self::Click { selector },
|
|
6701
|
-
PageAction::TypeText { selector, text } => Self::TypeText {
|
|
6702
|
-
|
|
6631
|
+
PageAction::Click { selector } => Self::Click { selector: selector },
|
|
6632
|
+
PageAction::TypeText { selector, text } => Self::TypeText {
|
|
6633
|
+
selector: selector,
|
|
6634
|
+
text: text,
|
|
6635
|
+
},
|
|
6636
|
+
PageAction::Press { key } => Self::Press { key: key },
|
|
6703
6637
|
PageAction::Scroll {
|
|
6704
6638
|
direction,
|
|
6705
6639
|
selector,
|
|
6706
6640
|
amount,
|
|
6707
6641
|
} => Self::Scroll {
|
|
6708
6642
|
direction: direction.into(),
|
|
6709
|
-
selector,
|
|
6710
|
-
amount,
|
|
6643
|
+
selector: selector,
|
|
6644
|
+
amount: amount,
|
|
6711
6645
|
},
|
|
6712
|
-
PageAction::Wait { milliseconds, selector } => Self::Wait {
|
|
6713
|
-
|
|
6714
|
-
|
|
6646
|
+
PageAction::Wait { milliseconds, selector } => Self::Wait {
|
|
6647
|
+
milliseconds: milliseconds,
|
|
6648
|
+
selector: selector,
|
|
6649
|
+
},
|
|
6650
|
+
PageAction::Screenshot { full_page } => Self::Screenshot { full_page: full_page },
|
|
6651
|
+
PageAction::ExecuteJs { script } => Self::ExecuteJs { script: script },
|
|
6715
6652
|
PageAction::Scrape => Self::Scrape,
|
|
6716
6653
|
}
|
|
6717
6654
|
}
|
|
@@ -6735,13 +6672,13 @@ impl From<crawlberg::PageAction> for PageAction {
|
|
|
6735
6672
|
} => Self::Scroll {
|
|
6736
6673
|
direction: direction.into(),
|
|
6737
6674
|
selector: selector.map(|v| v.to_string()),
|
|
6738
|
-
amount,
|
|
6675
|
+
amount: amount,
|
|
6739
6676
|
},
|
|
6740
6677
|
crawlberg::PageAction::Wait { milliseconds, selector } => Self::Wait {
|
|
6741
|
-
milliseconds,
|
|
6678
|
+
milliseconds: milliseconds,
|
|
6742
6679
|
selector: selector.map(|v| v.to_string()),
|
|
6743
6680
|
},
|
|
6744
|
-
crawlberg::PageAction::Screenshot { full_page } => Self::Screenshot { full_page },
|
|
6681
|
+
crawlberg::PageAction::Screenshot { full_page } => Self::Screenshot { full_page: full_page },
|
|
6745
6682
|
crawlberg::PageAction::ExecuteJs { script } => Self::ExecuteJs {
|
|
6746
6683
|
script: script.to_string(),
|
|
6747
6684
|
},
|