Introduction
Introduction Statistics Contact Development Disclaimer Help
tscrape: remove debugging comments - tscrape - twitter scraper
git clone git://git.codemadness.org/tscrape
Log
Files
Refs
README
LICENSE
---
commit cdfc383b166a112646ab21596442d8fb976bc311
parent acef6f3969b21a48512c389febf2e6ca9089ebfc
Author: Hiltjo Posthuma <[email protected]>
Date: Thu, 1 Oct 2020 20:22:18 +0200
tscrape: remove debugging comments
Diffstat:
M tscrape.c | 19 -------------------
1 file changed, 0 insertions(+), 19 deletions(-)
---
diff --git a/tscrape.c b/tscrape.c
@@ -296,11 +296,9 @@ processnodes(struct json_node *nodes, size_t depth, const …
nodes[3].type == JSON_TYPE_STRING &&
!strcmp(nodes[2].name, "retweeted_status")) {
if (!strcmp(nodes[3].name, "id_str")) {
-// printf("DEBUG: retweet: id: %s\n", str);
strlcpy(tc->retweetid, str, sizeof(tc->retweet…
} else if (!strcmp(nodes[3].name, "full_text")) {
strlcpy(tc->full_text, str, sizeof(tc->full_te…
-// printf("DEBUG: retweet: full_text: %s\n", st…
}
}
@@ -314,10 +312,8 @@ processnodes(struct json_node *nodes, size_t depth, const …
!strcmp(nodes[3].name, "user")) {
if (!strcmp(nodes[4].name, "name")) {
strlcpy(tc->itemfullname, str, sizeof(tc->item…
-// printf("DEBUG: retweeted_status.user.name: %…
} else if (!strcmp(nodes[4].name, "screen_name")) {
strlcpy(tc->itemusername, str, sizeof(tc->item…
-// printf("DEBUG: retweeted_status.user.screen_…
}
}
}
@@ -331,8 +327,6 @@ processnodes(struct json_node *nodes, size_t depth, const c…
!strcmp(nodes[3].name, "pinned_tweet_ids")) {
if (nodes[4].type == JSON_TYPE_NUMBER) {
addpinned(str);
-// printf("DEBUG: pinned_tweets_ids[%zu]: %s\n",
-// nodes[4].index, str);
}
}
}
@@ -347,10 +341,8 @@ processnodes(struct json_node *nodes, size_t depth, const …
!strcmp(nodes[2].name, "entities") &&
!strcmp(nodes[3].name, "urls")) {
if (!strcmp(nodes[5].name, "url")) {
-// printf("DEBUG: url: %s\n", str);
strlcpy(url, str, sizeof(url));
} else if (!strcmp(nodes[5].name, "expanded_url")) {
-// printf("DEBUG: expanded_url: %s\n", str);
/* assumes "expanded_url" is specified after "url" */
addreplacement(url, str);
url[0] = '\0';
@@ -368,16 +360,12 @@ processnodes(struct json_node *nodes, size_t depth, const…
!strcmp(nodes[2].name, "extended_entities") &&
!strcmp(nodes[3].name, "media")) {
if (!strcmp(nodes[5].name, "media_url_https")) {
-// printf("DEBUG: media_url_https: %s\n", str);
strlcpy(media_url, str, sizeof(media_url));
} else if (!strcmp(nodes[5].name, "url")) {
-// printf("DEBUG: url: %s\n", str);
strlcpy(url, str, sizeof(url));
} else if (!strcmp(nodes[5].name, "expanded_url")) {
-// printf("DEBUG: expanded_url: %s\n", str);
strlcpy(expanded_url, str, sizeof(expanded_url));
} else if (!strcmp(nodes[5].name, "type")) {
-// printf("DEBUG: type: %s\n", str);
if (!strcmp(str, "photo")) {
addreplacement(url, media_url);
} else {
@@ -399,10 +387,8 @@ processnodes(struct json_node *nodes, size_t depth, const …
!strcmp(nodes[3].name, "entities") &&
!strcmp(nodes[4].name, "urls")) {
if (!strcmp(nodes[6].name, "url")) {
-// printf("DEBUG: url: %s\n", str);
strlcpy(url, str, sizeof(url));
} else if (!strcmp(nodes[6].name, "expanded_url")) {
-// printf("DEBUG: expanded_url: %s\n", str);
addreplacement(url, str);
url[0] = '\0';
}
@@ -421,16 +407,12 @@ processnodes(struct json_node *nodes, size_t depth, const…
!strcmp(nodes[3].name, "extended_entities") &&
!strcmp(nodes[4].name, "media")) {
if (!strcmp(nodes[6].name, "media_url_https")) {
-// printf("DEBUG: media_url_https: %s\n", str);
strlcpy(media_url, str, sizeof(media_url));
} else if (!strcmp(nodes[6].name, "url")) {
-// printf("DEBUG: url: %s\n", str);
strlcpy(url, str, sizeof(url));
} else if (!strcmp(nodes[6].name, "expanded_url")) {
-// printf("DEBUG: expanded_url: %s\n", str);
strlcpy(expanded_url, str, sizeof(expanded_url));
} else if (!strcmp(nodes[6].name, "type")) {
-// printf("DEBUG: type: %s\n", str);
if (!strcmp(str, "photo")) {
addreplacement(url, media_url);
} else {
@@ -462,7 +444,6 @@ main(void)
/* check for pinned tweets */
for (i = 0; i < npinned; i++) {
if (!strcmp(t->itemid, pinnedids[i])) {
-// printf("DEBUG: pinned: %s\n", pinnedids[i]);
t->ispinned = 1;
break;
}
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.