summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzmike <michael.blumenkrantz@gmail.com>2014-12-21 18:20:14 -0500
committerzmike <michael.blumenkrantz@gmail.com>2014-12-21 18:20:14 -0500
commitf3c569f753cb591b78688e8ac55cd652275ac7d3 (patch)
treea8f6863f45bfa6f1639aa3740be680a71a339c61
parent272f25b8b8b08eb8518be45917ab8c7af8048a71 (diff)
update for new lyricwiki html
-rw-r--r--excetra.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/excetra.c b/excetra.c
index a5ab5ec..15fe805 100644
--- a/excetra.c
+++ b/excetra.c
@@ -70,11 +70,22 @@ lyricwiki_parse_lyric(Eina_Strbuf *buf)
70 } 70 }
71 s = eina_strbuf_string_get(buf); 71 s = eina_strbuf_string_get(buf);
72 lyric_start = strstr(s, "phone_right.gif"); 72 lyric_start = strstr(s, "phone_right.gif");
73 if (!lyric_start) goto error; 73 if (lyric_start)
74 lyric_start = strstr(lyric_start, "</div>"); 74 {
75 if (!lyric_start) goto error; 75 lyric_start = strstr(lyric_start, "</div>");
76 if (size - ((lyric_start - s) + sizeof("</div>") - 1) < 10) goto error; 76 if (!lyric_start) goto error;
77 lyric_start += sizeof("</div>") - 1; 77 if (size - ((lyric_start - s) + sizeof("</div>") - 1) < 10) goto error;
78 lyric_start += sizeof("</div>") - 1;
79 }
80 else
81 {
82 lyric_start = strstr(s, "<div class='lyricbox'>");
83 if (!lyric_start) goto error;
84 lyric_start = strstr(lyric_start, "</script>");
85 if (!lyric_start) goto error;
86 if (size - ((lyric_start - s) + sizeof("</script>") - 1) < 10) goto error;
87 lyric_start += sizeof("</script>") - 1;
88 }
78 lyric_end = strstr(lyric_start, "<!--"); 89 lyric_end = strstr(lyric_start, "<!--");
79 if (!lyric_end) goto error; 90 if (!lyric_end) goto error;
80 lyric_end[0] = 0; 91 lyric_end[0] = 0;