courtsbr / esaj

Scrapers for many e-SAJ systems
http://courtsbr.github.io/esaj/
GNU General Public License v2.0
46 stars 20 forks source link

Fix captcha codes #9

Closed jtrecenti closed 7 years ago

jtrecenti commented 7 years ago

use just captchasaj and change captchaTJSC calls

clente commented 7 years ago

Refactoring of CPOPG-TJAM/BA/SC (hopefully) finished with de83dc022211721116bc83e736ee6b5650ed17cf. Waiting validation by @jtrecenti before moving on to CPOSG-TJSC, DJE, and parsers.

jtrecenti commented 7 years ago

We need to check the captcha version of each site. The old one is one image containing 5 characters. The second is a json file containing an image with many (variable) letters and the color to consider.

clente commented 7 years ago

But was my implementation of baixar_tj**() correct? baixar_tjam() and baixar_tjsc() are in the new style, while baixar_tjba() is in the old.

If I implemented these 3 correctly, I'll go on to implementing the functions for the other TJs.

P.S.: Would it be interesting to have a general baixar() function? Its argument would be the abbreviation of a state and it would call the corresponding baixar_tj**() method.

jtrecenti commented 7 years ago

I think we need to rewrite the API. What do you think it is more efficient: Rewrite existing functions and clean the code or implement all TJ's and then modify the API?