Adding a fetch from skytorrents
This commit is contained in:
parent
e7197b4a5d
commit
fd0a1079c4
|
@ -20,12 +20,25 @@ fn main() {
|
|||
}
|
||||
|
||||
fn skytorrents() {
|
||||
|
||||
let base_url = "https://www.skytorrents.lol";
|
||||
|
||||
let mut pages: Vec<String> = Vec::new();
|
||||
|
||||
for i in 1..20 {
|
||||
let page = format!("{}{}", "https://www.skytorrents.lol/top100?page=", i);
|
||||
let page = format!("{}/top100?page={}", base_url, i);
|
||||
pages.push(page);
|
||||
}
|
||||
|
||||
let types = ["video", "audio", "games", "software", "doc", "ebook", "yify", "epub"];
|
||||
for c_type in types.iter() {
|
||||
for i in 1..20 {
|
||||
let page = format!("{}/top100?type={}&page={}", base_url, c_type, i);
|
||||
pages.push(page);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for page in pages.iter() {
|
||||
println!("Fetching page {}", page);
|
||||
let html = fetch_html(page);
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
pushd ../new_torrents_fetcher
|
||||
cargo run
|
||||
cat tmp_adds.csv >> ../torrents.csv
|
||||
rm tmp_adds.csv
|
||||
#rm tmp_adds.csv
|
||||
popd
|
||||
. prune.sh
|
||||
|
|
Loading…
Reference in New Issue