-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtracker.py
More file actions
122 lines (94 loc) · 4.84 KB
/
tracker.py
File metadata and controls
122 lines (94 loc) · 4.84 KB
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
122
'''
coded by:
)
( /( ( ( ( ) (
)\()))\ )\ ) )\ /(( )\
((_)\((_)(()/(((_)(_))\((_)
| |(_)(_) )(_))(_)_)((_)(_)
| '_ \| || || || |\ V / | |
|_.__/|_| \_, ||_| \_/ |_|
|__/
# Redes sociales:
# Youtube:
https://www.youtube.com/channel/UCRitJ4OwEQmpk_aEPK9INkw
# Instagram:
https://www.instagram.com/b.i.y.i.v.i/
# TikTok:
https://www.tiktok.com/@biyivi
# github: biyivi
https://github.com/biyivi
,,.*((####(###(//***, ***
/./#################(/********** .(
.(#####################(/************** *.
,%########################(/***************** ,
.##########################(//********************,
,(#############################/*********************.,
*##############################//*********************** .
/###############################(/************************ ,
*###############################(/**************************
.###############################(//****** . .. . ... ******.
.################################(((/*** *********** .*** *
/(################################(//****************************
,##################################(/*********** *******
,#########(#########(/##############//***** *, .******** *****
,########( .##((#########(/**. ,*****. .*************/
,#################/ .########(/ ********* *************/,
/(####################/ .#####(/*******/*, .. ,***/*.***,*
((###########(/***/((#############(/***, ,.****,,***,,,.. .****.(
./##########/. ,##########(/**. ,,. ,**..
,################################//****, ..,,*, , /*********
################################(/************ ************
((###############################(//*********** ************(
,###############################(/***********, ***********.
*(#############################(/******* *************** .*/,
.#############################(/******** . ..,,. .**.
.(##################. ,#######(/** * .,,,,*,,,,,,, */*.
,/##################### ,(###(. ,,,,,,,,,,,,,,, ,, ***,
(//#########################(*,,,,,,,,,,,,,,. ,.,* ,/
,*,#######################(/*,,,,,,,,.. ,,,.**. /
.(,####################/. ..,,, .. ** *.
/(*/###################(**,,... .,.**.* ,./
.#,(##################(*,,,,, **** **./
*(,(###############/**********, ** * /
//#,##############(/******* *** *,(
#,#*(###########//********,,*.(
.(#/#########//****** **.
.(########//*****,.*
,.*(##(//* ./
'''
import requests
import tkinter as tk
from datetime import datetime
from tkinter import *
canvas= tk.Tk()
canvas.config(bg="black")
canvas.geometry("600x300")
canvas.title("Bitcoin Tracker")
f1=("poppins", 24, "bold")
f2=("poppins", 22, "bold")
f3=("poppins", 18, "normal")
label =tk.Label(canvas, text = "Precio del Bitcoin", font =f1)
label.config(fg="yellow")
label.config(bg="black")
label.pack(pady = 20)
label =tk.Label(canvas, text = "by: biyivi")
label.config(fg="magenta"),label.pack(anchor=CENTER)
label.config(bg="black")
labelPrice= tk.Label(canvas, font = f2)
labelPrice.pack(pady=20)
labelTime= tk.Label(canvas, font = f3)
labelTime.pack(pady=20)
def trackBitcoin():
url="https://min-api.cryptocompare.com/data/price?fsym=BTC&tsyms=USD,JPY,EUR"
response=requests.get(url).json()
price= response["USD"]
time = datetime.now().strftime("%H:%M:%S")
labelPrice.config(text ="Precio [En tiempo real]: "+str(price)+"$")
labelPrice.config(fg="white")
labelPrice.config(bg="black")
labelTime.config(text="Hora actual: " + time)
labelTime.config(fg="white")
labelTime.config(bg="black")
canvas.after(1000, trackBitcoin)
trackBitcoin()
canvas.mainloop()