淘宝咸鱼关闭了在电脑客户端上的搜索功能,因此咸鱼.EXE有必要存在。它能不安装咸鱼app,就能在电脑上使用咸鱼搜索功能。
用法:咸鱼 [待搜索关键词]COPY 源码(请自行编译) | #include <stdio.h> | | #include <windows.h> | | | | | | #define LINE_BUFF_SIZE 4096 | | | | | | #define HELP_INFORMATION "\ | | 咸鱼 V1.0 - PC端咸鱼搜索工具\n\ | | 使用:\n\ | | 咸鱼 [关键词]\n" | | | | | | int GetSaltedfishURL(char* keyWords) | | { | | | | if(strlen(keyWords) > LINE_BUFF_SIZE / 4) | | { | | fputs("Your key words is too long\n", stdout); | | } | | | | | | char* keyEncode = (char*)malloc(LINE_BUFF_SIZE * sizeof(char)); | | char* commandLine = (char*)malloc(LINE_BUFF_SIZE * sizeof(char)); | | | | | | char* ptr = keyEncode; | | while(*keyWords) | | { | | sprintf(ptr, "%%%02X", (unsigned char)(*keyWords)); | | keyWords += 1, ptr += 3; | | } | | | | | | sprintf(commandLine, "%s%s", "start https://s.2.taobao.com/list/list.htm?q=", keyEncode); | | printf("%s\n", commandLine); | | | | | | system(commandLine); | | | | | | free(keyEncode); | | free(commandLine); | | return 0; | | } | | | | | | int main(int argc, char** argv) | | { | | | | if(argc != 2) | | { | | fputs(HELP_INFORMATION, stdout); | | return 1; | | } | | | | | | GetSaltedfishURL(argv[1]); | | return 0; | | }COPY |
|