pyreverso icon indicating copy to clipboard operation
pyreverso copied to clipboard

BeautifulSoup is replaced with regexp

Open rantanevich opened this issue 4 years ago • 2 comments

Hi! I've made a few changes:

  • add .gitignore file
  • throw BeautifulSoup away and use simple regexp

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

rantanevich avatar Jul 19 '21 22:07 rantanevich

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.

demian-wolf avatar Aug 05 '21 10:08 demian-wolf

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

rantanevich avatar Aug 05 '21 17:08 rantanevich