YAMJ / yamj-v2

Yet Another Movie Jukebox (YAMJ) v2
GNU General Public License v3.0
28 stars 11 forks source link

filmaffinityplugin is outdated and fails #2637

Closed Omertron closed 9 years ago

Omertron commented 9 years ago

Original issue 2638 created by Omertron on 2013-04-11T22:14:48.000Z:

What steps will reproduce the problem? 1.Configure plugin to filmafffinityplugin 2.Run yamj

What is the expected output? What do you see instead? The expected information of movies in Spanish, but can not get the information on films

What version/revision of YAMJ are you using? On what operating system? I'm using the latest version of the repository

What skin are you using? N/A

What device are you using YAMJ on? Networked Media Tank, PlayonHD, Other? NMT

Please provide any additional information below.

The page has changed and can not correctly parse the page

I pass a few things I've seen and I could change, but not if it is 100% correct or need something more


/moviejukebox/yamj/src/main/java/com/moviejukebox/plugin/FilmAffinityInfo.java

Line 55 - private Pattern linkPattern = Pattern.compile("<a class="mc-title" href="/es/(film[0-9]{6}.html)">([^<]+)</a>");


/moviejukebox/yamj/src/main/java/com/moviejukebox/plugin/FilmaffinityPlugin.java

Line 48 - private static final String FA_ORIGINAL_TITLE = "<dt>T&iacute;tulo original</dt>"; private static final String FA_YEAR = "<dt>A&ntilde;o</dt>"; private static final String FA_RUNTIME = "<dt>Duraci&nacute;n</dt>"; private static final String FA_DIRECTOR = "<dt>Director</dt>"; private static final String FA_WRITER = "<dt>Gui&oacute;n</dt>"; private static final String FA_CAST = "<dt>Reparto</dt>"; private static final String FA_GENRE = "<dt>G&eacute;neros</dt>"; private static final String FA_COMPANY = "<dt>Productora</dt>"; private static final String FA_PLOT = "<dt>Sinopsis</dt>";

Line 111 - String spanishTitle = HTMLTools.getTextAfterElem(xml, "<h1 id="main-title"><a href="/es/" + filmAffinityId + "">").replaceAll("\s{2,}", " ");

Line 142 - List<String> newDirectors = Arrays.asList(HTMLTools.removeHtmlTags(HTMLTools.extractTag(xml, FA_DIRECTOR, "</a></dd>")).split(","));

Line 160 - List<String> newActors = Arrays.asList(HTMLTools.removeHtmlTags(HTMLTools.extractTag(xml, FA_CAST, "</a></td>")).split(","));

Line 166 - movie.setCompany(HTMLTools.getTextAfterElem(xml, FA_COMPANY).split("/")[0].trim(), FilmAffinityInfo.FILMAFFINITY_PLUGIN_ID);

Line 171 - for (String genre : HTMLTools.removeHtmlTags(HTMLTools.extractTag(xml, FA_GENRE, "</td>")).split(".||")) {

Line 178 - movie.addRating(FilmAffinityInfo.FILMAFFINITY_PLUGIN_ID, (int) (Float.parseFloat(HTMLTools.extractTag(xml, "<td align="center" style="color:# 990000; font-size:22px; font-weight: bold;">", "</td>").replace(",", ".")) * 10));

Omertron commented 9 years ago

Comment #1 originally posted by Omertron on 2013-04-20T08:02:31.000Z:

<empty>