Azərbaycan dili Bahasa Indonesia Bosanski Català Čeština Dansk Deutsch Eesti English Español Français Galego Hrvatski Italiano Latviešu Lietuvių Magyar Malti Mакедонски Nederlands Norsk Polski Português Português BR Românã Slovenčina Srpski Suomi Svenska Tiếng Việt Türkçe Ελληνικά Български Русский Українська Հայերեն ქართული ენა 中文
Subpage under development, new version coming soon!

Asunto: Sokker Asistente

2023-02-05 12:56:53
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" :/
2023-02-05 13:36:38
ufhcs para Terrion
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
2023-02-05 14:02:37
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
(editado)
2023-02-05 16:33:55
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
(editado)
2023-02-05 18:01:52
I still using start PHP with some adjustments on my old code it still works
2023-02-05 18:34:02
Works for me

2023-02-05 19:04:33
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
(editado)
2023-02-05 19:16:03
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"
(editado)
2023-02-05 19:16:10
Does your login really work? Do you get there response 200 and a PHPSESSID cookie?
2023-02-05 19:17:04
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:

(editado)
2023-02-05 19:43:32
What kind of sorcery is this?
2023-02-05 20:05:54
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
(editado)
2023-02-05 20:15:39
It works!

I needed to create the json string by myself :P

Thx for your help :)
2023-02-05 21:35:24
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 :)
2023-02-06 14:15:38
SETE Mobile: added smooth transition of the tactic when moving the ball
2023-02-06 14:56:33
Mensaje borrado