[Python的自由天空] 这个对齐错误什么意思?

发信人: saynothing (止语), 信区: Python
标 题: 这个对齐错误什么意思?
发信站: 水木社区 (Wed Apr 25 21:30:21 2018), 转信

out_file = open("/extra/cpws/" + str(CourtNo) + "__" + str(Total_page) +
"_" + str(Page) + ".txt","wb")

^
IndentationError: unindent does not match any outer indentation level

----------------------------------------------------
def get_data(CourtNo, Param,Index,Total_page,Page, Order,Direction):
...
req2 = session.post(url=url2,headers=headers2,params=data)

# set file name
out_file = open("/extra/cpws/" + str(CourtNo) + "__" + str(Total_page) +
"_" + str(Page) + ".txt","wb")
print(req2.text, out_file)
out_file.close()

def main():
...
Index = 2 #第几页
Page = 20 #每页几条
Order = "法院层级" #排序标准
Direction = "asc" #asc正序 desc倒序

#for i in range(1, 282):
get_data(45440, Param,Index,282, Page, Order,Direction)


不得不用python,从github上下载了一个网站爬虫程序。。



--

※ 修改:·saynothing 于 Apr 25 21:31:53 2018 修改本文·[FROM: 125.119.74.*]
※ 来源:·水木社区 http://newsmth.net·[FROM: 125.119.74.*]


from 水木社区 电脑技术区十大热门话题 https://ift.tt/2I0Tc0H
via IFTTT

评论

此博客中的热门博文

丰田将在 2019 东京车展上展出一台超迷你的都市型电动车

[数字家庭] [原创]北京联通IPTV的完美方案

英特尔将推出更多支持 e-SIM 的 modem