SavchenkoValeriy / emacs-powerthesaurus

Powerthesaurus integration for Emacs
GNU General Public License v3.0
270 stars 11 forks source link

This seems to be broken #11

Closed guibor closed 4 years ago

guibor commented 4 years ago

Presumably a change in how powerthesaurus.org returns results

maxchaos commented 4 years ago

It would appear that powerthesaurus changed both where it keeps the json store (that this package uses to extract suggestions) and its structure. I tried to make sense out of it but it seemed unnecessarily complex, so I modified the package to extract synonyms from the html body instead. If @SavchenkoValeriy is ok with it, I can open a pull request.

lyjdwh commented 4 years ago

@maxchaos it seems @SavchenkoValeriy temporarily has no time to handle this. So you can first commit it to your fork that we can use it :)

maxchaos commented 4 years ago

I've already done so in a different branch, namely pt-api-change. I believe I should wait for @SavchenkoValeriy's response a bit longer before I merge it into master (unless this is inconvenient to you), since he may be able to fix this without dropping json store support.

lyjdwh commented 4 years ago

It's ok. I am using your pt-api-change branch now, thanks!

d1egoaz commented 4 years ago

^ up

dleslie commented 4 years ago

@maxchaos Been a while, maybe time to merge?

maxchaos commented 4 years ago

@dleslie I guess so.

fu123456 commented 4 years ago

Now, How to sove this issue to make this package work?

marlinstrub commented 4 years ago

I've used your fix for a while, @maxchaos, thanks for making it public! I noticed yesterday that it stopped working for me though. I'm just wondering whether it's still working for you and if not, whether you have any thoughts on how to fix it?

maxchaos commented 4 years ago

@marlinstrub Indeed, trying to fetch a page from powerthesaurus falls through with status code 403 (forbidden). It would appear that powerthesaurus is dropping http requests without certain header arguments (the reason why eludes me). Also, there was a change in the response format. I just pushed a fix on my fork's master branch that should work around both of these issues. Let me know if it works for you.

marlinstrub commented 4 years ago

@maxchaos Works like a charm, thanks a lot!

maxchaos commented 4 years ago

Great. For the record, these past few fixes have been merged into the master branch of the original repo so there is no need to pull from my fork. As such, I'll be closing this issue.

marlinstrub commented 4 years ago

Even better, thanks!