title: Using selenium in python for capturing the links in a web
body: <p>I'm trying to capture the links of a webpage using Selenium in Python. My initial code is:</p>
  <pre><code>from selenium import webdriver
  from selenium.webdriver.support.ui import WebDriverWait
  from selenium.webdriver.support import expected_conditions as EC
  from selenium.webdriver.common.by import By
  import pandas as pd
  import time
  from tqdm import tqdm
  from selenium.common.exceptions import NoSuchElementException
  driver.get('https://www.lovecrave.com/shop/')
  </code></pre>
  <p>Then, I identified all the products (12) in the web by using:</p>
  <pre><code>perso_flist = driver.find_elements_by_xpath(&quot;//p[@class='excerpt']&quot;)
  </code></pre>
  <p>Then, I want to capture the links for each product by using:</p>
  <pre><code>listOflinks = []
  for i in perso_flist:
      link_1=i.find_elements_by_xpath(&quot;.//a[@href[1]]&quot;)
      listOflinks.append(link_1)
  print(listOflinks
  </code></pre>
  <p>And my output looks like:</p>
  <pre><code>print(listOflinks)  # 12 EMPTY VALUES
  [[], [], [], [], [], [], [], [], [], [], [], []]
  </code></pre>
  <p>What is wrong with my code? I'll appreciate your help.</p>