0

изменен алгоритм выдачи url в Kino

This commit is contained in:
2017-01-15 12:14:15 +03:00
parent 362a421284
commit 742a117532
3 changed files with 4 additions and 5 deletions

View File

@@ -22,7 +22,7 @@ public class Kino {
} }
public String getUrl() { public String getUrl() {
return url; return kinowarez.getDomain() + url;
} }
public KinoWarez getKinowarez() { public KinoWarez getKinowarez() {
@@ -30,7 +30,6 @@ public class Kino {
} }
public String getPlayerUrl() { public String getPlayerUrl() {
String path = url.substring(kinowarez.getDomain().length()); return kinowarez.getName().toLowerCase() + url;
return kinowarez.getName().toLowerCase() + path;
} }
} }

View File

@@ -63,7 +63,7 @@ public class Onlinelife implements KinoWarez {
for (Element element : elements) { for (Element element : elements) {
Element childElement = element.child(0); Element childElement = element.child(0);
String name = childElement.text(); String name = childElement.text();
String url = childElement.attr("href"); String url = childElement.attr("href").substring(DOMAIN.length());
if (strong) { if (strong) {
Matcher matcher = pattern.matcher(name.toLowerCase()); Matcher matcher = pattern.matcher(name.toLowerCase());

View File

@@ -60,7 +60,7 @@ public class Seasonvar implements KinoWarez {
for (int i = 0; i < suggestions.size(); i++) { for (int i = 0; i < suggestions.size(); i++) {
outList.add(new Kino( outList.add(new Kino(
suggestions.get(i).getAsString(), suggestions.get(i).getAsString(),
DOMAIN + "/" + data.get(i).getAsString(), "/" + data.get(i).getAsString(),
this this
)); ));
} }