Skip to content

Commit

Permalink
Hotfix substitutes
Browse files Browse the repository at this point in the history
  • Loading branch information
PAException committed Jan 17, 2024
1 parent 5e9b3e0 commit adc7130
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

import java.io.IOException;
import java.sql.Date;
import java.text.ParseException;
Expand Down Expand Up @@ -95,7 +96,10 @@ public void updateSubstitutes() {
}

for (int week : weeks.keySet()) { //Iterate weeks
String requestUrl = "https://engelsburg.smmp.de/vertretungsplaene/eng/Stp_Upload/" + week + "/w/w00000.htm";

String convertedWeek = String.valueOf(week);
if (convertedWeek.length() == 1) convertedWeek = "0" + convertedWeek;
String requestUrl = "https://engelsburg.smmp.de/vertretungsplaene/eng/Stp_Upload/" + convertedWeek + "/w/w00000.htm";
//e.g.
// 1 <div id="vertretung">
// 2 <a name="1">&nbsp;</a>
Expand Down

0 comments on commit adc7130

Please sign in to comment.