diff options
-rw-r--r-- | src/extractors/extractor.c | 3 | ||||
-rw-r--r-- | src/process_url.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/extractors/extractor.c b/src/extractors/extractor.c index 5317945..ccc1ec6 100644 --- a/src/extractors/extractor.c +++ b/src/extractors/extractor.c @@ -6,7 +6,8 @@ #include "haokan.h" Site_map site_map = { - {{"bilibili.com", SITE_BILIBILI}, {"haokan.baidu.com", SITE_HAOKAN}}, 2}; + {{"www.bilibili.com", SITE_BILIBILI}, {"haokan.baidu.com", SITE_HAOKAN}}, + 2}; void options_cleanup(Options *options) { free_and_nullify(options->URL); diff --git a/src/process_url.c b/src/process_url.c index c20b3eb..7723d45 100644 --- a/src/process_url.c +++ b/src/process_url.c @@ -171,7 +171,7 @@ static int parse_url(const char *URL, const char *outdir, char *fn) { DEBUG_PRINT("Query: %s\n", query); for (unsigned short i = 0; i < site_map.size; i++) { - if (strstr(domain, site_map.pairs[i].domain)) { + if (!strcmp(domain, site_map.pairs[i].domain)) { append_log("Got site: %s\n", domain); thrd_t t; options.site = site_map.pairs[i].site; |