Plumb proxy into fetch and scrape (#88)

This commit is contained in:
F0Rextasy authored and GitHub committed 2026-05-13 22:34:02 +02:00
1 parent f2ce18cfb7
commit 9fbd0c73a3
3 files changed
+51 -7

No files matched your search

+5 -1
View File
@@ -47,7 +47,11 @@ async fn main() {
.with_writer(std::io::stderr)
.init();
let context = Arc::new(BrowserContext::new("worker".to_string()));
let proxy = std::env::var("OBSCURA_PROXY")
.ok()
.map(|value| value.trim().to_string())
.filter(|value| !value.is_empty());
let context = Arc::new(BrowserContext::with_options("worker".to_string(), proxy, false));
let mut page = Page::new("page-1".to_string(), context);
let stdin = tokio::io::stdin();