title: How to extract the time and title of each of the 7 main news within https://tengrinews.kz using Selenium and Python
body: <p>i need to <strong>scrape</strong> 7 main news from this website - <a href="https://tengrinews.kz" rel="nofollow noreferrer">tengrinews.kz</a>, the date, time and title of each news. I use selenium and installed firefox developer edition.</p>
  <p>I inspected the website and the 7 news are located in this structure:</p>
  <pre><code>&lt;body&gt;
     &lt;header&gt; ... some stuff &lt;/header&gt;
     &lt;main&gt;
        &lt;div class=&quot;tn-main-news-grid&quot;&gt;
  
           &lt;div class=&quot;tn-main-news-item firs-column tn-three-column tn-background-cover&quot;&gt;  
              &lt;span class=&quot;tn-main-news-title&quot; style=&quot;z-index: 1;&quot;&gt;BIG MAJOR NEWS TEXT&lt;/span&gt;
              &lt;a href=&quot;/kazakhstan_news/major-news/&quot; class=&quot;tn-link&quot;&gt;&lt;span class=&quot;tn-hidden&quot;&gt;BIG MAJOR NEWS TEXT&lt;/span&gt;&lt;/a&gt;
           &lt;/div&gt;
  
  
  
           &lt;div class=&quot;tn-main-news-item&quot;&gt; 
              &lt;span class=&quot;tn-main-news-title&quot;&gt;news1 TEXT&lt;/span&gt;
              &lt;a href=&quot;/kazakhstan_news/news1/&quot; class=&quot;tn-link&quot;&gt;
              &lt;span class=&quot;tn-hidden&quot;&gt;news1 TEXT&lt;/span&gt;&lt;/a&gt;
           &lt;/div&gt;
  
  
  
           &lt;div class=&quot;tn-main-news-item&quot;&gt; 
              &lt;span class=&quot;tn-main-news-title&quot;&gt;news2 TEXT&lt;/span&gt;
              &lt;a href=&quot;/kazakhstan_news/news2/&quot; class=&quot;tn-link&quot;&gt;
              &lt;span class=&quot;tn-hidden&quot;&gt;news2 TEXT&lt;/span&gt;&lt;/a&gt;
           &lt;/div&gt;
  
  
  
           &lt;div class=&quot;tn-main-news-item&quot;&gt; 
              &lt;span class=&quot;tn-main-news-title&quot;&gt;news3 TEXT&lt;/span&gt;
              &lt;a href=&quot;/kazakhstan_news/news3/&quot; class=&quot;tn-link&quot;&gt;
              &lt;span class=&quot;tn-hidden&quot;&gt;news3 TEXT&lt;/span&gt;&lt;/a&gt;
           &lt;/div&gt;
  
        &lt;/div&gt;
     &lt;/main&gt;
  &lt;/body&gt;
  </code></pre>
  <p>I located the div frame that contains all 7 news by xpath or css_selector . I do get firefox web element, but it's a list and it's empty!</p>
  <p>If i try locating single href or div it gives back some web element of type 'list' and this href must have text attribute(according to selenium docs) - but it gives me error &quot;no attribute text&quot;</p>
  <pre><code>from selenium import webdriver
  driver = webdriver.Firefox()
  
  driver.get(&quot;https://tengrinews.kz&quot;)
  
  css_to_big_news = 'html body div.my-app main section.tn-main-section.tn-container div.tn-main-news-container.tn-sub-container div.tn-main-news-grid div.tn-main-news-item.firs-column.tn-three-column.tn-background-cover a.tn-link'
  
  
  href_big = driver.find_elements_by_css_selector(css_to_big_news)
  print('type of href_big is %s and length is %d' %(type(href_big), len(href_big)))
  
  print(href_big[0].text) #this is wrong
  print(href_big.text()) # this is wrong with parenthesis
  </code></pre>
  <p>what's wrong?</p>