DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Grabbing files from authenticated website  (Read 6,760 times)

kalos

  • Member
  • Joined in 2006
  • **
  • Posts: 1,824
Grabbing files from authenticated website
« on: September 23, 2021, 10:18 AM »
Hello

I want to grab xls files via specific links through a website that has a form authentication. Because it has an additional sms authentication step, it will not be possible to fully automate a live connection.

The session is set at 60 minutes so I am thinking if I ping/query the website every 30min, the cookie will renew/refresh.

However, this pinging will need to come from a 24/7 server and not my laptop as I cannot have it on all the time.

Is there any free solution for this?

I was thinking to create a Sharepoint Flow where it will download the xls every 30 min refreshing the cookie/auth/sessionID each time. I was hoping that I can somehow login manually for the first time via Sharepoint and then since the flow will be scheduled every 30, it will run forever refreshing the session.

Or do you have any other idea?
I was checking some of the free Azure services if they are suitable but no luck.

Thanks!

publicdomain

  • Honorary Member
  • Joined in 2019
  • **
  • Posts: 732
    • Participated in NANY Challenge Three Times
    • Linux User
Re: Grabbing files from authenticated website
« Reply #1 on: September 23, 2021, 03:27 PM »
... that has a form authentication.

Hello Kalos! What's the URL/Link to the authentication form? Chances are it can be automated via a browser automation script + a GUI.

Cheers!
« Last Edit: September 23, 2021, 04:26 PM by publicdomain »

kalos

  • Member
  • Joined in 2006
  • **
  • Posts: 1,824
Re: Grabbing files from authenticated website
« Reply #2 on: September 23, 2021, 08:02 PM »
Hi!

Unfortunately it's a proprietary site and I cannot tell it.

It is a form authentication website which has an additional step of authentication so it is really really hard to automate it.

Instead, I am just looking to download specific urls every 30 min through the IE/Edge so that the session does not expire.

What would be the best way to do that? I tried Powershell, Windows Task Scheduler, Excel Data Connections but non really worked due to downloading either nothing or the login page.

publicdomain

  • Honorary Member
  • Joined in 2019
  • **
  • Posts: 732
    • Participated in NANY Challenge Three Times
    • Linux User
Re: Grabbing files from authenticated website
« Reply #3 on: September 23, 2021, 08:45 PM »
Unfortunately it's a proprietary site and I cannot tell it.

No problem 8)

What would be the best way to do that?

I would either use Selenium (https://www.selenium.dev) or a simple "embedded" WebView/WebBrowser for this.

If you're in a rush, we can discuss privately, no biggie. As long as the resulting program goes to serve the public community, I'm in!  :)

(BTW, no hard-coded private URLs, just configurable fields)

Shades

  • Member
  • Joined in 2006
  • **
  • Posts: 2,954
Re: Grabbing files from authenticated website
« Reply #4 on: September 24, 2021, 01:20 AM »
Hello

I want to grab xls files via specific links through a website that has a form authentication. Because it has an additional sms authentication step, it will not be possible to fully automate a live connection.

The session is set at 60 minutes so I am thinking if I ping/query the website every 30min, the cookie will renew/refresh.

However, this pinging will need to come from a 24/7 server and not my laptop as I cannot have it on all the time.

Is there any free solution for this?

I was thinking to create a Sharepoint Flow where it will download the xls every 30 min refreshing the cookie/auth/sessionID each time. I was hoping that I can somehow login manually for the first time via Sharepoint and then since the flow will be scheduled every 30, it will run forever refreshing the session.

Or do you have any other idea?
I was checking some of the free Azure services if they are suitable but no luck.

Thanks!

Although it isn't a safe practice, you can add your credentials directly into the URL of the site you wish to visit.

Like so:
https://<user name>:<password>@<website URL>

or in a example:
https://kalos:solak@kalosasksdonationcoder.com

If needed, you can even add a different port number:  https://kalos:solak@kalosasksdonationcoder.com:8080

The easy path is usually downhill...

Original address: https://www.donationcoder.com/forum/index.php?topic=51776.0