title: using a for loop for web scraping - cannot "pass" certain data
body: <p>The following code is supposed to scrape the rating and the date the rating was posted.</p>
  
  <p>The issue here is, that employees answers the negative reviews, and the date of their post is scraped as well. So when I scrape the site, there's an uneven number of ratings and dates (20 ratings vs 24 dates), as four of the dates belong to the answers given by employees.</p>
  
  <p>In the code I try to "pass" every time the class "ugc-brand-response" shows up which is for the employee answers. So if no ugc class is met "pass" and if not just continue - but none of the data gets stored. Not even the first couple of reviews. </p>
  
  <p>I've learned so much from reading other peoples questions and answers. Thanks for this awesome community. </p>
  
  <pre><code>import requests
  import time
  from bs4 import BeautifulSoup
  
  headers = {'User-Agent':'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36'}
  url = "https://www.bestbuy.com/site/reviews/jabra-elite-85h-wireless-noise-canceling-over-the-ear-headphones-black/6335100?variant=A"
  
  url_get = requests.get(url, headers=headers)
  print(url_get.status_code)
  soup = BeautifulSoup(url_get.content, 'lxml')
  
  
  rating_n_date=[] 
  
  for rating in soup.find_all(attrs={"class": "c-review-average"}):     
      rating_n_date.append(rating .text)
  for date in soup.findAll(attrs={"class":"submission-date"}):
      if "class" == "ugc-brand-response" in date:
          pass    
      else:
          continue
      rating_n_date.append(date.text)
  time.sleep(2)
  print(rating_n_date)
  </code></pre>
  
  <p>Here's the data including the :</p>
  
  <pre><code>&lt;li class="review-item" tabindex="-1"&gt;&lt;div class="row"&gt;&lt;div class="hidden-xs hidden-sm col-md-3"&gt;&lt;div class="undefined ugc-author v-fw-medium body-copy-lg"&gt;Jimmy&lt;/div&gt;&lt;ul class=" ugc-badge-list"&gt;&lt;li class="visible-xs-inline-block visible-sm-inline-block visible-md-block visible-lg-block"&gt;&lt;span class="c-overlay-wrapper"&gt;&lt;span class="overlayTrigger"&gt;&lt;button aria-expanded="false" aria-controls="ugc-badge-overlay-bf28b82b-76f5-3c85-897e-598a91bbd8a8-0" aria-owns="ugc-badge-overlay-bf28b82b-76f5-3c85-897e-598a91bbd8a8-0" data-track="Custom"&gt;&lt;div class="ugc-my-bby-badge"&gt;&lt;img alt="My Best Buy® Member" src="https://www.bestbuy.com/~assets/bby/_com/ugc-raas/ugc-common-assets/ugc-badge-mybby-core.svg"&gt;&lt;/div&gt;&lt;/button&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="col-xs-12 col-md-9"&gt;&lt;div class="c-ratings-reviews v-medium"&gt;&lt;p class="sr-only"&gt;Rating: 2 out of 5 stars&lt;/p&gt;&lt;span class="c-stars c-stars-medium" alt="40%" aria-hidden="true"&gt;&lt;span class="unfilled"&gt;&lt;/span&gt;&lt;span class="filled" style="width:40%"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="c-reviews"&gt;&lt;span class="c-review-average" aria-hidden="true"&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 id="review-id-bf28b82b-76f5-3c85-897e-598a91bbd8a8" class="ugc-review-title c-section-title heading-5 v-fw-medium  "&gt;A disappointment: low volum, weak bass, distorts&lt;/h3&gt;&lt;div class="disclaimer"&gt;Posted &lt;time class="submission-date" title="Apr 28, 2019 11:29 PM"&gt;3 months ago&lt;/time&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Here's the code I don't want - the employee answer:</p>
  
  <pre><code>&lt;ul class="ugc-brand-response-list"&gt;&lt;li&gt;&lt;div class="row"&gt;&lt;div class="col-sm-12 col-md-9 col-md-offset-3"&gt;&lt;div class="ugc-brand-response"&gt;&lt;h4 class=" c-section-title body-copy-lg v-fw-medium  "&gt;Brand response&lt;/h4&gt;&lt;p class="body-copy-lg"&gt;Jabra&lt;/p&gt;&lt;div class="disclaimer"&gt;&lt;time class="submission-date" title="Apr 29, 2019 8:46 AM"&gt;3 months ago&lt;/time&gt;&lt;/div&gt;&lt;div class="ugc-brand-response-body body-copy-lg"&gt;&lt;p class="pre-white-space"&gt;
  Hello Jimmy - We were sorry to learn that the Jabra Elite 85h did not meet your expectations.  As the Elite 85h is a relatively new product, it is very important that you update the firmware in the headphones as often as necessary to keep up-to-date.  We are constantly improving all aspects of the Elite 85h through firmware updates.  If you have any specific questions or concers, we invite you to contact us directly by completing the web form at&amp;nbsp;&lt;a href="https://www.jabra.com/ServiceMenu/contact/ContactJabraSupport/ContactJabraSupportConsumer" target="_blank" rel="nofollow noopener noreferrer" style="word-break: break-all;"&gt;https://www.jabra.com/ServiceMenu/contact/ContactJabraSupport/ContactJabraSupportConsumer&lt;/a&gt;, or by giving us a call - we love to help!  Thank you.
  &lt;img src="https://s3.amazonaws.com/stratos-logos/logos/Jabra.jpg" alt="Jabra" title="Jabra" style="display: block !important; margin-top: 2em !important; border: 1px solid #ccc !important; padding: 2px !important; background-color: white !important;"&gt;
  &lt;!--[if ReviewResponse]&gt;&lt;![endif]--&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
  </code></pre>