diff options
author | rafa_99 <raroma09@gmail.com> | 2021-09-05 14:29:02 +0100 |
---|---|---|
committer | rafa_99 <raroma09@gmail.com> | 2021-09-05 14:29:02 +0100 |
commit | f033fc79eab50c183fbd9e9e7d1c9ca342b7bd96 (patch) | |
tree | e36421e632caaad3a551746b1fb50e628d4a90f0 | |
parent | 80bc5ce11e3d99952c004674c7e2ffab3efb63e4 (diff) |
Final Touches
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | queryt.1 | 2 | ||||
-rw-r--r-- | queryt.c | 5 |
3 files changed, 5 insertions, 4 deletions
@@ -11,7 +11,7 @@ FLAGS = -march=native -O3 -pipe -faggressive-loop-optimizations LIBS = -lcurl -ljson-c # Compiled Code -CLEAN = queryt +CLEAN = queryt queryt_debug # MakeOPTS build: clean @@ -9,7 +9,7 @@ queryt \- API keyless YouTube querying tool. Query various searches from YouTube to standard output. .TP \fB\-f\fR, \fB\-\-format\fR -uses format modifiers to customize the output \fB[aditRT]\fR +uses format modifiers to customize the output \fB[aditRT]\fR .TP \fB\-m\fR, \fB\-\-max\fR defines the max number of displayed results\fR @@ -8,6 +8,7 @@ #include "libs/json.h" #define VERSION "1.0" +#define SEARCHLINK "https://www.youtube.com/results?search_query=" void processOptions(int *options, char **args, int argc); @@ -74,8 +75,8 @@ void processOptions(int *options, char **args, int argc) char *query = queryNormalizer(args[2]); if ( query != NULL ) { - char *link = (char *) calloc(strlen("https://www.youtube.com/results?search_query=") + strlen(query) + 1, sizeof(char)); - strcpy(link, "https://www.youtube.com/results?search_query="); + char *link = (char *) calloc(strlen(SEARCHLINK) + strlen(query) + 1, sizeof(char)); + strcpy(link, SEARCHLINK); strcat(link, query); char *json = extractQueryJSON(link); |