Skip to content

Instantly share code, notes, and snippets.

@lexifdev
Last active June 3, 2016 12:39
Show Gist options
  • Save lexifdev/82d0710c316a0a77e07609851367822e to your computer and use it in GitHub Desktop.
Save lexifdev/82d0710c316a0a77e07609851367822e to your computer and use it in GitHub Desktop.
import json
import requests
from bs4 import BeautifulSoup as Soup
response = requests.get('https://www.korbit.co.kr/eth_market')
soup = Soup(response.text, 'lxml')
order = soup.select_one('div[data-react-class=MarketDataBlock]')
props_str = order['data-react-props']
props = json.loads(props_str)
current_price_str = props['market_data']['korbit_current_eth_price']
current_price = int(current_price_str)
print(current_price)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment