Sleep 2sec when fetching reddit pages
This commit is contained in:
parent
e253c87ba3
commit
afb7236db9
@ -96,6 +96,13 @@ public class RedditRipper extends AlbumRipper {
|
|||||||
nextURL = new URL(nextURLString);
|
nextURL = new URL(nextURLString);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Wait to avoid rate-limiting against reddit's API
|
||||||
|
try {
|
||||||
|
Thread.sleep(2000);
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
logger.warn("Interrupted while sleeping", e);
|
||||||
|
}
|
||||||
return nextURL;
|
return nextURL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user