Skip to content

Instantly share code, notes, and snippets.

Avatar

包布丁 bdbai

  • Singapore Management University
  • 江苏苏州
View GitHub Profile
View crawl.py
#!/usr/bin/env python3
import re
import requests
session = requests.session()
url = 'http://www.spprec.com/sczw/jyfwpt/005001/005001001/MoreInfo.aspx?CategoryNum=005001001'
headers = {'Accept': 'text/html', 'Accept-Encoding': 'gzip, deflate', 'Referer': url, 'Accept-Language': 'zh-CN,zh;q=0.8', 'Content-Type': 'application/x-www-form-urlencoded', 'Origin': 'http://www.spprec.com', 'Connection': 'keep-alive', 'Host': 'www.spprec.com', 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36'}
params = ['__VIEWSTATE', '__CSRFTOKEN']
def getParam(paramName, heystack):
@bdbai
bdbai / IIFE.js
Created Jan 26, 2016
TvCat Encrypt Algorithm
View IIFE.js
$(function() {
var b = "src";
var d = A.d("a", b);
$.get("/api/pg", {
p: d
},
function(a) {
if (a[0] == 1) {
$("#noon").after(a[1])
}