首页
注册
登录
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请
登录
推荐学习书目
›
Learn Python the Hard Way
Python Sites
›
PyPI
- Python Package Index
›
http://diveintopython.org/toc/index.html
›
Pocoo
值得关注的项目
›
PyPy
›
Celery
›
Jinja2
›
Read the Docs
›
gevent
›
pyenv
›
virtualenv
›
Stackless Python
›
Beautiful Soup
›
结巴中文分词
›
Green Unicorn
›
Sentry
›
Shovel
›
Pyflakes
›
pytest
Python 编程
›
pep8 Checker
Styles
›
PEP 8
›
Google Python Style Guide
›
Code Style from The Hitchhiker's Guide
V2EX
›
Python
打不开目标网址,萌新求解答
gayu
·
2016-10-25 23:11:01 +08:00
· 1798 次点击
这是一个创建于 2920 天前的主题,其中的信息可能已经有所发展或是发生改变。
是这样的,我想要通过这个网址
https://diviner.jd.com/diviner?lid=1&p=103003&sku=676676
来实现对内容的提取,可是我在测试的时候就报错。具体如下:
D:\Python27.1\python.exe D:/Users/Administrator/PycharmProjects/untitled5/1122.py
File "D:/Users/Administrator/PycharmProjects/untitled5/1122.py", line 4
html=requests.get(
https://diviner.jd.com/diviner?lid=1&p=103003&sku=676676,headers=head
)
^
SyntaxError: invalid syntax
Process finished with exit code 1
不知道是网址的问题还是什么,求帮忙
Python
untitled5
网址
users
2 条回复
1
karenn
2016-10-25 23:34:09 +08:00
1
get 函数里面的内容要加引号
2
aitaii
2016-10-26 09:14:05 +08:00
1
html=requests.get( "
https://diviner.jd.com/diviner?lid=1&p=103003&sku=676676,headers=head
")
关于
·
帮助文档
·
博客
·
API
·
FAQ
·
实用小工具
·
5840 人在线
最高记录 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 26ms ·
UTC 06:17
·
PVG 14:17
·
LAX 23:17
·
JFK 02:17
Developed with
CodeLauncher
♥ Do have faith in what you're doing.