码迷,mamicode.com
首页 >  
搜索关键字:headers    ( 2368个结果
Express 解决跨域请求
在app.js中配置跨域请求//设置允许跨域访问该服务.app.use((req,res,next)=>{res.set({‘Access-Control-Allow-Credentials‘:true,‘Access-Control-Max-Age‘:1728000,‘Access-Control-Allow-Origin‘:req.headers.origin||‘*‘,‘Access-
分类:其他好文   时间:2020-07-04 20:43:21    阅读次数:77
requests模块使用代理
找一个免费IP的网站 # coding=utf-8 import requests proxies = {"http":"http://114.234.80.188:80"}#就代理填到这里 headers = { "User-Agent": "Mozilla/5.0 (Macintosh; Int ...
分类:其他好文   时间:2020-07-04 17:11:48    阅读次数:47
使用element-ui中的el-upload组件时携带其他参数
<el-upload class="upload-demo" ref="upload" :action="uploadURL+'/customer/excel'" //后台接口(接受上传的文件并做后端的逻辑处理) :headers="headers" accept=".xlsx,.xls" // 限 ...
分类:其他好文   时间:2020-07-04 17:01:24    阅读次数:127
爬虫(二)
报错自查# 1、 HttpConnectionPool: # 原因: 1、短时间内发起了高频的请求导致IP被禁 # 2、http连接池中的连接资源被耗尽 # 解决: # 1、 使用代理服务器 # 2、headers中加入 Connection: 'close'# 2、代理:代理服务器,可以接受请求将... ...
分类:其他好文   时间:2020-07-04 15:01:01    阅读次数:59
request发送带headers和带参数的请求
如果不改变header,往往只能获取到很少一部分的content。所以我们要改变header import requests respones = requests.get("https://www.baidu.com") print(respones.status_code) print(resp ...
分类:其他好文   时间:2020-07-03 12:21:20    阅读次数:90
python 爬取有道翻译
# translate words through youdao.com // discription about the code # the problem is the form data of youdao webpage has been coded # import necessary ...
分类:编程语言   时间:2020-07-03 01:19:17    阅读次数:120
爬取豆瓣 Top250书籍
'''爬取豆瓣top250书籍''' import requests import json import csv from bs4 import BeautifulSoup books = [] def book_name(url): headers = { 'User-Agent': 'Mozi ...
分类:其他好文   时间:2020-07-02 16:39:12    阅读次数:70
【vue】---- ElementUI 实现上传Excel
1、功能描述:vue 项目使用 el-upload 实现上传 Excel。 2、功能效果:在el-upload基础上做了样式整改。 3、功能实现: // el-upload 上传组件 <template> <div> <el-upload ref="upload" class="upload-dem ...
分类:Web程序   时间:2020-07-01 22:32:10    阅读次数:220
将请求分发至同一主机的不同端口(不考虑容器)
解决的问题:将请求分发至同一主机的不同端口(不考虑容器)支持:httpsupstream api { server 127.0.0.1:5000 weight=1; server 127.0.0.1:5001 weight=1; server 127.0.0.1:5002 weight=1;}ser ...
分类:其他好文   时间:2020-06-30 13:06:50    阅读次数:71
Spider_基础总结2_Request+Beautifulsoup解析HTML
静态网页 抓取实例: import requests from bs4 import BeautifulSoup def gettop250(): headers={ 'user-agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKi ...
分类:Web程序   时间:2020-06-29 13:27:33    阅读次数:45
2368条   上一页 1 ... 12 13 14 15 16 ... 237 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!