I am trying to connect to this website https://operations.daxko.com/Login via Python in order to scrape a bunch of financial transactions for a non-profit I'm doing some work for. I cannot for the life of me figure out how to get passed the login page though. I have checked the following threads:
How can I login to a website with Python?
Python - Login and download specific file from website
Python: Login to ajax website using request
Here's my code:
# from urllib.request import urlopen
# from urllib.error import HTTPError
from bs4 import BeautifulSoup
# import pandas as pd
from pyquery import PyQuery
import requests
# from twill.commands import *
url = "https://operations.daxko.com/Login"
user = 'my_username'
password = 'my_password'
payload = {'username': f'{user}', 'password': f'{password}'}
result = requests.get(url, auth=(user, password))
s = requests.Session()
s.get(url)
s.post(url, data = payload)
explore_url = 'https://operations.daxko.com/the-financials-i-want'
page1 = s.get(explore_url)
c = page1.content
soup = BeautifulSoup(c,'lxml')
But 'soup' is still the login page
OS: Windows 10
Python 3.6