Compare commits
No commits in common. "43bf08eae81e89c63180a53fbefa886307dc2c2f" and "58f417aea9e925eee52108fce6e790d0a0b35b01" have entirely different histories.
43bf08eae8
...
58f417aea9
24
xactfetch.py
24
xactfetch.py
|
@ -47,22 +47,20 @@ def ntfy(
|
|||
if tags:
|
||||
headers['Tags'] = tags
|
||||
url = f'{NTFY_URL}/{topic}'
|
||||
if attach:
|
||||
if filename:
|
||||
headers['Filename'] = filename
|
||||
if message:
|
||||
headers['Message'] = message.replace('\n', '\\n')
|
||||
r = requests.put(
|
||||
url,
|
||||
headers=headers,
|
||||
data=attach,
|
||||
)
|
||||
else:
|
||||
if message:
|
||||
r = requests.post(
|
||||
url,
|
||||
headers=headers,
|
||||
data=message,
|
||||
)
|
||||
else:
|
||||
if filename:
|
||||
headers['Filename'] = filename
|
||||
r = requests.put(
|
||||
url,
|
||||
headers=headers,
|
||||
data=attach,
|
||||
)
|
||||
r.raise_for_status()
|
||||
|
||||
|
||||
|
@ -271,7 +269,6 @@ class ntfyerror:
|
|||
if ss := self.page.screenshot():
|
||||
save_screenshot(ss)
|
||||
ntfy(
|
||||
message=str(exc_value),
|
||||
title=f'xactfetch failed for {self.bank}',
|
||||
tags='warning',
|
||||
attach=ss,
|
||||
|
@ -551,6 +548,9 @@ class Chase:
|
|||
) -> Path:
|
||||
log.info('Downloading transactions from %s to %s', from_date, to_date)
|
||||
fmt = '%m/%d/%Y'
|
||||
log.debug('Waiting for page to load completely')
|
||||
self.page.get_by_role('link', name='Sort Options').wait_for()
|
||||
self.page.wait_for_timeout(random.randint(1500, 2500))
|
||||
href = '#/dashboard/accountDetails/downloadAccountTransactions/index'
|
||||
self.page.evaluate(f'window.location.href = "{href}";')
|
||||
log.debug('Waiting for page to load')
|
||||
|
|
Loading…
Reference in New Issue