ignore possible consecutive `js-stream-item' when parsing a single tweet - tscr… | |
git clone git://git.codemadness.org/tscrape | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 426522824e719e081c9c5e47ba8771779b0fdc85 | |
parent 6654f1b01d68e2b2ff7aa660cd678c1cba4d062f | |
Author: Leonardo Taccari <[email protected]> | |
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(-) | |
--- | |
diff --git a/tscrape.c b/tscrape.c | |
@@ -159,6 +159,8 @@ xmltagstartparsed(XMLParser *x, const char *t, size_t tl, i… | |
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'; |