Created
March 6, 2016 15:08
-
-
Save heamon7/ce3eca070ee0d3ada8ca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import os | |
import time | |
import base64 | |
import requests | |
board_list = ['JobInfo', 'ParttimeJob', 'Jump'] | |
user_id = 'test' | |
passwd = 'test123' | |
subject = '【知乎】「#内推#校招#社招#实习#工程#设计#社区」' | |
content = ''' | |
[size=6]常年内推[/size] 『知乎』 各种职位: | |
[img=http://7ktrro.com1.z0.glb.clouddn.com/jobs.png][/img] | |
详情可以访问:https://www.zhihu.com/careers | |
包括但不限于以上职位,只要你敢投简历,我就敢内推。 | |
知乎的[size=7]工作环境[/size]介绍可以参考这里:https://www.zhihu.com/question/20391282 | |
[size=7]工资待遇[/size]可以参考这里:http://www.lagou.com/gongsi/j4128.html | |
有兴趣的同学可以发送[size=7]简历[/size]至:Base64_Decode('emhlQHpoaWh1LmNvbQ==') | |
邮件标题格式为:知乎内推-姓名-职位 | |
邮件正文请注明招聘信息来源,如果是申请实习岗位,也请注明。 | |
-- send by scrapy | |
''' | |
request_base_url = 'http://bbs.byr.cn/article/BOARD_ID/ajax_post.json' | |
login_url = 'http://bbs.byr.cn/user/ajax_login.json' | |
headers={"X-Requested-With": "XMLHttpRequest"} | |
formdata={ | |
'id': user_id | |
,'passwd': passwd | |
,'CookieDate': '2' | |
} | |
login_res = requests.post(login_url, data=formdata, headers=headers) | |
print login_res.content | |
for board_id in board_list: | |
request_url = request_base_url.replace('BOARD_ID', board_id) | |
formdata={ | |
'subject': subject | |
,'content': content | |
,'signature': '-1' | |
,'id': '0' | |
} | |
res = requests.post(request_url, data=formdata, cookies=login_res.cookies, headers=headers) | |
print res.content | |
time.sleep(10) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment