summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--www/tscrape/Makefile3
-rw-r--r--www/tscrape/patches/patch-tscrape.c19
2 files changed, 21 insertions, 1 deletions
diff --git a/www/tscrape/Makefile b/www/tscrape/Makefile
index a84c3313a1b..74fbcf38364 100644
--- a/www/tscrape/Makefile
+++ b/www/tscrape/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.5 2020/02/23 20:39:53 leot Exp $
+# $NetBSD: Makefile,v 1.6 2020/03/23 15:06:08 leot Exp $
DISTNAME= tscrape-0.4
+PKGREVISION= 1
CATEGORIES= www
MASTER_SITES= http://codemadness.org/releases/tscrape/
diff --git a/www/tscrape/patches/patch-tscrape.c b/www/tscrape/patches/patch-tscrape.c
new file mode 100644
index 00000000000..48166f06216
--- /dev/null
+++ b/www/tscrape/patches/patch-tscrape.c
@@ -0,0 +1,19 @@
+$NetBSD: patch-tscrape.c,v 1.1 2020/03/23 15:06:08 leot Exp $
+
+Ignore possible consecutive `js-stream-item' when parsing a single tweet.
+
+Backport from upstream commit:
+
+ 426522824e719e081c9c5e47ba8771779b0fdc85
+
+--- tscrape.c.orig 2020-02-23 19:36:28.000000000 +0000
++++ tscrape.c
+@@ -159,6 +159,8 @@ xmltagstartparsed(XMLParser *x, const ch
+ state = 0;
+ } else if (!strcmp(t, "li") &&
+ isclassmatch(classname, STRP("js-stream-item"))) {
++ if (state & Item)
++ return;
+ state |= Item;
+ datatime[0] = text[0] = timestamp[0] = itemfullname[0] = '\0';
+ itemid[0] = itemusername[0] = retweetid[0] = '\0';