I am trying to make a web scraper to use for a finance management system I am planning to build for myself. My banks does not offer any APIs officially therefore my only option is to scrape the transactions from the website itself.
Used Python Requests to make post login requests using this code (some details hidden)
authenticate_request = requests.post(
url="https://www.cibconline.cibc.com/ebm-anp/api/v1/json/sessions",
proxies={'http':'[HIDDEN]'},
json={
"card": {
"value": "{}".format(cardnumber),
"encrypt": False,
"encrypted": False,
},
"password": "{}".format(password),
},
headers={
"Host": "www.cibconline.cibc.com",
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0",
"Accept": "application/vnd.api+json",
"Accept-Language": "en",
"Accept-Encoding": "gzip, deflate, br",
"Content-Type": "application/vnd.api+json",
"Client-Type": "DEFAULT_WEB",
"WWW-Authenticate": "CardAndPassword",
"brand": "cibc",
"Content-Length": "170",
"Origin": "https://www.cibconline.cibc.com",
"Connection": "keep-alive",
"Referer": "https://www.cibconline.cibc.com/ebm-resources/online-banking/client/index.html",
"Sec-Fetch-Dest": "empty",
"Sec-Fetch-Mode": "cors",
"Sec-Fetch-Site": "same-origin",
"TE": "trailers",
}
)
I have also tried using proxies as mentioned in the snippet above, but it still returns Status Code 403 Access Denied, saying “you don’t have permission to access {url mentioned above} on this server.
I am not sure how to proceed with this project and would like if you can guide me on what I can try next. Also, I don’t want to use services like Plaid, because I don’t want to give my banking details to some 3rd party.