Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Legifrance (2020) layout #11

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

Cimbali
Copy link

@Cimbali Cimbali commented Apr 28, 2021

It’s probably not perfect because I couldn’t test it exhaustively, but all commands for me now.

Also adds a caching CLI option.

@Cimbali
Copy link
Author

Cimbali commented Apr 28, 2021

I have also not met any anti-scraping restrictions. Could simply be due to a low rate of requests on my behalf.

@Cimbali
Copy link
Author

Cimbali commented Apr 29, 2021

Les builds python 3.6 et 2.7 (sic) et pypy3 passent sauf common_laws dont je ne sais pas ce qu’il faut faire − je ne trouve pas ces données sur légifrance et je ne sais pas exactement à quoi elles correspondent.

Les autres builds ont des problèmes de dépendances (PyYAML refuse python 3.4 par exemple, url-normalize refuse python 3.5, ey pypy n’arrive pas à compiler cryptography)

@Cimbali
Copy link
Author

Cimbali commented Nov 17, 2021

La branche master de Cimbali/legipy utilise selenium comme transport adapter pour éviter les restrictions anti-scraping, et un cache pour éviter de trop surcharger les serveurs legifrance (sans changer l’interface requests).

Additionnellement,

  • le cache permet de refaire rapidement les requêtes sans lancer un navigateur
  • le navigateur peut rester ouvert pour l’occasionel captcha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant