feat: add comprehensive API exploration scripts and update StandingsScraper to map match data to GameMatch models
This commit is contained in:
26
src/main/java/org/example/TestAthleteJson.java
Normal file
26
src/main/java/org/example/TestAthleteJson.java
Normal file
@@ -0,0 +1,26 @@
|
||||
package org.example;
|
||||
|
||||
import org.jsoup.Jsoup;
|
||||
import org.jsoup.Connection;
|
||||
|
||||
public class TestAthleteJson {
|
||||
public static void main(String[] args) {
|
||||
// Club ID 1 (Arvore) and Modality 1 (Senior)
|
||||
String url = "https://api.afavcd.pt/teams/1/modality/1/season/33";
|
||||
System.out.println("Testing: " + url);
|
||||
try {
|
||||
Connection.Response response = Jsoup.connect(url)
|
||||
.ignoreContentType(true)
|
||||
.userAgent("Mozilla/5.0 (Windows NT 10.0; Win64; x64)")
|
||||
.header("Referer", "https://www.afavcd.pt/")
|
||||
.header("Origin", "https://www.afavcd.pt")
|
||||
.method(Connection.Method.GET)
|
||||
.execute();
|
||||
if (response.statusCode() == 200) {
|
||||
System.out.println("Result: " + response.body().substring(0, Math.min(response.body().length(), 2000)));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
System.out.println("Failed: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user