-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path다음_실시간.py
121 lines (119 loc) · 1.64 KB
/
다음_실시간.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
import requests, time
from fake_useragent import UserAgent
codes = ["376180",
"373200",
"285490",
"365900",
"327260",
"073190",
"003800",
"318410",
"073570",
"263920",
"026040",
"054630",
"369370",
"317870",
"368600",
"093240",
"009270",
"003200",
"111110",
"016090",
"093050",
"002070",
"102280",
"105630",
"084870",
"016450",
"020000",
"090370",
"001460",
"001070",
"011300",
"000950",
"008500",
"001465",
"007980",
"005820",
"005800",
"383220",
"003610",
"001770",
"025820",
"004020",
"005490",
"001230",
"004560",
"000670",
"010130",
"016380",
"024090",
"012800",
"069460",
"084010",
"058430",
"001780",
"008420",
"026940",
"021050",
"002690",
"032560",
"014280",
"002220",
"103140",
"001430",
"104700",
"002240",
"139990",
"008350",
"009190",
"014285",
"001770",
"025820",
"004020",
"005490",
"001230",
"004560",
"000670",
"010130",
"058430",
"016380",
"024090",
"069460",
"084010",
"012800",
"001780",
"021050",
"014280",
"008420",
"026940",
"002690",
"032560",
"002220",
"103140",
"008350",
"001430",
"104700",
"002240",
"139990",
"009190",
"014285"]
url_origin = "https://finance.daum.net/api/quotes/A"
user_agent = UserAgent()
headers = {
'Referer': 'http://finance.daum.net/',
'User-Agent': user_agent.random
}
while True:
#url = "https://finance.daum.net/api/quotes/A035720?summary=false&changeStatistics=true"
for code in codes:
response = requests.get(url_origin+code, headers=headers)
#print(response)
jsonObj = response.json()
print(jsonObj['askPrice'])
#print(jsonObj['bidPrice'])
# print(jsonObj['tradePrice'])
#print(jsonObj['accTradeVolume'])
# print('------')
time.sleep(1)