IoannisTr commited on
Commit
b99cb6c
1 Parent(s): be79800

Update stocks.py

Browse files
Files changed (1) hide show
  1. stocks.py +3 -3
stocks.py CHANGED
@@ -1,4 +1,4 @@
1
- from asyncio.windows_events import NULL
2
  from configparser import ParsingError
3
  from logging import raiseExceptions
4
  #from sympy import comp
@@ -53,7 +53,7 @@ class Stock_Data(object):
53
  '''
54
  This method will get the current price only if the market is open.
55
  '''
56
- current_price = NULL
57
  if self.status_getter(Ticker) == "Open":
58
  current_price = float(soup.find("bg-quote", class_="value").text.replace(',',''))
59
  return current_price
@@ -111,7 +111,7 @@ class Stock_Data(object):
111
  if counter <= 17:
112
  ticker = company_ticker
113
  title = art.text.strip()
114
- if title is NULL:
115
  break
116
  rows.append([ticker, title])
117
  counter = counter + 1
 
1
+ #from asyncio.windows_events import NULL
2
  from configparser import ParsingError
3
  from logging import raiseExceptions
4
  #from sympy import comp
 
53
  '''
54
  This method will get the current price only if the market is open.
55
  '''
56
+ current_price = None #NULL
57
  if self.status_getter(Ticker) == "Open":
58
  current_price = float(soup.find("bg-quote", class_="value").text.replace(',',''))
59
  return current_price
 
111
  if counter <= 17:
112
  ticker = company_ticker
113
  title = art.text.strip()
114
+ if title is None:#NULL:
115
  break
116
  rows.append([ticker, title])
117
  counter = counter + 1