()
| 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<>(); |
no test coverage detected