clarencecastillo / alfred-powerthesaurus

Search Powerthesaurus synonyms and antonyms from Alfred
MIT License
104 stars 14 forks source link

Workflow is not working anymore. #1

Closed vijaydaultani closed 6 years ago

vijaydaultani commented 6 years ago

The given have stopped working since today. I am not sure for the exact reason but I suspect its probably because there is some API change from powerthesaurus?

Can someone help to fix the bug. Below you can find the output when running the workflow in debug mode while searching for word "another"

[2018-03-15 14:10:43][STDERR: input.scriptfilter] 14:10:42 workflow.py:2189 DEBUG Workflow version : 1.0.0 14:10:42 powerthesaurus.py:87 DEBUG query : u'another' u'syn' 14:10:42 powerthesaurus.py:42 DEBUG Cache key : u'another' ['synonyms'] -> u'another_synonyms' 14:10:43 powerthesaurus.py:77 DEBUG [200] https://www.powerthesaurus.org/another/synonyms 14:10:43 workflow.py:1862 DEBUG Cached data saved at : /home/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Data/me.clarencecastillo.alfred-powerthesaurus/another_synonyms.cpickle 14:10:43 powerthesaurus.py:104 DEBUG 0 words for u'another' 14:10:43 workflow.py:1596 DEBUG Reading settings from /home/Library/Application Support/Alfred 3/Workflow Data/me.clarencecastillo.alfred-powerthesaurus/settings.json ... 14:10:43 workflow.py:2387 DEBUG Set last run version : 1.0.0 14:10:43 workflow.py:2231 DEBUG Workflow finished in 1.248 seconds.

vijaydaultani commented 6 years ago

Hi @jessestuart, Sorry but #2 still does not resolve the issue for me. I tried to use v1.1 with change in API url but still it give me same answer as previous.

@clarencecastillo can you give some insight on this?

screenshot
jessestuart commented 6 years ago

Hiya @vijaydaultani, So at some point in the past week it seems they've deprecated the classic.powerthesaurus.org domain in favor of classicthesaurus.org. Same site, still scrape-able (although I'm not fond of playing this back-and-forth game with undocumented APIs!).

Wanna give this a spin and see if it works? I'm getting results on my end:

image

clarencecastillo commented 6 years ago

Heya @jessestuart, thanks for the quick fix. I've tested the new workflow and it works as expected. Can't complain if they drop classicthesaurus.org some day, but I'll try to scrape the new website when I find the time. Will work on this on a separate branch. Cheers!

vijaydaultani commented 6 years ago

Hey @jessestuart thanks for sharing the new api url. It works as expected as of now.

May I know where to find the latest api every time they change? I don't know what should be the best way to keep track of it?