Fixed "Could not get list of DLCs!" error in relation to SteamDB
This commit is contained in:
parent
cdcfe02cc4
commit
4fa7d72930
@ -1,5 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="EntryPointsManager">
|
||||
<pattern value="util.env.Default" method="Default" />
|
||||
</component>
|
||||
<component name="MavenProjectsManager">
|
||||
<option name="originalFiles">
|
||||
<list>
|
||||
|
@ -223,6 +223,9 @@ public class Controller {
|
||||
} catch (HttpStatusException e) {
|
||||
if (e.getStatusCode() == 404) {
|
||||
System.err.println("App ID empty or not found! (HTTP Status Code: 404)");
|
||||
} else {
|
||||
// e.printStackTrace();
|
||||
System.err.println("STATUS CODE: " + e.getStatusCode());
|
||||
}
|
||||
cancel();
|
||||
} catch (IOException e) {
|
||||
|
@ -146,6 +146,7 @@ public class SteamAppsListCache {
|
||||
// SteamDB
|
||||
Document steamDbDoc = Jsoup
|
||||
.connect("https://steamdb.info/app/" + appId + "/dlc/")
|
||||
.userAgent("Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0")
|
||||
.get();
|
||||
Element steamDbDlcSection = steamDbDoc.getElementById("dlc");
|
||||
Elements steamDbDLCElements = steamDbDlcSection.getElementsByClass("app");
|
||||
|
Loading…
Reference in New Issue
Block a user