Jelajahi Sumber

using local file for testing

jmelesky 7 tahun lalu
induk
melakukan
fa35a0fa97
2 mengubah file dengan 20 tambahan dan 3 penghapusan
  1. 14 0
      assets/feats.html
  2. 6 3
      src/main.rs

File diff ditekan karena terlalu besar
+ 14 - 0
assets/feats.html


+ 6 - 3
src/main.rs

@@ -11,10 +11,13 @@ fn main() {
 
 fn scrape_feats(url: &str) {
 
-    let resp = reqwest::get(url).unwrap();
-    assert!(resp.status().is_success());
+    // commenting out -- going local for a bit
+    //let resp = reqwest::get(url).unwrap();
+    //assert!(resp.status().is_success());
 
-    let doc = Document::from_read(resp).unwrap();
+    //let doc = Document::from_read(resp).unwrap();
+
+    let doc = Document::from(include_str!("/home/jmelesky/code/featscraper/assets/feats.html"));
 
     let mut header = true;
     for node in doc.find(Name("tr")) {

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini