Skip to content

Instantly share code, notes, and snippets.

@50225512
50225512 / mpWebSpider_mpWebSpider_items.py
Created Mar 7, 2018
爬虫一个不可描述的网站
View mpWebSpider_mpWebSpider_items.py
# -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# https://doc.scrapy.org/en/latest/topics/items.html
import scrapy
@50225512
50225512 / LintCodePOST.py
Created Apr 29, 2018
lintCode反爬虫登陆
View LintCodePOST.py
# -*- coding=utf-8 -*-
import requests
agent = 'Mozilla/5.0(Windows NT 6.1; rv:59.0) Gecko/20100101 Firefox/59.0'
referer = 'https://www.lintcode.com/accounts/signin/'
Token = 'KPHxDihzU8OiLudC3DsDyhVK78HO657d'
headers = {'User-Agent': agent, 'Referer': referer, 'X-CSRFToken': Token}
post_url = 'https://www.lintcode.com/accounts/signin/'
s = requests.Session()