12
Browse filesimport streamlit
import requests_html
session = requests_html.HTMLSession()
h =session.get('http://cdn.tsetmc.com/api/ClosingPrice/GetMarketMap?market=0&size=1360§or=0&typeSelected=1')
j = h.json()
for i in j:
if i["percent"] > float(2) :
print(f'{i["lVal18AFC"]} - {i["color"]}')
else:
print('mosbat')
# if i['priceMin'] < '1200':
# print(i["lVal30"])
# if i["lVal30"] == 'سايپا':
# print(f'{i["lVal18AFC"]} ______ {i["lVal30"]} ______ {i["percent"]}')
# else:
# print('هیچی پیدا نشد')
sss.py
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit
|
2 |
+
import requests_html
|
3 |
+
session = requests_html.HTMLSession()
|
4 |
+
h =session.get('http://cdn.tsetmc.com/api/ClosingPrice/GetMarketMap?market=0&size=1360§or=0&typeSelected=1')
|
5 |
+
j = h.json()
|
6 |
+
for i in j:
|
7 |
+
if i["percent"] > float(2) :
|
8 |
+
print(f'{i["lVal18AFC"]} - {i["color"]}')
|
9 |
+
else:
|
10 |
+
print('mosbat')
|
11 |
+
|
12 |
+
|
13 |
+
|
14 |
+
|
15 |
+
# if i['priceMin'] < '1200':
|
16 |
+
# print(i["lVal30"])
|
17 |
+
|
18 |
+
# if i["lVal30"] == 'سايپا':
|
19 |
+
# print(f'{i["lVal18AFC"]} ______ {i["lVal30"]} ______ {i["percent"]}')
|
20 |
+
# else:
|
21 |
+
# print('هیچی پیدا نشد')
|
22 |
+
|