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
PulpFunction
V2EX  ›  Python

爬虫,使用 chrome, requests, postman 打开同一个接口,分别返回 json, html,无

  •  
  •   PulpFunction · 2018-10-12 16:02:22 +08:00 · 2076 次点击
    这是一个创建于 2016 天前的主题,其中的信息可能已经有所发展或是发生改变。
    接口正常返回应该是 JSON

    我把浏览器里的 cookie 啥的都加上了
    PulpFunction
        1
    PulpFunction  
    OP
       2018-10-12 16:06:17 +08:00
    直接浏览器打开接口返回 json ( get 方式)
    提示接口服务器错误

    requests 返回一段 html,看起来没有被封 其中包含<%%>( get,post 都试过,返回都是 html )

    postman 返回无
    PulpFunction
        2
    PulpFunction  
    OP
       2018-10-12 16:19:33 +08:00
    搞定了……
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2814 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 13:06 · PVG 21:06 · LAX 06:06 · JFK 09:06
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.