#print(httpresponse.info())
open('welcome3.html', 'w', encoding='iso8859-1').write(html)
+ assert 'init-aiguillagePersonnalisation.ea' in html
+ httpresponse = httpopen(BASE_URL + '/voscomptes/canalXHTML/donneesPersonnelles/aiguillage_personnalisation/init-aiguillagePersonnalisation.ea')
+ html = httpresponse.read().decode('iso8859-1')
+ #print(httpresponse.info())
+ open('welcome4.html', 'w', encoding='iso8859-1').write(html)
+
assert 'init-synthese.ea' in html
httpresponse = httpopen(BASE_URL + '/voscomptes/canalXHTML/comptesCommun/synthese_assurancesEtComptes/init-synthese.ea')
html = httpresponse.read().decode('iso8859-1')
#print(httpresponse.info())
- open('welcome4.html', 'w', encoding='iso8859-1').write(html)
+ open('welcome5.html', 'w', encoding='iso8859-1').write(html)
sleep(3)
root = html_parser.html_parse(html)
logging.debug('Agregating %s', account)
if os.access(LOCAL_DIR + account + '.csv', os.F_OK):
+ logging.debug('Not implemented')
pass
else:
logging.warning('Master csv file not found for %s: creating', account)
past_headers = False
for line in open(LOCAL_DIR + account_file).read().split('\n'):
+ logging.debug('line: %s', line)
if not line:
continue
if past_headers:
parser.add_option('-d', '--debug',
action='store_true', dest='debug', default=False,
help="debug mode")
+ parser.add_option('--no-download',
+ action='store_true', dest='no_download', default=False,
+ help="don't download. Only agregate.")
(options, args) = parser.parse_args()
if options.debug:
raise
os.chdir(TMP_DIR)
- download()
+ if not options.no_download:
+ download()
agregate()