Is it possible to do something if someone click a link? I need to know when someone clicking at that link because if so, I want to execute some code.
a = soup.find('a') #there is only one link in the page
So in pseudocode I need something like this:
if a.clicked() == "true":
print "link clicked"
No, clicking is an event in a web browser, not something that happens in the HTML structure for a page.
When you use BeautifulSoup, you load the same HTML a browser loads, but there is nothing connecting that HTML structure to what is loaded into some random user’s browser, which handles the link clicking.