demian-wolf / pyreverso

Reverso API wrapper for Python
https://reverso.net/
MIT License
49 stars 14 forks source link

BeautifulSoup is replaced with regexp #5

Open rantanevich opened 3 years ago

rantanevich commented 3 years ago

Hi! I've made a few changes:

Could you shed some light on the get_examples method of ReversoContextAPI?

demian-wolf commented 3 years ago

Thank you very much for your work!

Could you shed some light on the get_examples method of ReversoContextAPI?

Currently, however, neither get_examples or get_translations work (see issue #6). It looks like there were drastic changes on the website, so it might be even necessary to replace some API calls via requests with parsing HTML via BeautifulSoup.

When I have time, I'm going to figure out the cause of the problem, and depending on that I will decide whether to merge this PR or not.

rantanevich commented 3 years ago

Sure. I would still suggest to use request session to reuse a single connection instead of creating a short-live connection for each request.