New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ARD: Fix für Untertitel-URLs #366
Conversation
@@ -189,7 +190,7 @@ private String determineHdFromNormal(final String urlNormal) { | |||
} | |||
|
|||
private void filmSuchen_old(final String urlSendung, final String thema, final String titel, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -304,11 +305,11 @@ private void filmSuchen1(final String strUrlFeed, final String thema, final bool | |||
} | |||
|
|||
private void filmSuchen2(final String urlFilm_, final String thema, final String titel, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private void addThema() { | ||
listeThemen.clear(); | ||
MSStringBuilder seite = new MSStringBuilder(Const.STRING_BUFFER_START_BUFFER); | ||
meldungStart(); | ||
final GetUrl getUrlIo = new GetUrl(getWartenSeiteLaden()); | ||
seite = getUrlIo.getUri(SENDERNAME, ADRESSE_THEMA, StandardCharsets.UTF_8, 5 /* versuche */, | ||
seite, "" /* Meldung */); | ||
seite, "" /* Meldung */); | ||
if (seite.length() == 0) { | ||
Log.sysLog("ARD: Versuch 2"); | ||
warten(2 * 60 /* Sekunden */); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -276,7 +277,7 @@ private void filmSuchen1(final String strUrlFeed, final String thema, final bool | |||
filmSuchen2(url, thema, titel, d, datum, zeit, urlSendung); | |||
} | |||
if (!Config.getStop() && weiter | |||
&& (CrawlerTool.loadLongMax() || thema.equalsIgnoreCase("alpha-Centauri"))) { | |||
&& (CrawlerTool.loadLongMax() || thema.equalsIgnoreCase("alpha-Centauri"))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -235,7 +236,7 @@ private void filmSuchen1(final String strUrlFeed, final String thema, final bool | |||
while (!Config.getStop() && (pos = seite1.indexOf(MUSTER_FILM_SUCHEN1, pos)) != -1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -105,7 +106,7 @@ private void addTage() { | |||
thema = thema.substring(0, thema.indexOf(',')); | |||
} | |||
datum = seite1 | |||
.extract("<title>Videos (TV-Sendungen) des Senders Das Erste vom", "- ARD").trim(); | |||
.extract("<title>Videos (TV-Sendungen) des Senders Das Erste vom", "- ARD").trim(); | |||
titel = seite1.extract("<h4 class=\"headline\">", "<", pos); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SonarQube analysis reported 46 issues Watch the comments in this conversation to review them. Top 10 extra issuesNote: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:
|
@@ -105,7 +106,7 @@ private void addTage() { | |||
thema = thema.substring(0, thema.indexOf(',')); | |||
} | |||
datum = seite1 | |||
.extract("<title>Videos (TV-Sendungen) des Senders Das Erste vom", "- ARD").trim(); | |||
.extract("<title>Videos (TV-Sendungen) des Senders Das Erste vom", "- ARD").trim(); | |||
titel = seite1.extract("<h4 class=\"headline\">", "<", pos); | |||
dauer = seite1.extract("<p class=\"subtitle\">", "<", pos); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -379,8 +380,8 @@ private void filmSuchen2(final String urlFilm_, final String thema, final String | |||
} | |||
String subtitle = seite2.extract("subtitleUrl\":\"", "\""); | |||
if (!subtitle.isEmpty()) { | |||
if (!subtitle.startsWith("http://www.ardmediathek.de")) { | |||
subtitle = "http://www.ardmediathek.de" + subtitle; | |||
if (!subtitle.startsWith("http")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes #365