tscrape

twitter scraper
git clone git://git.codemadness.org/tscrape
Log | Files | Refs | README | LICENSE

commit 7a70a71cc130ad9b1e0d2f95dbf5a4eb591f55c1
parent 21f2194359d8f863c8c3a3a77c48b2507c03f924
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sat, 12 Aug 2017 12:28:01 +0200

only print tweet if it has a text and username

Diffstat:
Mtscrape.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tscrape.c b/tscrape.c @@ -185,7 +185,8 @@ xmltagstartparsed(XMLParser *x, const char *t, size_t tl, int isshort) if (state & (Item | Stream | Header)) state |= Text; } else if (!strcmp(t, "div") && isclassmatch(v, STRP("stream-item-footer"))) { - printtweet(); + if (text[0] && username[0]) + printtweet(); state = 0; } else if (!strcmp(t, "li") && isclassmatch(v, STRP("js-stream-item"))) { state |= Item;