Checkpoint - implementing the scrapper (WIP)
This commit is contained in:
parent
a402eb154e
commit
1588ae2140
19
fetch.py
Normal file
19
fetch.py
Normal file
@ -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('<br/>ANNEXES<br/>ANNEXE I</p>'):text.index('<div style="margin-top: 30px; margin-bottom:20px;" id="JORFSCTA000037493059" class="titreSection">Annexe </div>'):]).split('<tr>')[2::]
|
||||||
|
for row in text:
|
||||||
|
pass
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
runfetch('https://www.legifrance.gouv.fr/eli/arrete/2018/10/12/PRMD1824595A/jo/texte')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user