Adding a fetch from skytorrents

This commit is contained in:
Dessalines 2018-10-11 21:13:04 -07:00
parent e7197b4a5d
commit fd0a1079c4
2 changed files with 15 additions and 2 deletions

View File

@ -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);

View File

@ -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