title: ValueError: invalid literal for int() with base 10: '196.41'
body: <p>I don't understand why it works with different scenarios, but not with this one.
  Basically, some gentleman helped me out <a href="https://stackoverflow.com/questions/47745106/for-loop-in-function-while-true-difficulty-to-understand">HERE</a> with improving my code to scrape weather, which works perfectly. I then tried to do the same to scrape an ETH value which is in a span tag <code>&lt;span class="text-large2" data-currency-value=""&gt;$196.01&lt;/span&gt;</code>. So, I followed the same technique in the code, replaced the fields, and was hoping for it to work.</p>
  
  <p>The code is here:</p>
  
  <pre><code>import requests
  from BeautifulSoup import BeautifulSoup
  import time
  
  url = 'https://coinmarketcap.com/currencies/litecoin/'
  
  def ltc():
      while (True):
          response = requests.get(url)
          soup = BeautifulSoup(response.content)
          price_now = int(soup.find("div", {"class": "col-xs-6 col-sm-8 col-md-4 text-left"}).find(
          "span", {"class": "text-large2"}).getText())
          print(u"LTC price is: {}{}".format(price_now))
          # if less than 150
          if 150 &gt; price_now:
              print('Price is Low')
          # if more than 200
          elif 200 &lt; price_now:
              print('Price is high')
  
  if __name__ == "__main__":
      ltc()
  </code></pre>
  
  <p>The output looks like this:</p>
  
  <pre><code>Traceback (most recent call last):
    File "test2.py", line 24, in &lt;module&gt;
      ltc()
    File "test2.py", line 13, in ltc
      "span", {"class": "text-large2"}).getText())
  ValueError: invalid literal for int() with base 10: '196.01'
  </code></pre>
  
  <p>Then, I finally tried it this way; but from here I get false positives, but no errors. It prints whatever it wants </p>
  
  <pre><code>import requests
  from bs4 import BeautifulSoup
  import time
  
  url = 'https://coinmarketcap.com/currencies/litecoin/'
  
  def liteCoin():
      while (True):
          response = requests.get(url)
          html = response.text
          soup = BeautifulSoup(html, 'html.parser')
          value = soup.find('span', {'class': 'text-large2'})
          print(''.join(value.stripped_strings))
          if 150 &gt; value:         # if less than 150
              print('Price is Low!')
          elif 200 &lt; value:       # if more than 200
              print('Price is High')
          else:
              print('N/A')
          time.sleep(5)
  
  if __name__ == "__main__":
      liteCoin()
  </code></pre>
  
  <p>Would the problem be that the value of the ETH has a <code>$</code> sign inside the <code>span tag</code>? And, that way the program doesn't know what to do with string?</p>