I used selenese to run a selenium .side file to log into my profile and then navigate to the advertising section of LinkedIn and then export the campaign performance .csv to my server.
I then create a MySQL database to ingest that .csv and use logstash to ingest that data to kibana for reporting purposes. The challenge I face with this approach is that the HTML code changes and the .side file do not work consistently.
I have tried to use the python route with selenium but when the python3 code reaches the log-in stage I get a message from LinkedIn that I need to enter a code to log in even when 2FA is turned off. The problem here, I think, is that I am using chrome-headless as the browser. Anyway, I also don't think this is a sustainable solution going forward as the CSS elements like "ember xx" might be changed dynamically.
So I am wondering if I can use the LinkedIn API in a python3 application to log in and then navigate to the "advertise" section of my profile and then go to my marketing campaign and export the performance data?