documents
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import subprocess
|
||||
|
||||
"""
|
||||
This script assumes that you have installed wkhtmltopdf
|
||||
This script assumes that you have installed wkhtmltopdf (sudo apt install wkhtmltopdf)
|
||||
"""
|
||||
|
||||
BASE_URL = 'https://quinquina.champs-libres.be/'
|
||||
@@ -27,13 +27,17 @@ curl 'https://quinquina.champs-libres.be/_wdt/708fb5' \
|
||||
"""
|
||||
|
||||
COOKIE_KEY = 'PHPSESSID'
|
||||
COOKIE_VALUE = '977de105d4adbaefde9b440df685831c'
|
||||
COOKIE_VALUE = '8bc630bf7757ea9074cfe16d3ad3d3ac'
|
||||
|
||||
person_id = 2811
|
||||
household_id = 376
|
||||
notification_id = 126
|
||||
parcours_id = 2705
|
||||
|
||||
URLS = [
|
||||
f'fr/person/{person_id}/document/new',
|
||||
f'fr/person/{person_id}/document',
|
||||
f'fr/parcours/{parcours_id}/document',
|
||||
f'fr/person/household/{household_id}/summary',
|
||||
f'fr/person/household/{household_id}/addresses',
|
||||
f'fr/person/household/{household_id}/relationship',
|
||||
@@ -46,4 +50,5 @@ for u in URLS:
|
||||
url = BASE_URL + u
|
||||
filename = 'img/' + u.replace('/', '_').replace('&', '_').replace('?', '_').replace('=', '_') + '.png'
|
||||
print(f'fetching {url} ...')
|
||||
subprocess.run(f'wkhtmltoimage -q --javascript-delay 1000 --cookie {COOKIE_KEY} {COOKIE_VALUE} "{url}" {filename}', shell=True, check=True)
|
||||
subprocess.run(f'wkhtmltoimage -q --javascript-delay 3000 --cookie {COOKIE_KEY} {COOKIE_VALUE} "{url}" {filename}', shell=True, check=True)
|
||||
|
||||
|
Reference in New Issue
Block a user