diff --git a/pom.xml b/pom.xml index 9e6dccf0..b0878842 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.rarchives.ripme ripme jar - 1.0.75 + 1.0.76 ripme http://rip.rarchives.com diff --git a/src/main/java/com/rarchives/ripme/ripper/rippers/TapasticRipper.java b/src/main/java/com/rarchives/ripme/ripper/rippers/TapasticRipper.java index 0fcc0aa6..e6756307 100644 --- a/src/main/java/com/rarchives/ripme/ripper/rippers/TapasticRipper.java +++ b/src/main/java/com/rarchives/ripme/ripper/rippers/TapasticRipper.java @@ -11,31 +11,20 @@ import java.util.regex.Pattern; import org.json.JSONArray; import org.json.JSONObject; import org.jsoup.nodes.Document; -import org.jsoup.nodes.Element; import org.jsoup.select.Elements; import com.rarchives.ripme.ripper.AbstractHTMLRipper; import com.rarchives.ripme.utils.Http; +import com.rarchives.ripme.utils.Utils; class TapasticEpisode { - int index; - int id; - String title; - String filename; + protected int index, id; + protected String title, filename; public TapasticEpisode(int index, int id, String title) { - this.index=index; - this.id=id; - this.title=title; - this.filename=title // Windows filenames may not contain any of these... - .replace("\\", "") - .replace("/", "") - .replace(":", "") - .replace("*", "") - .replace("?", "") - .replace("\"", "") - .replace("<", "") - .replace(">", "") - .replace("|", ""); + this.index = index; + this.id = id; + this.title = title; + this.filename = Utils.filesystemSafe(title); } } @@ -65,25 +54,18 @@ public class TapasticRipper extends AbstractHTMLRipper { @Override public List getURLsFromPage(Document page) { List urls = new ArrayList(); - Elements scripts=page.select("script"); - for(Element script: scripts) { - String text=script.data(); - if(text.contains("var _data")) { - String[] lines=text.split("\n"); - for(String line:lines) { - String trimmed=line.trim(); - if(trimmed.startsWith("episodeList : ")) { - JSONArray json_episodes=new JSONArray(trimmed.substring("episodeList : ".length())); - for(int i=0;i