9 |
|
|
10 |
public String fechTitle(String sid, int season, int episode) throws Exception { |
public String fechTitle(String sid, int season, int episode) throws Exception { |
11 |
|
|
12 |
String epMatch = "Ep" + episode; |
final String epMatch = "Ep" + episode; |
13 |
|
final String noTitle = "Episode #" + season + "." + episode; |
14 |
|
|
15 |
String url = "http://www.imdb.com/title/" + sid + "/episodes?season=" + season; |
String url = "http://www.imdb.com/title/" + sid + "/episodes?season=" + season; |
16 |
|
|
32 |
String content = anchor.text().trim(); |
String content = anchor.text().trim(); |
33 |
|
|
34 |
if ( content.endsWith(epMatch)) { |
if ( content.endsWith(epMatch)) { |
35 |
|
if (title.equalsIgnoreCase(noTitle)) { |
36 |
|
return "!Title not found!"; |
37 |
|
} |
38 |
|
|
39 |
return title; |
return title; |
40 |
} |
} |
41 |
} |
} |