腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
0
回答
使用
urllib.request.urlopen
(
stock_price_url
).
read
().
decode
()
时
没有
任何
线索
python
、
csv
、
url
我正在尝试youtube上的教程中的以下代码:source_code =
urllib.request.urlopen
(
stock_price_url
).
read
().
decode
() 什么都
没有
发生,并且我
没有
收到
任何
错误消息。我
使用
的是MacOS和Python3.5.2。有什么建议吗?也许我的python安装出了什么问题?instrument/1.0/'+stock+'
浏览 5
提问于2016-12-21
得票数 1
1
回答
如何从互联网上获取数据,以便与matplotlib一起
使用
?
python-3.x
、
matplotlib
、
urllib
matplotlib.pyplot as pltimport urllibdef graph_data(stock): source_code =
urllib.request
浏览 2
提问于2017-06-20
得票数 0
回答已采纳
1
回答
将字符串转换为matplotlib日期进行绘图
python-3.x
、
numpy
、
matplotlib
、
data-science
import datetime ax1=plt.subplot2grid((1,1),(0,0)) source_code =
urllib.request.urlopen
(
stock_price_url
).
read
()
浏览 1
提问于2020-03-17
得票数 0
1
回答
在numpy解包中将字符串转换为日期
python-3.x
、
numpy
、
matplotlib
、
data-science
、
urllib
在本教程中,我
使用
了一只股票的yahoo数据集。encoding='utf-8'): def bytesconverter(b): source_code =
urllib.request.urlopen
(<em
浏览 22
提问于2020-03-17
得票数 0
3
回答
如何
使用
datestr2num而不是strpdate2num
python
、
numpy
、
matplotlib
Matplotlib 3.1中不推荐
使用
strpdate2num类,并将在3.3中删除该类。
使用
time.strptime、dateutil.parser.parse或datestr2num代替。只是不断地获得错误,最常见的错误消息是ValueError:(“未知字符串格式:”,'%Y-%m-%d') strconverter = md
浏览 0
提问于2019-08-08
得票数 3
回答已采纳
1
回答
使用
Python导入CSV
python
、
csv
、
matplotlib
但是,在我运行代码后,出现了attributeError: modules对象
没有
'pyplot‘属性,但是csv是可用的。有什么问题吗?strconverter = mdates.strpdate2num(fmt) s = b.
decode
return strconverter(s)
浏览 0
提问于2015-09-12
得票数 0
1
回答
Python3.5.2从internet加载数据
python
、
python-3.x
、
numpy
、
matplotlib
有
没有
人知道如何在我的python版本中实现这个目标,这样我就可以继续我最初的目标--学习绘图?).
read
().
decode
() split_source = source_code.split('\n') AttributeError: module'urllib'
浏览 2
提问于2017-02-02
得票数 0
回答已采纳
1
回答
Python -在尝试多次访问API
时
发生错误
python
、
attributeerror
(url) as url:stats = stats[0] check = json.loads(url.
read
().
decode
()) rankDifferencePrograms\Python\Python36\lib\urllib\request.py"
浏览 0
提问于2018-04-29
得票数 1
回答已采纳
4
回答
tf.contrib.learn load_csv_with_header不在TensorFlow 1.1中工作
python
、
tensorflow
、
tflearn
当我检查API
时
,我
没有
发现
任何
关于load_csv_with_header()的信息。他们是否在
没有
更新教程的情况下在最新版本中修改了它?我怎么才能解决这个问题?编辑:如果这有
任何
区别的话,我
使用
Python3.6。
浏览 1
提问于2017-05-04
得票数 3
回答已采纳
3
回答
如何在try/除块公共中设置变量?
python
、
python-3.x
、
scope
、
try-except
import urllib.request url = "http://www.google.com"except (ValueError, RuntimeError, TypeError, NameError): print
浏览 4
提问于2014-09-04
得票数 83
回答已采纳
2
回答
为什么Python在
没有
"print“命令的情况下也会输出一些内容?
python
、
python-3.x
我
使用
Python的编辑器用Python空闲编写了以下代码print(
urllib.request.urlopen
('https://github.com').
read
().
decode
('utf-8'))import urllib.request
urllib.request.urlopen
('https://gi
浏览 3
提问于2017-11-21
得票数 1
回答已采纳
2
回答
AttributeError:'HTTPResponse‘对象
没有
属性’拆分‘
python
、
python-3.x
AttributeError:'HTTPResponse‘对象
没有
属性’拆分‘ import urllib.requestfrom bs4import BeautifulSoup thesymbolslistq=" + thesymbolslist[i] + "&i=10&p=25m&a
浏览 3
提问于2016-05-22
得票数 3
回答已采纳
3
回答
使用
urllib.request发布接收JSON
python
、
json
、
python-3.x
我一直在
使用
几个web,但这个API让我感到困惑。我想不出我到底出了什么问题。reader = codecs.getreader("utf-8")obj = json.load(response.
decode
("utf-8"))这意味着: AttributeErro
浏览 1
提问于2015-09-18
得票数 1
回答已采纳
1
回答
为什么urllib.request这么慢?
python-3.x
、
urllib
当我
使用
urllib.request.
decode
从JSON格式获取python字典
时
,花费的时间太长了。然而,看看这些数据,我意识到我甚至不想要所有的数据。或者,如果有
任何
更快的方法来获得数据,也可以工作? 或者这仅仅是一个连接的问题,无法帮助?同样是
urllib.request.urlopen
的问题,或者是json.loads或.
read
().
decode
()的问题。这个问题的主要症状是在尝试接收信息
时
大约需要5秒(不到1页的非格式化字典)。另
浏览 1
提问于2019-02-12
得票数 2
回答已采纳
2
回答
Python 3中for -循环的数据类型和文档
python
、
string
、
python-3.x
、
utf-8
我正在读取Python 3中
没有
分隔符的乱七八糟的JSON数据(数据中不时有日语/中文字符)。我正在阅读这些数据:data =
urllib.request.urlopen
(url).
read
()它现在返回字节
浏览 8
提问于2016-06-24
得票数 1
回答已采纳
1
回答
Matplotlib修复轴-日期太多
python
、
datetime
、
matplotlib
我有大数据作为csv文件,它有太多的日期,所以当我绘制它
时
,x轴会写入所有这些数据,比如f.e :从2000-12-24到2017-12-24,还有y轴。我试过
使用
一个集合,但是这个集合需要排序,问题是当我对它进行排序时,Y中的数据不是
任何
排序日期的数据。import matplotlib.pyplot as pltimport numpy as npopenp = [] high = []
浏览 0
提问于2018-01-04
得票数 4
1
回答
在Python中我应该如何做这个错误?
python
、
findall
# -*- coding: cp949 -*- import revalue=
urllib.request.urlopen
(url).
read
() par='<title>(.+?)
浏览 2
提问于2015-07-28
得票数 0
回答已采纳
2
回答
将字典保存到CSV文件
python
、
csv
、
dictionary
我有一个字典,我正在尝试
使用
以下代码将数据写入文件currencies.csv :字典的代码是 response =
urllib.request.urlopen
('http://www.maths.manchester.ac.uk/~vsego/python/currencies.json') html = response.
read
().
decode
currencies.items(
浏览 4
提问于2015-04-27
得票数 1
回答已采纳
1
回答
Ubuntu18.04中
urllib.request.urlopen
的奇怪行为
python-3.x
、
urllib
我一直在
使用
Coursera上python的在线课程(这不是家庭作业),并且在一些urls的
urllib.request.urlopen
上遇到了问题。对于硬编码到以下代码中的url,命令
urllib.request.urlopen
(serviceurl,context=ctx).
read
().
decode
()超时。奇怪的是,如果我包含一个超时参数(例如,
urllib.request.urlopen
(serviceurl,timeout=1,context=ctx).
read</e
浏览 28
提问于2019-04-21
得票数 0
1
回答
如何在Python3.5中从一个URL查找和打印HTML链接的页面标题?
python-3.x
、
html-parsing
我
没有
很多
使用
Python的经验,但我得到了一些帮助,阅读了人们编写的许多其他程序,目前有以下内容:import urllib.request(req)pageParse.feed(pageRequestString)欢迎
任何
帮助。(base).<e
浏览 2
提问于2016-04-25
得票数 1
点击加载更多
热门
标签
更多标签
云服务器
ICP备案
对象存储
实时音视频
云点播
活动推荐
运营活动
广告
关闭
领券