1

Python Version 3.9.12, Selenium Version 4.8.0

Hi, I am trying to scrape this link

Using Selenium Python

When you go to this link and press the Search Times button, you will see list of available restaurant.

#Search Button Click
search_times = driver.find_element(By.CLASS_NAME, 'finder-button.primary.ng-star-inserted')
search_times.click()
        
available = driver.find_element(By.XPATH,'/html/body/app-root/finder-layout/div/main/div/finder-list/div/div[2]/div[1]/div[2]/section')

#List of available restaurant cards
cards = available.find_elements(By.TAG_NAME, 'finder-list-card')

Each finder-list-card is clickable since has an anchor tag with href and i found that:

<a _ngcontent-ysa-c53 finderlinkid class="anchor ng-star-inserted" title tabindex="0" target="_self" href="/en-ca/dining/disney-california-adventure/carthay-circle-lounge/" name="&amp;amp;lid=DLR_List_Dining_BarsLoungesReservationsAcceptedCarthayCircleLoungeAlfresco">

since it has href so I am able to get the link using elem.get_attribute("href") But I don't need that link, there is button where time is mentioned as shown in this image. I need that url because that will take to book the reservation (you'll probably see a singup page when you click that button)

<a _ngcontent-ysa-c55 class="offer ng-tns-c55-26 ng-star-inserted" tabindex="0">

Since this anchor does not show any href so I am unable to get the link from elem.get_attribute("href").

Is there any way I could find the hidden url behind that time button as shown in image. Please suggest anyone. Thanks in advance

1
  • what's inside the a tag? Commented Mar 11, 2023 at 17:35

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.