Merhaba arkadaşlar bu gün Python la internetten veri çekerek Döviz ve mining kurlarnı aldık kodlar aşşağıdaki gibidir python internetten veri çekmek hakkında eğitim isteyenler :
Discord: Er3n#3368
Sunucu: click
Gmail: erenripilt@gmail.com
İnstagram: @errenrip
Kütüphane : requests
Kütüphane : bs4
Kütüphane : colorama
-------Library Download Codes-------
Start CMD:
pip install requests
pip install bs4
pip install colorama
-----------Code-----------
import time
import requests
from bs4 import BeautifulSoup
import colorama
from colorama import Fore,Back,Style
import os
colorama.init(autoreset=True)
import time
os.system("title MİNİNG ANALİZ")
while True:
while True:#https://tr.investing.com/crypto/
html = requests.get("https://coinmarketcap.com")
html2 = requests.get("https://tr.investing.com")
soup = BeautifulSoup(html.content)
#soup2 = BeautifulSoup(html2.content)
print('\033[39m')
os.system("cls")
#/crypto/currency-pairs?c1=2046&c2=12
#BİT COİN
tagbtc = soup.findAll("a",{"href":"/currencies/bitcoin/markets/"})
os.system("cls")
for btc in tagbtc:
textbtc = btc.text
print(f"{Fore.YELLOW} 1 BİTCOİN " + textbtc + " DOLAR")
sayac = 1
if sayac == 1:
break
#ETHEREUM
tagethr = soup.findAll("a",{"href":"/currencies/ethereum/markets/"})
for ether in tagethr:
textethr = ether.text
print(f"{Fore.GREEN} 1 ETHEREUM COİN " + textethr + " DOLAR")
sayac = 1
if sayac == 1:
break
#DOE COİN
tagdog = soup.findAll("a",{"href":"/currencies/dogecoin/markets/"})
for dgc in tagdog:
textedog = dgc.text
print(f"{Fore.MAGENTA} 1 DOECOİN COİN " + textedog + " DOLAR")
sayac = 1
if sayac == 1:
break
#TETHER USDT
tagdusdt = soup.findAll("a",{"href":"/currencies/tether/markets/"})
for etdt in tagdusdt:
texteether = etdt.text
print(f"{Fore.BLUE} 1 TETHER COİN " + texteether + " DOLAR")
sayac = 1
if sayac == 1:
break
#BİNANCE COİN
tagbnb = soup.findAll("a",{"href":"/currencies/binance-coin/markets/"})
for binan in tagbnb:
textbinanceco = binan.text
print(f"{Fore.RED} 1 BİNANCE COİN " + textbinanceco + " DOLAR")
sayac = 1
if sayac == 1:
break
r = requests.get("https://kur.doviz.com/serbest-piyasa/amerikan-dolari")
soup5 = BeautifulSoup(r.content, "html.parser")
tagdolar = soup5.findAll("div",attrs={"class":"text-xl font-semibold text-white"})
for dolar in tagdolar:
textdolar = dolar.text
print(f"{Fore.GREEN} 1 Dolar " + textdolar + " Türk lirasına Eşit :(")
sayac = 1
if sayac == 1:
break
r = requests.get("https://www.bloomberght.com/doviz/euro")
soup7 = BeautifulSoup(r.content, "html.parser")
tageuro = soup7.findAll("span",attrs={"class":"upGreen"})
for euro in tageuro:
texteuro = euro.text
print(f"{Fore.GREEN } 1 Euro " + texteuro + " Türk lirasına Eşit :(")
sayac = 1
if sayac == 1:
break
time.sleep(50000)
os.system("cls")
Yorumlar
Yorum Gönder