0

I am trying to determine where a link with "javascript:void(0)" is sending me. I will make this question quite broad since maybe the solution is outside of my imagination: I am trying to log-in via python into a website. I have done this before on a different website so the general routine is clear. To log-in to this specific website I need 3 keys. 2 of those keys are generated once you press the let's call it "to-login" button and are handed over in the get-request.

I do not understand how I can get those 2 keys, because I can't "follow" the javascript:void(0) in order to get the keys, can I?

I am more used to hidden input keys.

<div class="header-sidebar-quicklinks">
    <a href="javascript:void(0)" class="header-sidebar-quicklink header-sidebar-quicklink-login">
        <!----> 
        <span>Login</span>
    </a>
</div>

This is some example code.

The main objective therefore is to get those 2 keys which are generated before entering the login page.

Natan
  • 728
  • 1
  • 7
  • 23
  • 1
    It is a stub. The actual action that happens when you click that link has been defined dynamically by JavaScript code. You can see in the developer console that the click event is handled (elsewhere). It will require some digging in the code to find out how the click event is actually handled. – trincot May 22 '21 at 11:20
  • I am semi aware of that @Ivar, but I don't know how to "follow" it. As in: How does a "catch" or however you call it look like? How does a possible handler look like? So I have something to look out for – Natan May 22 '21 at 11:23
  • @Natan the code can be anything, you will need to search in the javascript. It will probably have something like `addEventListener("click", func_to_be_run())`. This link gives a good explanation: https://www.w3schools.com/js/js_htmldom_eventlistener.asp – Sid May 22 '21 at 11:28
  • You should give us an example of the website you are trying to login to. – Sid May 22 '21 at 11:28
  • @Sid No, questions on Stack Overflow need to be answerable without visiting any links. – Ivar May 22 '21 at 11:29
  • https://degenesis.com/ this is the webpage. The login button is at the right. – Natan May 22 '21 at 11:39

0 Answers0