0

This Image shows my problem

enter image description here

In the above image, the link inside the tag is the clickable link; it triggers a prompt to download the pdf file whose actual source link is https://lms.nust.edu.pk/portal/pluginfile.php/1504453/mod_resource/content/0/APG-Mutual-Evaluation-Report-Pakistan-October%202019.pdf

I am using Selenium to find the links specified by XPath like this

    bigger_tag = driver.find_elements(By.XPATH, "//div[@class='activityinstance']//a[@class='aalink'][contains(@href, 'https://lms.nust.edu.pk/portal/mod/resource/view.php?') or contains(@href, 'https://lms.nust.edu.pk/portal/mod/url/view.php')]") 

How do I extract such links from the webpage?

Since the site I am trying to scrape is a protected site and requires login credentials hence sharing the code would be fruitless here. I just want to know what's the standard procedure in a case where you can't find embedded links in the developer's tools. No Iframe, No Server request visible in the Network tab. Nothing.

Charles Han
  • 1,920
  • 2
  • 10
  • 19
Geek
  • 7
  • 2
  • 1
    It's unspecific. What library are you using? See [ask]. You need to provide a [mre]. Also post a text instead of a screenshot. – relent95 Jan 17 '23 at 01:12
  • If you are doing automation with Selenium, why not click the link with API? Anyway did you try the 'preserve log' flag? See [this answer](https://stackoverflow.com/a/12282621/1186624). – relent95 Jan 19 '23 at 09:01

0 Answers0