Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1145,7 +1145,6 @@ def fetch_and_store_data_market():
|
|
| 1145 |
latest_doc = market_price_data.find_one(sort=[("Reported Date", -1)])
|
| 1146 |
if latest_doc and "Reported Date" in latest_doc:
|
| 1147 |
latest_date = latest_doc["Reported Date"]
|
| 1148 |
-
st.write(latest_date)
|
| 1149 |
else:
|
| 1150 |
latest_date = None
|
| 1151 |
|
|
@@ -1158,8 +1157,6 @@ def fetch_and_store_data_market():
|
|
| 1158 |
to_date = (datetime.now() - timedelta(days=1)).strftime('%d %b %Y')
|
| 1159 |
from_date_obj = datetime.strptime(from_date, '%d %b %Y')
|
| 1160 |
to_date_obj = datetime.strptime(to_date, '%d %b %Y')
|
| 1161 |
-
st.write("To Date Object: "to_date_obj)
|
| 1162 |
-
st.write("From Date Object: ", from_date_obj)
|
| 1163 |
if to_date < from_date:
|
| 1164 |
print("Data already scraped")
|
| 1165 |
return None
|
|
|
|
| 1145 |
latest_doc = market_price_data.find_one(sort=[("Reported Date", -1)])
|
| 1146 |
if latest_doc and "Reported Date" in latest_doc:
|
| 1147 |
latest_date = latest_doc["Reported Date"]
|
|
|
|
| 1148 |
else:
|
| 1149 |
latest_date = None
|
| 1150 |
|
|
|
|
| 1157 |
to_date = (datetime.now() - timedelta(days=1)).strftime('%d %b %Y')
|
| 1158 |
from_date_obj = datetime.strptime(from_date, '%d %b %Y')
|
| 1159 |
to_date_obj = datetime.strptime(to_date, '%d %b %Y')
|
|
|
|
|
|
|
| 1160 |
if to_date < from_date:
|
| 1161 |
print("Data already scraped")
|
| 1162 |
return None
|