feat: update charity project assets, add livestream media, and clean up temporary migration scripts
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import java.io.InputStream;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.util.Scanner;
|
||||
|
||||
public class CheckRender {
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
URL url = new URL("http://localhost:8080/");
|
||||
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
|
||||
conn.setRequestMethod("GET");
|
||||
conn.connect();
|
||||
if (conn.getResponseCode() == 200) {
|
||||
InputStream is = conn.getInputStream();
|
||||
Scanner scanner = new Scanner(is, "UTF-8").useDelimiter("\\A");
|
||||
String html = scanner.hasNext() ? scanner.next() : "";
|
||||
|
||||
int idx = html.indexOf("news-card__image");
|
||||
if (idx != -1) {
|
||||
System.out.println(html.substring(idx, Math.min(idx + 300, html.length())));
|
||||
} else {
|
||||
System.out.println("Could not find news-card__image in HTML");
|
||||
}
|
||||
} else {
|
||||
System.out.println("HTTP " + conn.getResponseCode());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user