Skip to content

Commit 795a869

Browse files
committed
add link
1 parent ddea04e commit 795a869

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
1-
# demo
1+
# 这是我日常遇到的一些小问题的解决办法,全部是基于Python3
2+
1.[爬取拉勾网招聘信息](https://github.com/injetlee/demo/blob/master/CpuToInfluxdb.py)
3+
2.[模拟登录知乎](https://github.com/injetlee/demo/blob/master/login_zhihu.py)
4+
3.[对目录下所有文件计数](https://github.com/injetlee/demo/blob/master/countFile.py)
5+
4.[获取当前CPU状态,存储到Influxdb](https://github.com/injetlee/demo/blob/master/CpuToInfluxdb.py)
6+
5.[爬取豆瓣电影top250](https://github.com/injetlee/demo/blob/master/douban_movie.py)
7+
6.[Excel文件读入数据库](https://github.com/injetlee/demo/blob/master/excelToDatabase.py)
8+
7.[爬取拉勾网职位信息](https://github.com/injetlee/demo/blob/master/lagouSpider.py)
9+
8.[批量修改文件名](https://github.com/injetlee/demo/blob/master/ModifyFilename.py)
10+
9.[读写excel](https://github.com/injetlee/demo/blob/master/readExcel.py)

login_zhihu.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ def get_captcha(data):
88

99
def login(username,password,oncaptcha):
1010
sessiona = requests.Session()
11-
print(sessiona)
12-
print('aaaa')
1311
headers = {'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0'}
1412
xyz = sessiona.get('https://www.zhihu.com/#signin',headers=headers).content
1513
_xsrf = BeautifulSoup(sessiona.get('https://www.zhihu.com/#signin',headers=headers).content,'html.parser').find('input',attrs={'name':'_xsrf'}).get('value')
@@ -21,7 +19,6 @@ def login(username,password,oncaptcha):
2119
"remember_me":True,
2220
"captcha":oncaptcha(captcha_content)
2321
}
24-
print(data)
2522
resp = sessiona.post('https://www.zhihu.com/login/email',data,headers=headers).content
2623
print(resp)
2724
return resp

0 commit comments

Comments
 (0)