pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/www/tscrape



Module Name:    pkgsrc
Committed By:   leot
Date:           Mon Mar 23 15:06:08 UTC 2020

Modified Files:
        pkgsrc/www/tscrape: Makefile
Added Files:
        pkgsrc/www/tscrape/patches: patch-tscrape.c

Log Message:
tscrape: Backport upstream patch to fetch tweet with multiple js-stream-item

Previously, without that patch, some tweets were accidentally not parsed.

PKGREVISION++


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 pkgsrc/www/tscrape/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/www/tscrape/patches/patch-tscrape.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/www/tscrape/Makefile
diff -u pkgsrc/www/tscrape/Makefile:1.5 pkgsrc/www/tscrape/Makefile:1.6
--- pkgsrc/www/tscrape/Makefile:1.5     Sun Feb 23 20:39:53 2020
+++ pkgsrc/www/tscrape/Makefile Mon Mar 23 15:06:08 2020
@@ -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/
 

Added files:

Index: pkgsrc/www/tscrape/patches/patch-tscrape.c
diff -u /dev/null pkgsrc/www/tscrape/patches/patch-tscrape.c:1.1
--- /dev/null   Mon Mar 23 15:06:08 2020
+++ pkgsrc/www/tscrape/patches/patch-tscrape.c  Mon Mar 23 15:06:08 2020
@@ -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';



Home | Main Index | Thread Index | Old Index