推荐学习书目
› 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
gayu
V2EX  ›  Python

打不开目标网址,萌新求解答

  •  
  •   gayu · Oct 25, 2016 · 2601 views
    This topic created in 3627 days ago, the information mentioned may be changed or developed.
    是这样的,我想要通过这个网址 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
    不知道是网址的问题还是什么,求帮忙
    karenn
        1
    karenn  
       Oct 25, 2016   ❤️ 1
    get 函数里面的内容要加引号
    aitaii
        2
    aitaii  
       Oct 26, 2016   ❤️ 1
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   859 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 19:34 · PVG 03:34 · LAX 12:34 · JFK 15:34
    ♥ Do have faith in what you're doing.