Coder Social home page Coder Social logo

python-web-scraping's Issues

总是出现 '您操作太频繁,请稍后再访问',请问哪里引起的,怎么解决?

dict = {
'first': "true",
'pn': '2',
'kd': 'Java'
}
headers = {
'User-Agent': user_agent,
'Cookies': cookies,
}
r = requests.get('https://www.lagou.com/jobs/positionAjax.json?px=new', params=dict, headers=headers)

print(r.text)
print(r)

out:
<Response [200]>
{"success":false,"msg":"您操作太频繁,请稍后再访问","clientIp":"125.34.78.223"}

试着更换了headers的User-Agent,Cookies,加了代理proxies,都不行,

帮忙看下哪里出问题啦

总是运行报错怎么办呀,谢谢

Traceback (most recent call last):
File "C:/Users/chengxiang/Desktop/test3/222", line 112, in
spider = Spider()
File "C:/Users/chengxiang/Desktop/test3/222", line 15, in init
self.keyword=raw_input(u'欢迎使用 pexels 图片搜索下载神器\n请输入搜索关键词(英文):')
NameError: name 'raw_input' is not defined

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.