Subpage under development, new version coming soon!
Subject: Sokker Asistente
Thx mate :)
I'm trying to access the API but I'm getting: "401 Unauthorized for https://sokker.org/api/player?filter%5Bteam%5D=5661" :/
I'm trying to access the API but I'm getting: "401 Unauthorized for https://sokker.org/api/player?filter%5Bteam%5D=5661" :/
Hi,
Thanks for this amazing tool Terrion! :)
I have two questions for anyone who could answer:
1. For some reason the factors in my configurations part were set to 0. What settings would you suggest?
2. I got some detailed training graphs of young players I would like to buy (full training history going back 8-15 weeks). Is there any way I could calculate his talent according to SA?
Thank you all
Thanks for this amazing tool Terrion! :)
I have two questions for anyone who could answer:
1. For some reason the factors in my configurations part were set to 0. What settings would you suggest?
2. I got some detailed training graphs of young players I would like to buy (full training history going back 8-15 weeks). Is there any way I could calculate his talent according to SA?
Thank you all
I'm trying to access the API but I'm getting: "401 Unauthorized for https://sokker.org/api/player?filter%5Bteam%5D=5661" :/
Did you log in through API (POST to https://sokker.org/api/auth/login)? I mean, the same thing the browser does when you log in :P
(edited)
Did you log in through API (POST to https://sokker.org/api/auth/login)? I mean, the same thing the browser does when you log in :P
(edited)
I get the login form, fill it and submit it
That URL tells me: 405 Method Not Allowed for https://sokker.org/api/auth/login
I think the destination URL is https://sokker.org/es/app/login/, but it gives me the same 401 error message
(edited)
That URL tells me: 405 Method Not Allowed for https://sokker.org/api/auth/login
I think the destination URL is https://sokker.org/es/app/login/, but it gives me the same 401 error message
(edited)
I still using start PHP with some adjustments on my old code it still works
Cool code :) But it seems the same I'm doing :/
Java code is a bit more ugly :P
URL url = new URL(AsistenteBO.SOKKER_URL + "/es/app/login"); // The other URL fails here
WebRequest requestSettings = new WebRequest(url);
List<NameValuePair> param = new ArrayList<>();
param.add(new NameValuePair("login", login));
param.add(new NameValuePair("password", password));
param.add(new NameValuePair("remember", "false"));
requestSettings.setHttpMethod(HttpMethod.POST);
requestSettings.setRequestParameters(param);
HtmlPage paginaLogin = navegador.getPage(requestSettings);
String json = navegador.getPage(AsistenteBO.SOKKER_URL + "/api/player?filter[team]=" + tid).getWebResponse().getContentAsString(); // Here it fails
(edited)
Java code is a bit more ugly :P
URL url = new URL(AsistenteBO.SOKKER_URL + "/es/app/login"); // The other URL fails here
WebRequest requestSettings = new WebRequest(url);
List<NameValuePair> param = new ArrayList<>();
param.add(new NameValuePair("login", login));
param.add(new NameValuePair("password", password));
param.add(new NameValuePair("remember", "false"));
requestSettings.setHttpMethod(HttpMethod.POST);
requestSettings.setRequestParameters(param);
HtmlPage paginaLogin = navegador.getPage(requestSettings);
String json = navegador.getPage(AsistenteBO.SOKKER_URL + "/api/player?filter[team]=" + tid).getWebResponse().getContentAsString(); // Here it fails
(edited)
Hmm I didn't use the POST method with https://sokker.org/api/auth/login
Now I get:
"Content-Type \u0022application\/x-www-form-urlencoded\u0022 is not expected for Request [post \/auth\/login]"
"FailingHttpStatusCodeException: 400 Bad Request for https://sokker.org/api/auth/login"
(edited)
Now I get:
"Content-Type \u0022application\/x-www-form-urlencoded\u0022 is not expected for Request [post \/auth\/login]"
"FailingHttpStatusCodeException: 400 Bad Request for https://sokker.org/api/auth/login"
(edited)
Does your login really work? Do you get there response 200 and a PHPSESSID cookie?
Now I get "FailingHttpStatusCodeException: 400 Bad Request for https://sokker.org/api/auth/login"
Good, I had the same... until i changed "remember" value type from string to boolean :P
You should be able to see a reason for your 400 in response, I had this:
(edited)
Good, I had the same... until i changed "remember" value type from string to boolean :P
You should be able to see a reason for your 400 in response, I had this:
(edited)
it works for me here is my postman call
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://sokker.org/start.php?session=xml',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('ipassword' => 'password','ilogin' => 'sviktorov'),
CURLOPT_HTTPHEADER => array(
'Cookie: XMLSESSdI; _html_rtl=0; conf=2158441274; hide_promotion=1; lang=en; lang_ID=2'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
response is OK teamID=36246
(edited)
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://sokker.org/start.php?session=xml',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('ipassword' => 'password','ilogin' => 'sviktorov'),
CURLOPT_HTTPHEADER => array(
'Cookie: XMLSESSdI; _html_rtl=0; conf=2158441274; hide_promotion=1; lang=en; lang_ID=2'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
response is OK teamID=36246
(edited)
It works!
I needed to create the json string by myself :P
Thx for your help :)
I needed to create the json string by myself :P
Thx for your help :)
Yeah, that's also a thing I needed to change compared to XML posts, but Python's library creates it automatically if you give it as a "json" argument instead of the usual "data" :P
No problem :)
No problem :)
SETE Mobile: added smooth transition of the tactic when moving the ball