Introduction
Introduction Statistics Contact Development Disclaimer Help
v -> c for classname shorthand - tscrape - twitter scraper
git clone git://git.codemadness.org/tscrape
Log
Files
Refs
README
LICENSE
---
commit 006a11c3aced38fa2cc3915793c1b9e886d0ad41
parent c94c9c1f8d1ac27670bbd0faf5481e544af50e25
Author: Hiltjo Posthuma <[email protected]>
Date: Fri, 25 Aug 2017 17:39:02 +0200
v -> c for classname shorthand
Diffstat:
M tscrape.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/tscrape.c b/tscrape.c
@@ -109,29 +109,29 @@ xmltagstart(XMLParser *x, const char *t, size_t tl)
static void
xmltagstartparsed(XMLParser *x, const char *t, size_t tl, int isshort)
{
- const char *v = classname;
+ const char *c = classname;
- if (!strcmp(t, "p") && isclassmatch(v, STRP("js-tweet-text"))) {
+ if (!strcmp(t, "p") && isclassmatch(c, STRP("js-tweet-text"))) {
if (state & (Item | Stream | Header))
state |= Text;
- } else if (!strcmp(t, "div") && isclassmatch(v, STRP("stream-item-foot…
+ } else if (!strcmp(t, "div") && isclassmatch(c, STRP("stream-item-foot…
if (text[0] && username[0])
printtweet();
state = 0;
- } else if (!strcmp(t, "li") && isclassmatch(v, STRP("js-stream-item"))…
+ } else if (!strcmp(t, "li") && isclassmatch(c, STRP("js-stream-item"))…
state |= Item;
datatime[0] = text[0] = timestamp[0] = itemfullname[0] = '\0';
itemid[0] = itemusername[0] = retweetid[0] = '\0';
ispinned = 0;
- if (isclassmatch(v, STRP("js-pinned")))
+ if (isclassmatch(c, STRP("js-pinned")))
ispinned = 1;
} else if (state & Item) {
- if (!strcmp(t, "div") && isclassmatch(v, STRP("js-stream-tweet…
+ if (!strcmp(t, "div") && isclassmatch(c, STRP("js-stream-tweet…
state &= ~(Text|Header);
state |= Stream;
- } else if (!strcmp(t, "a") && isclassmatch(v, STRP("js-action-…
+ } else if (!strcmp(t, "a") && isclassmatch(c, STRP("js-action-…
state |= Header;
- } else if (!strcmp(t, "span") && isclassmatch(v, STRP("js-shor…
+ } else if (!strcmp(t, "span") && isclassmatch(c, STRP("js-shor…
state |= Timestamp;
strlcpy(timestamp, datatime, sizeof(timestamp));
datatime[0] = '\0';
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.