From 1588ae2140ca91904d5af81ac3b6a7530b2db593 Mon Sep 17 00:00:00 2001 From: Suwako Moriya Date: Mon, 5 Nov 2018 22:50:53 +0100 Subject: [PATCH] Checkpoint - implementing the scrapper (WIP) --- fetch.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 fetch.py diff --git a/fetch.py b/fetch.py new file mode 100644 index 0000000..1dc5237 --- /dev/null +++ b/fetch.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +""" +Created on Mon Nov 5 20:55:36 2018 + +@author: suwako +""" +import requests +def runfetch(url): + session=requests.Session() + req1=session.get(url) + text=req1.text.split('\n') + text='\n'.join(text[text.index('
ANNEXES
ANNEXE I

'):text.index('
Annexe
'):]).split('')[2::] + for row in text: + pass + +if __name__ == '__main__': + runfetch('https://www.legifrance.gouv.fr/eli/arrete/2018/10/12/PRMD1824595A/jo/texte') +