Пример #1
0
 @Override
 protected String parse(String url, BufferedReader reader, Strip strip) throws IOException {
   String date = url.replace("http://www.blondie.com/strip.php?comic=", "");
   String[] time = date.split("-");
   int year = Integer.parseInt(time[0]);
   int month = Integer.parseInt(time[1]);
   int day = Integer.parseInt(time[2]);
   String surl = String.format("http://www.blondie.com/dailies/%d/%d/%d.jpg", year, month, day);
   strip.setTitle("Blondie: " + date);
   strip.setText("-NA-");
   return surl;
 }
Пример #2
0
  @Override
  protected String parse(String url, BufferedReader reader, Strip strip) throws IOException {

    // Get Title and URL
    String str;
    String final_title = null;
    String final_url = null;
    while ((str = reader.readLine()) != null) {
      int index1 = str.indexOf("Unshelved strip for");
      if (index1 != -1) {
        final_title = str;
        final_url = str;
      }
    }
    final_url = final_url.replaceAll(".*src=\"", "");
    final_url = final_url.replaceAll("\".*", "");
    final_title = final_title.replaceAll(".*.for\\s", "");
    final_title = final_title.replaceAll("\".*", "");
    strip.setTitle("Unshelved: " + final_title);
    strip.setText("-NA-");
    return final_url;
  }