rm code thats not needed anymore and a debug/test comment - tscrape - twitter scraper
(HTM) git clone git://git.codemadness.org/tscrape
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 5ca572b963ed7b64485d016eec950ca3a646d107
(DIR) parent 86910f72369e655ce2db017e64646def543627b9
(HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 6 Jun 2020 12:47:51 +0200
rm code thats not needed anymore and a debug/test comment
Diffstat:
M tscrape.c | 19 +------------------
1 file changed, 1 insertion(+), 18 deletions(-)
---
(DIR) diff --git a/tscrape.c b/tscrape.c
@@ -47,21 +47,6 @@ static char expanded_url[1024], media_url[1024], url[256];
static char pinnedids[MAX_PINNED][64];
static size_t npinned;
-#if 0
-/* convert XML and some HTML entities */
-static int
-html_entitytostr(const char *s, char *buf, size_t bufsiz)
-{
- int len;
-
- if ((len = xml_entitytostr(s, buf, bufsiz)) > 0)
- return len;
- else if (!strcmp(s, " "))
- return (ssize_t)strlcpy(buf, " ", bufsiz);
- return len;
-}
-#endif
-
long long
datetounix(long long year, int mon, int day, int hour, int min, int sec)
{
@@ -251,9 +236,8 @@ addurl(const char *url, const char *expanded_url)
struct url *u;
for (u = urls; u; u = u->next) {
- if (!strncmp(url, u->url, u->url_len)) {
+ if (!strncmp(url, u->url, u->url_len))
return;
- }
}
if (!(u = calloc(1, sizeof(*u))))
@@ -470,7 +454,6 @@ main(void)
if (parsejson(processnodes))
errx(2, "invalid JSON");
- // TODO: TEST: make sure the last tweet is printed too (addtweet() logic).
for (t = tweets; t; t = t->next) {
/* check for pinned tweets */
for (i = 0; i < npinned; i++) {