1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-08-22 21:43:06 +02:00

Documented normalizeUrl

cyian-1756
2018-03-10 20:18:34 -05:00
parent 939ce7bfbc
commit 2808185f9e

@@ -126,6 +126,24 @@ Throws: `IOException` if no next page can be retrieved.
--- ---
#### String normalizeUrl(String url)
Returns: The url that will be either written to or checked against the url history
This function normalizes a url so that non-static urls can be used with the url history file
Here is an example removing the time stamp ID from instagram links
```java
@Override
public String normalizeUrl(String url) {
// Remove the date sig from the url
return url.replaceAll("/[A-Z0-9]{8}/", "/");
}
```
---
#### List<String> getURLsFromPage(Document) #### List<String> getURLsFromPage(Document)
Input: Jsoup `Document` retrieved in the `getFirstPage()` method (and optionally the `getNextPage()` method). Input: Jsoup `Document` retrieved in the `getFirstPage()` method (and optionally the `getNextPage()` method).