本文介绍如何使用Python获取美元人民币实时汇率
# -*- coding: utf-8 -*-
# @Author: 比特量化
# @Date: 2017-08-26
import re
import json
import urllib.request
url = "http://webforex.hermes.hexun.com/forex/quotelist?code=FOREXUSDCNY&column=Code,Price"
req = urllib.request.Request(url)
f = urllib.request.urlopen