Fix Streamate search URL
This commit is contained in:
parent
d58a8c1d06
commit
51c1a82f1d
|
@ -1,10 +1,13 @@
|
|||
package ctbrec.sites.streamate;
|
||||
|
||||
import static ctbrec.io.HttpConstants.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
|
@ -141,8 +144,18 @@ public class Streamate extends AbstractSite {
|
|||
|
||||
@Override
|
||||
public List<Model> search(String q) throws IOException, InterruptedException {
|
||||
String url = BASE_URL + "/api/search/autocomplete?exact=false&skin_search_kids=0&results_per_page=10&query=" + URLEncoder.encode(q, "utf-8");
|
||||
Request req = httpClient.newRequestBuilder().url(url).build();
|
||||
String url = NAIAD_URL + "/autocomplete?filters=gender:&performerCount=10&domain=streamate.com&tagCount=5&query=" + URLEncoder.encode(q, "utf-8");
|
||||
LOG.debug("Search: {}", url);
|
||||
String saKey = httpClient.getSaKey();
|
||||
Request req = httpClient.newRequestBuilder()
|
||||
.url(url)
|
||||
.header(ORIGIN, getBaseUrl())
|
||||
.header("sakey", saKey)
|
||||
.header("platform", "SCP")
|
||||
.header("smtid", UUID.randomUUID().toString() + "G0211569057409")
|
||||
.header("smeid", UUID.randomUUID().toString() + "G0211569057409")
|
||||
.header("smvid", UUID.randomUUID().toString() + "G0211569057409")
|
||||
.build();
|
||||
try (Response response = getHttpClient().execute(req)) {
|
||||
if (response.isSuccessful()) {
|
||||
String body = response.body().string();
|
||||
|
|
Loading…
Reference in New Issue