ignore possible consecutive `js-stream-item' when parsing a single tweet - tscrape - twitter scraper
(HTM) git clone git://git.codemadness.org/tscrape
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 426522824e719e081c9c5e47ba8771779b0fdc85
(DIR) parent 6654f1b01d68e2b2ff7aa660cd678c1cba4d062f
(HTM) Author: Leonardo Taccari <iamleot@gmail.com>
Date: Thu, 19 Mar 2020 23:52:19 +0100
ignore possible consecutive `js-stream-item' when parsing a single tweet
Diffstat:
M tscrape.c | 2 ++
1 file changed, 2 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/tscrape.c b/tscrape.c
@@ -159,6 +159,8 @@ xmltagstartparsed(XMLParser *x, const char *t, size_t tl, int isshort)
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';