feat: add comprehensive API exploration scripts and update StandingsScraper to map match data to GameMatch models
This commit is contained in:
34
src/main/java/org/example/ChampionshipJorneysTest.java
Normal file
34
src/main/java/org/example/ChampionshipJorneysTest.java
Normal file
@@ -0,0 +1,34 @@
|
||||
package org.example;
|
||||
|
||||
import org.jsoup.Jsoup;
|
||||
import org.jsoup.Connection;
|
||||
|
||||
public class ChampionshipJorneysTest {
|
||||
public static void main(String[] args) {
|
||||
String[] urls = {
|
||||
"https://api.afavcd.pt/championship/1/jorneys",
|
||||
"https://api.afavcd.pt/championship/1/jorneys/1",
|
||||
"https://api.afavcd.pt/championship/3/jorneys",
|
||||
"https://api.afavcd.pt/championship/1/standings"
|
||||
};
|
||||
|
||||
for (String url : urls) {
|
||||
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();
|
||||
System.out.println("Status: " + response.statusCode() + " Length: " + response.body().length());
|
||||
if (response.statusCode() == 200) {
|
||||
System.out.println("Result: " + response.body());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// System.out.println("Failed: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user