-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdol.py
54 lines (42 loc) · 902 Bytes
/
dol.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import re
import json
data={
"price_dollar_rl":"USDREAL",
"price_dollar_realtime":"USDREAL",
"sekee":"sekee",
"sekeb":"sekeb",
"rob":"robseke",
"nim":"nimseke",
"gerami":"sekeg",
"btc-irr":"btc",
"eth-irr":"eth",
"dash-irr":"dash",
"xrp-irr":"xrp",
"eos-irr":"eos",
"xlm-irr":"xlm",
"usdt-irr":"usdex"
}
def loadem():
#data={}
# Load the product dictionary
#with open('tgju.tabaluga') as f:
# data = json.load(f)
#Parse the Raw feed for product proices
searchfile=open("Feed.htm",encoding="utf-8")
return searchfile
def compacter():
searchfile=loadem()
a=[]
try:
for line in searchfile:
try:
if "window.source_price" in line:
c1=str(re.findall(r"'([^']*)'",line)).replace(']','').replace('[','')
code1=(c1.replace('\'','')).split(',')
a.append(code1)
except Exception as e:
print (e)
except Exception as e:
pass
searchfile.close()
return a