Compare commits
2 Commits
58f417aea9
...
43bf08eae8
Author | SHA1 | Date |
---|---|---|
|
43bf08eae8 | |
|
55d5f6bd1a |
20
xactfetch.py
20
xactfetch.py
|
@ -47,20 +47,22 @@ def ntfy(
|
||||||
if tags:
|
if tags:
|
||||||
headers['Tags'] = tags
|
headers['Tags'] = tags
|
||||||
url = f'{NTFY_URL}/{topic}'
|
url = f'{NTFY_URL}/{topic}'
|
||||||
if message:
|
if attach:
|
||||||
r = requests.post(
|
|
||||||
url,
|
|
||||||
headers=headers,
|
|
||||||
data=message,
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
if filename:
|
if filename:
|
||||||
headers['Filename'] = filename
|
headers['Filename'] = filename
|
||||||
|
if message:
|
||||||
|
headers['Message'] = message.replace('\n', '\\n')
|
||||||
r = requests.put(
|
r = requests.put(
|
||||||
url,
|
url,
|
||||||
headers=headers,
|
headers=headers,
|
||||||
data=attach,
|
data=attach,
|
||||||
)
|
)
|
||||||
|
else:
|
||||||
|
r = requests.post(
|
||||||
|
url,
|
||||||
|
headers=headers,
|
||||||
|
data=message,
|
||||||
|
)
|
||||||
r.raise_for_status()
|
r.raise_for_status()
|
||||||
|
|
||||||
|
|
||||||
|
@ -269,6 +271,7 @@ class ntfyerror:
|
||||||
if ss := self.page.screenshot():
|
if ss := self.page.screenshot():
|
||||||
save_screenshot(ss)
|
save_screenshot(ss)
|
||||||
ntfy(
|
ntfy(
|
||||||
|
message=str(exc_value),
|
||||||
title=f'xactfetch failed for {self.bank}',
|
title=f'xactfetch failed for {self.bank}',
|
||||||
tags='warning',
|
tags='warning',
|
||||||
attach=ss,
|
attach=ss,
|
||||||
|
@ -548,9 +551,6 @@ class Chase:
|
||||||
) -> Path:
|
) -> Path:
|
||||||
log.info('Downloading transactions from %s to %s', from_date, to_date)
|
log.info('Downloading transactions from %s to %s', from_date, to_date)
|
||||||
fmt = '%m/%d/%Y'
|
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'
|
href = '#/dashboard/accountDetails/downloadAccountTransactions/index'
|
||||||
self.page.evaluate(f'window.location.href = "{href}";')
|
self.page.evaluate(f'window.location.href = "{href}";')
|
||||||
log.debug('Waiting for page to load')
|
log.debug('Waiting for page to load')
|
||||||
|
|
Loading…
Reference in New Issue