Created
October 18, 2018 11:39
-
-
Save ozgurkaracam/5e70f969d611aacbfc29db89f1032c81 to your computer and use it in GitHub Desktop.
BeautifulSoup4 ile doviz.com veri çekme
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bs4 import BeautifulSoup | |
import time | |
import urllib.request as urlac | |
while True: | |
url = "https://www.doviz.com/bitcoin" | |
url_oku = urlac.urlopen(url) | |
soup = BeautifulSoup(url_oku, 'html.parser') | |
vericek = soup.find_all('span',attrs={'class':'color-red'}) | |
#2 | |
degisim= soup.find_all('span',attrs={'class':'btn-small bgred'}) | |
print("Bitcoin/ABD Doları :",vericek[0].text," Değişim:",degisim[0].text) | |
print("Bitcoin/Türk Lirası :", vericek[1].text, " Değişim:", degisim[1].text) | |
time.sleep(15) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment