MCPcopy Create free account
hub / github.com/RipMeApp/ripme / defaultSettings

Method defaultSettings

src/main/java/com/rarchives/ripme/utils/Http.java:61–74  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

59 }
60
61 private void defaultSettings() {
62 this.retries = Utils.getConfigInteger("download.retries", 3);
63 this.retrySleep = Utils.getConfigInteger("download.retry.sleep", 5000);
64 connection = Jsoup.connect(this.url);
65 connection.userAgent(AbstractRipper.USER_AGENT);
66 connection.method(Method.GET);
67 connection.timeout(TIMEOUT);
68 connection.maxBodySize(0);
69
70 // Extract cookies from config entry:
71 // Example config entry:
72 // cookies.reddit.com = reddit_session=<value>; other_cookie=<value>
73 connection.cookies(cookiesForURL(this.url));
74 }
75
76 private Map<String, String> cookiesForURL(String u) {
77 Map<String, String> cookiesParsed = new HashMap<>();

Callers 1

HttpMethod · 0.95

Calls 6

getConfigIntegerMethod · 0.95
cookiesForURLMethod · 0.95
userAgentMethod · 0.80
methodMethod · 0.80
timeoutMethod · 0.80
cookiesMethod · 0.80

Tested by

no test coverage detected