当前位置:网站首页>Scratch returns 400
Scratch returns 400
2022-06-26 03:01:00 【0 & 1 dishes】
- scene
Use scrapy Capture data , The parameters to be passed are Request Payload Parameters , Use Resquest send out post request - The code is as follows
This is to return 400 Code for
yield scrapy.Request(url=url,
method="POST",
headers={
"Content-Type":"application/json","Host":"web.hi-teeth.com","Content-Length":"18"},
encoding="utf-8",
body=json.dumps({
"key":"value"}),
dont_filter=True,
callback= Callback function )
reason
In the header information "Content-Length":"18" Error message caused by , Just cancel it , Personal tasks may be limited to 18 Error causing insufficient lengthSolution
Remove... From the header message "Content-Length" that will do
Correct code
yield scrapy.Request(url=url,
method="POST",
headers={
"Content-Type":"application/json","Host":"web.hi-teeth.com"},
encoding="utf-8",
body=json.dumps({
"key":"value"}),
dont_filter=True,
callback= Callback function )
There are students who know the right reasons to give guidance , Thank you very much
边栏推荐
- Interpreting Oracle
- UE5全局光照系統Lumen解析與優化
- 如何在 ggplot2 中删除网格线(附示例)
- P2483-[模板]k短路/[SDOI2010]魔法猪学院【主席树,堆】
- 记一个RestControll和Controller 引起的折磨BUG
- 2022年挖财商学院证券开户安全嘛?
- [machinetranslation] - Calculation of Bleu value
- Deep understanding of distributed cache design
- 100002nd prime
- Explain the JVM clearly at one time and don't be asked by the interviewer again
猜你喜欢
数据库查询语句SQL中like、%、-的区别
浅谈虚拟内存与项目开发中的OOM问题
High availability in Internet three highs (high concurrency, high performance and high availability)
Lumen Analysis and Optimization of ue5 global Lighting System
ORB-SLAM3论文概述
Overview of orb-slam3 paper
学习太极创客 — MQTT(四)服务端连接操作
vulhub复现一 activemq
Deep understanding of distributed cache design
Learn Tai Chi Maker - mqtt (IV) server connection operation
随机推荐
What can Arthas do for you?
网上开户选哪个证券公司?网上开户是否安全么?
55 pictures make you feel a bit B-tree at one time
在 R 中创建非线性最小二乘检验
Oracle connectivity issues and Solutions
A few simple ways for programmers to exercise their waist
Sloppy formula
Redis classic 20 questions
Arthas(阿尔萨斯) 能为你做什么?
Termux install openssh
Additional: brief description of hikaricp connection pool; (I didn't go deep into it, but I had a basic understanding of hikaricp connection pool)
请指教同花顺软件究竟是什么?在线开户安全么?
I am in Zhongshan. Where can I open an account? Is it safe to open an account online?
Cox regression model
请指教同花顺开户选选择哪家券商比较好?网上开户是否安全么?
Mysql常用sql语句之修改表名、删除表、获取表信息、删除指定日期的表记录
附加:HikariCP连接池简述;(并没有深究,只是对HikariCP连接池有个基本认识)
Oracle连接问题以及解决方案
Install development cross process communication
Multi surveyor Gongshu Xiao sir_ The solution of using websocket error reporting under working directory