Fix Jianpian img
This commit is contained in:
parent
ce265daf54
commit
fb72cd5e3d
|
|
@ -48,5 +48,5 @@ dependencies {
|
||||||
implementation 'com.google.code.gson:gson:2.13.1'
|
implementation 'com.google.code.gson:gson:2.13.1'
|
||||||
implementation 'com.hierynomus:smbj:0.14.0'
|
implementation 'com.hierynomus:smbj:0.14.0'
|
||||||
implementation 'com.orhanobut:logger:2.2.0'
|
implementation 'com.orhanobut:logger:2.2.0'
|
||||||
implementation 'org.jsoup:jsoup:1.21.1'
|
implementation 'org.jsoup:jsoup:1.21.2'
|
||||||
}
|
}
|
||||||
|
|
@ -30,8 +30,8 @@ public class Search {
|
||||||
return TextUtils.isEmpty(id) ? "" : id;
|
return TextUtils.isEmpty(id) ? "" : id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getThumbnail() {
|
public String getThumbnail(String imgDomain) {
|
||||||
return TextUtils.isEmpty(thumbnail) ? "" : "http://img1.vbwus.com" + thumbnail;
|
return TextUtils.isEmpty(thumbnail) ? "" : "http://" + imgDomain + thumbnail;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getTitle() {
|
public String getTitle() {
|
||||||
|
|
@ -42,8 +42,8 @@ public class Search {
|
||||||
return TextUtils.isEmpty(mask) ? "" : mask;
|
return TextUtils.isEmpty(mask) ? "" : mask;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Vod vod() {
|
public Vod vod(String imgDomain) {
|
||||||
return new Vod(getId(), getTitle(), getThumbnail(), getMask());
|
return new Vod(getId(), getTitle(), getThumbnail(imgDomain), getMask());
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Search> getData() {
|
public List<Search> getData() {
|
||||||
|
|
|
||||||
|
|
@ -122,7 +122,7 @@ public class Jianpian extends Spider {
|
||||||
List<Vod> list = new ArrayList<>();
|
List<Vod> list = new ArrayList<>();
|
||||||
String url = siteUrl + String.format("/api/v2/search/videoV2?key=%s&category_id=88&page=%s&pageSize=20", URLEncoder.encode(key), pg);
|
String url = siteUrl + String.format("/api/v2/search/videoV2?key=%s&category_id=88&page=%s&pageSize=20", URLEncoder.encode(key), pg);
|
||||||
Search search = Search.objectFrom(OkHttp.string(url, getHeader()));
|
Search search = Search.objectFrom(OkHttp.string(url, getHeader()));
|
||||||
for (Search data : search.getData()) list.add(data.vod());
|
for (Search data : search.getData()) list.add(data.vod(imgDomain));
|
||||||
return Result.string(list);
|
return Result.string(list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Binary file not shown.
|
|
@ -1 +1 @@
|
||||||
07e6df236f80317ba92f601c9715fc40
|
b11a2ce9eb2bbe268343edf57810f558
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue