title: Python 3: How to web scrape text from div that contains multiple class values
body: <p>I'm trying to web scrape a website (<a href="https://www.ubereats.com/christchurch/food-delivery/mcdonalds-sydenham/lhkaGtFyS1m9ddu1R8mCIg/" rel="nofollow noreferrer">Here is the link to website</a>), but the div in the page seems to have multiple class attributes which is making me hard to scrape the data. I tried to look for historical questions posted on Stackoverflow, but could not find an answer that I wanted. The below is part of the code I extracted from the website:</p>
  
  <pre><code>&lt;div data-reactid="118"&gt;
    &lt;div class="ue-ga base_ ue-jk" style="margin-left:-24px;margin-bottom:;" data-reactid="119"&gt;
      &lt;div style="display: flex; flex-direction: column; width: 100%; padding-left: 24px;" data-reactid="120"&gt;
        &lt;div class="ue-a3 ue-ap ue-a6 ue-gb ue-ah ue-n ue-f5 ue-ec ue-gc ue-gd ue-ge ue-gf base_ ue-jv ue-gz ue-h0 ue-h1" data-reactid="121"&gt;
          &lt;div class="ue-a6 ue-bz ue-gb ue-ah ue-gg ue-gh ue-gi" data-reactid="122"&gt;
            &lt;div class="ue-bn ue-bo ue-cc ue-bq ue-g9 ue-bs" title="Want to extract this part" data-reactid="123"&gt;
              Want to extract this part
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>What I want to extract is the text where it states "<strong>Want to extract this part</strong>". I did think of scraping the data through data-reactid, but different pages have different data-reactid number assigned so wasn't a good idea. I also want to inform that class names are not unique.</p>
  
  <p>Can anyone guide me through this? Much appreciated.        </p>