Code Monkey home page Code Monkey logo

alfred-web-search-suggest's Introduction

Alfred Web Search Suggest

Alfred search suggest workflow for various popular websites. Inspired by the official Google Suggest workflow.

Download & Install

✨ This workflow is available on official Alfred Gallery now! (which means it has been reviewed and verified by Alfred Team ✅)

If you have Alfred 5 or above, you can install and resolve dependencies with one click and enjoy in-app updates in the future.

➡️ Go to official Alfred Gallery page

If you are still using Alfred 4 or older, you can download from GitHub releases and install it (just open with Alfred) manually.

Important Note for macOS Monterey (12.0) and above

Apple has removed the system PHP since macOS Monterey (12.0), so you should install PHP to continue using this workflow.

If you have Alfred 5 or above, you can let Alfred resolve dependencies automatically.

Or you can use Homebrew to install PHP manually. After installing Homebrew, you can run the following command in Terminal to install PHP:

brew install php

Supported Websites

Details

Google

Support basic suggestions. Proxy setting is available.

google

Wikipedia

Support direct term suggestions and preview, language MUST be specified with ISO 639-1 code in the first arg. Proxy setting is available.

wikipedia-en

wikipedia-zh

Wolfram|Alpha

Support direct term suggestions. Proxy setting is available.

wolframalpha

Amazon

Support basic suggestions. Proxy setting is available.

amazon

IMDB

Support direct term suggestions and preview. Proxy setting is available.

imdb

DuckDuckGo

Support basic suggestions. Proxy setting is available.

duckduckgo

Brave Search

Support basic suggestions. Proxy setting is available.

bravesearch

Pixiv

Support basic suggestions. Proxy setting is available.

pixiv

Baidu

Support basic suggestions.

baidu

Zhihu

Support basic suggestions.

zhihu

bilibili

Support basic suggestions with personalization.

注:可以在 User Configuration(如果你使用 Alfred 4 及以下版本,则是在 Environment Variable)中设置你的 bilibili UID 以获得个性化搜索建议。你可以在你的 bilibili 个人主页的个人资料栏找到该 UID。

bilibili

Sina Weibo

Removed due to login needed.

Taobao

Support basic suggestions.

taobao

JoyBuy

Support basic suggestions.

joybuy

Bangumi

Support direct term suggestions and preview, type can be specified in the first arg.

注:共支持 6 种条目类型的搜索,分别为全部(all)、动画(anime)、书籍(book)、音乐(music)、游戏(game)、三次元(real);对于每一条搜索结果,副标题默认显示该条目的类型(如果当前搜索类型为全部)和中文名称(若有),按 可显示其简介(若有),按 可显示其排名与评分(若有)。

bangumi-all

bangumi-anime

Moegirlpedia

Support direct term suggestions and preview. Proxy setting is available.

moegirlpedia

Additional Notes

Direct Search

If you want an alternative to search exactly what you typed, you can add custom web searches in Features → Web Search of Alfred Preferences, here's a list of the search URLs above:

  • Google: built-in
  • Wikipedia: built-in
  • Wolfram|Alpha: built-in
  • Amazon: built-in
  • IMDB: built-in
  • DuckDuckGo: built-in
  • Brave Search: https://search.brave.com/search?q={query}
  • Pixiv: https://www.pixiv.net/search.php?word={query}
  • Baidu: https://www.baidu.com/s?wd={query}
  • Zhihu: https://www.zhihu.com/search?q={query}
  • bilibili: https://search.bilibili.com/all?keyword={query}
  • Sina Weibo: https://s.weibo.com/weibo?q={query}
  • Taobao: https://s.taobao.com/search?q={query}
  • JoyBuy: https://search.jd.com/Search?enc=utf-8&keyword={query}
  • Bangumi: http://bangumi.tv/subject_search/{query}
  • Moegirlpedia: https://zh.moegirl.org.cn/index.php?search={query}

Proxy Setting

Proxy setting is avaliable as:

for these websites:

  • Google
  • Wikipedia
  • Wolfram|Alpha
  • Amazon
  • IMDB
  • DuckDuckGo
  • Brave Search
  • Pixiv
  • Moegirlpedia

Here's some example settings:

  • If you use an HTTP proxy at 127.0.0.1:1087 without credentials, set proxy to http://127.0.0.1:1087
  • If you use a SOCKS5 proxy at 127.0.0.1:1086 with username user and password pass, set proxy to socks5://user:[email protected]:1086

For more details, check the libcurl doc.

alfred-web-search-suggest's People

Contributors

dmyers avatar zqzten avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

alfred-web-search-suggest's Issues

[enhancement required] remain functionality when no searching candidate

pic

Like the picture shows above, it seems that the search result went wrong functionally when there is no searching candidate (maybe a null list returned, sorry I'm not familiar with PHP and I haven't read your code yet).

Is there a way to keep the functionality? such as Still search Bilibili for {query}..., or the way shown below

pic2

Shadowsocks设置socks代理模式无效

我的Shadowsocks的1086端口是socks代理,1087端口是http代理。设置1086端口时无法使用google suggest,设置1087的时候可以。而且当设置1087的时候,proxy_type不管为CURLPROXY_HTTP还是CURLPROXY_SOCKS5都是有效的。
另外,如果直接修改request.ph,添加下面两行代码,设置1086端口的socks代理是有效的。
image

建议增加默认的搜索词

另外提一个小建议,就是使用suggest的时候有时候没有合适的suggest结果或者就是想搜输入的词,这时候就比较苦恼。建议可以在所有suggest中把默认的词始终放在第一位。

Unable to run task!

I'm getting the following error when attempting to run. Any idea on how to fix?

Unable to run task!
Reason: launch path not accessible

It's likely that the folder required to run this task has somehow been deleted, perhaps syncing?

This error isn't that serious, just try again :)

Related Workflow Info...
Name: 'Web Search Suggest'
Folder:/Users/nick/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.935962E0-1F83-4535-A2FD-76DF6D177502

使用bangumi搜索时除anime外其他类型的问题

您好,我在使用Bangumi那个关键字的搜索时遇到了问题,我输入bgm anime fate这个句子显示是正常的,如图
截屏2022-08-28 01 21 26

但是如果我输入bgm all fate, bgm book fate, bgm music fate, bgm real fate, bgm game fate 这些时候就会出现问题,如图(以all为例)
截屏2022-08-28 01 21 50

而且报错的地方显示的东西完全相同。 如图是debugger中显示的报错的地方
截屏2022-08-28 01 18 25

我使用的系统是 M1 macOS Monterey 12.5

请问这个问题如何解决呢?

Error in Web Search Suggest workflow

Hi. I can't use the workflow even though I have php installed. Whenever I try to search for something on IMDB for example it takes me to Google search.

image jpeg f2b429c5ab62f2338d6767c8b5c0139c

launch path not accessible

Reason: launch path not accessible

/usr/bin/php

Check that the selected language exists on your system.

If you're syncing Alfred's preferences, also check that all related workflow files exist locally.

bug report

When I test it,I found the zhihu-search-suggest get a problem.
The Alfred debug log is:
[2018-06-11 14:30:48][input.scriptfilter] Queuing argument '栋' [2018-06-11 14:30:49][input.scriptfilter] Script with argument '(null)' finished [2018-06-11 14:30:49][input.scriptfilter] Warning: Invalid argument supplied for foreach() in /Users/sunli/Alfred/Alfred.alfredpreferences/workflows/user.workflow.0328F3B6-3FDF-4661-9B58-A3C1E4ED1153/zhihu.php on line 20 {"items":[]} [2018-06-11 14:30:49][ERROR: input.scriptfilter] JSON error: JSON text did not start with array or object and option to allow fragments not set. in JSON: Warning: Invalid argument supplied for foreach() in /Users/sunli/Alfred/Alfred.alfredpreferences/workflows/user.workflow.0328F3B6-3FDF-4661-9B58-A3C1E4ED1153/zhihu.php on line 20 {"items":[]}

I try to modify the code in "zhihu.php" line 17 to "$json = json_decode($response)[0];"
And the problem seem to be solved.
But I'm not a browser side engineer,so I can't confirm does it really work, pls check it.

WiKi 返回值总是 []

目前没配置Proxy。
谷歌、亚马逊等其它的搜索结果显示都正常
只有WiKi搜索返回值总是[] (请见下图{"items":[]})
20220819_125439@2x

Bilibili can't work

[18:21:58.355] Logging Started...
[18:22:01.380] Web Search Suggest[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Euser.workflow.FAC11FB7-16FF-47AE-8AF9-575CFBEF3072%3EAE15F1F6-37B0-4A47-BEE1-975354A81227)] Queuing argument 'd'
[18:22:01.922] Web Search Suggest[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Euser.workflow.FAC11FB7-16FF-47AE-8AF9-575CFBEF3072%3EAE15F1F6-37B0-4A47-BEE1-975354A81227)] Script with argv '(null)' finished
[18:22:01.928] ERROR: Web Search Suggest[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Euser.workflow.FAC11FB7-16FF-47AE-8AF9-575CFBEF3072%3EAE15F1F6-37B0-4A47-BEE1-975354A81227)] Code 255: PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /Users/zhuangzhu/Nutstore Files/Alfred/Alfred.alfredpreferences/workflows/user.workflow.FAC11FB7-16FF-47AE-8AF9-575CFBEF3072/bilibili.php:16
Stack trace:
#0 Command line code(3): require_once()
#1 {main}
  thrown in /Users/zhuangzhu/Nutstore Files/Alfred/Alfred.alfredpreferences/workflows/user.workflow.FAC11FB7-16FF-47AE-8AF9-575CFBEF3072/bilibili.php on line 16
[18:22:01.932] Web Search Suggest[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Euser.workflow.FAC11FB7-16FF-47AE-8AF9-575CFBEF3072%3EAE15F1F6-37B0-4A47-BEE1-975354A81227)] Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /Users/zhuangzhu/Nutstore Files/Alfred/Alfred.alfredpreferences/workflows/user.workflow.FAC11FB7-16FF-47AE-8AF9-575CFBEF3072/bilibili.php:16
Stack trace:
#0 Command line code(3): require_once()
#1 {main}
  thrown in /Users/zhuangzhu/Nutstore Files/Alfred/Alfred.alfredpreferences/workflows/user.workflow.FAC11FB7-16FF-47AE-8AF9-575CFBEF3072/bilibili.php on line 16
[18:22:01.934] ERROR: Web Search Suggest[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Euser.workflow.FAC11FB7-16FF-47AE-8AF9-575CFBEF3072%3EAE15F1F6-37B0-4A47-BEE1-975354A81227)] JSON error: JSON text did not start with array or object and option to allow fragments not set. around line 1, column 0. in JSON:
Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /Users/zhuangzhu/Nutstore Files/Alfred/Alfred.alfredpreferences/workflows/user.workflow.FAC11FB7-16FF-47AE-8AF9-575CFBEF3072/bilibili.php:16
Stack trace:
#0 Command line code(3): require_once()
#1 {main}
  thrown in /Users/zhuangzhu/Nutstore Files/Alfred/Alfred.alfredpreferences/workflows/user.workflow.FAC11FB7-16FF-47AE-8AF9-575CFBEF3072/bilibili.php on line 16

Other can work
macOS: 14.1
Alfred: 5.1.4
workflow versions: 1.20

MacOs Monterey

Hi Zach, the alfred search workflow doesn't work anymore with the macos Monterey upgrade.
Would be wonderful to have an update ❤️ Thanks in advance

Wikipedia search is broken

wiki no longer works. Perhaps since the redesign? Debug log of running wiki last week tonight:

[19:22:24.271] Web Search Suggest[Script Filter] Queuing argument 'last week tonight'
[19:22:24.424] Web Search Suggest[Script Filter] Script with argv '(null)' finished
[19:22:24.430] ERROR: Web Search Suggest[Script Filter] Code 255: PHP Warning:  Trying to access array offset on value of type null in /Users/vm/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/WebSearchSuggest.com.akikoz.alfred.websearchsuggest/wikipedia.php on line 20
PHP Fatal error:  Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /Users/vm/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/WebSearchSuggest.com.akikoz.alfred.websearchsuggest/wikipedia.php:20
Stack trace:
#0 Command line code(4): require_once()
#1 {main}
  thrown in /Users/vm/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/WebSearchSuggest.com.akikoz.alfred.websearchsuggest/wikipedia.php on line 20
[19:22:24.432] Web Search Suggest[Script Filter] Warning: Trying to access array offset on value of type null in /Users/vm/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/WebSearchSuggest.com.akikoz.alfred.websearchsuggest/wikipedia.php on line 20

Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /Users/vm/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/WebSearchSuggest.com.akikoz.alfred.websearchsuggest/wikipedia.php:20
Stack trace:
#0 Command line code(4): require_once()
#1 {main}
  thrown in /Users/vm/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/WebSearchSuggest.com.akikoz.alfred.websearchsuggest/wikipedia.php on line 20
[19:22:24.433] ERROR: Web Search Suggest[Script Filter] JSON error: JSON text did not start with array or object and option to allow fragments not set. around line 1, column 0. in JSON:
Warning: Trying to access array offset on value of type null in /Users/vm/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/WebSearchSuggest.com.akikoz.alfred.websearchsuggest/wikipedia.php on line 20

Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /Users/vm/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/WebSearchSuggest.com.akikoz.alfred.websearchsuggest/wikipedia.php:20
Stack trace:
#0 Command line code(4): require_once()
#1 {main}
  thrown in /Users/vm/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/WebSearchSuggest.com.akikoz.alfred.websearchsuggest/wikipedia.php on line 20

All other searches work.

  • Alfred 5.0.6
  • macOS 13.2.1

where should I set the proxy?

where should I set the proxy? it seems like I can’t make it working like the screenshots.
could you pleas be more specific about setting it up?

thank you!

BUG

For all searches, text beyond a certain length is invalidated

Google Suggest is not working

[01:44:25.089] ERROR: Web Search Suggest[Script Filter] JSON error: JSON text did not start with array or object and option to allow fragments not set. around line 1, column 0. in JSON:
Warning: simplexml_load_string(): Entity: line 1: parser error : Start tag expected, '<' not found in /Users/junhong/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.2CED1F28-CD36-4840-BD15-8700883DCB04/google.php on line 13

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.