Lately I have been learning Python scraping. The part of the source code:
div class='search__grid'>
  <div class="photos">
    <div class='photos__column'>
      <div class='hide-featured-badge hide-favorite-badge'>
        <article class='photo-item photo-item--overlay'>
          <a class="js-photo-link photo-item__link" href="/photo/person-holding-black-ceramic-pig-coin-bank-3943723/">    
            <img srcset="https://images.pexels.com/photos/3943723/pexels-photo-3943723.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500 1x, https://images.pexels.com/photos/3943723/pexels-photo-3943723.jpeg?auto=compress&cs=tinysrgb&dpr=2&w=500 2x" 
            class="photo-item__img" alt="Person Holding Black Ceramic Pig Coin Bank" data-image-width="3811" data-image-height="5716" 
            data-big-src="https://images.pexels.com/photos/3943723/pexels-photo-3943723.jpeg?auto=compress&cs=tinysrgb&h=750&w=1260" />
I want to collect the the image link in img.srcset.data-large-src. However, I couldn't find the div element by using:
find_element_by_class_name('search__grid')
nor by_tag_name(div.search_grid) nor by_css_selector('divsearch_grid'). For example, an error occurred as I used by_class_name as below...
no such element: Unable to locate element: {"method":"css selector","selector":".search__grid"}
I didn't even use the css selector...!
Another question is how could I extract only the data-big-src link from the srcset attribute?
I look forward to your opinions. Thanks in advance.
 
     
     
    