This file contains hidden or 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 | |
# agri.gov.cn_amf_client.py | |
# http://jgsb.agri.gov.cn/flexapps/hqApp.swf数据抓取 | |
# refer: http://www.site-digger.com/html/articles/20160418/121.html | |
import urllib2 | |
import uuid | |
import pyamf | |
from pyamf import remoting | |
from pyamf.flex import messaging |
This file contains hidden or 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:utf8 | |
import js2py | |
def encrypted(password): | |
js_func1 = """ | |
function i(t, e, n, i, a, o) { | |
var r, s, c, l, m, d, u, p, h, f, g, b, v, w, y = new Array(16843776, 0, 65536, 16843780, 16842756, 66564, 4, 65536, 1024, 16843776, 16843780, 1024, 16778244, 16842756, 16777216, 4, 1028, 16778240, 16778240, 66560, 66560, 16842752, 16842752, 16778244, 65540, 16777220, 16777220, 65540, 0, 1028, 66564, 16777216, 65536, 16843780, 4, 16842752, 16843776, 16777216, 16777216, 1024, 16842756, 65536, 66560, 16777220, 1024, 4, 16778244, 66564, 16843780, 65540, 16842752, 16778244, 16777220, 1028, 66564, 16843776, 1028, 16778240, 16778240, 0, 65540, 66560, 0, 16842756), | |
x = new Array(-2146402272, -2147450880, 32768, 1081376, 1048576, 32, -2146435040, -2147450848, -2147483616, -2146402272, -2146402304, -2147483648, -2147450880, 1048576, 32, -2146435040, 1081344, 1048608, -2147450848, 0, -2147483648, 32768, 1081376, -2146435072, 1048608, -2147483616, 0, 1081344, 32800, -2146402304, -2146435072, 3 |
This file contains hidden or 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:utf8 | |
import demjson | |
str = """ | |
{ | |
title: '#戒不掉#陈伟霆的声音刘雯的笑,戒不掉COCO CRUSH…', | |
articleid: "20180419A02UE5", | |
channel:"cmsid", | |
cid :"2586256129", | |
commentNumber: "38", |
This file contains hidden or 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
package main | |
import ( | |
"time" | |
"fmt" | |
"crypto/md5" | |
"encoding/hex" | |
"net/url" | |
"net/http" | |
"io/ioutil" |
This file contains hidden or 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
package main | |
import "fmt" | |
const MAX int = 3 | |
func main() { | |
// 变量是一种使用方便的占位符,用于引用计算机内存地址。 | |
// Go 语言的取地址符是 &,放到一个变量前使用就会返回相应变量的内存地址 | |
// http://www.runoob.com/go/go-array-of-pointers.html |
This file contains hidden or 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
function doGet(request) { | |
var mid = request.parameter.mid; | |
if (mid && !isNaN(mid)){ | |
var referer = "http://space.bilibili.com/" + mid +"/"; | |
var headers = | |
{ | |
"User-Agent" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.59 Safari/537.36", | |
"Referer": referer, | |
"X-Requested-With": "XMLHttpRequest", | |
}; |
This file contains hidden or 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
#!/usr/bin/env python2 | |
# vim: set fileencoding=utf8 | |
import os | |
import sys | |
import requests | |
import urllib | |
import json | |
import re | |
import time |
This file contains hidden or 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
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
# Created on 2016-09-21 11:21:24 | |
from flask import Flask, jsonify, abort, make_response | |
from flask import request | |
from flask_sqlalchemy import SQLAlchemy | |
import json | |
This file contains hidden or 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
<form method="post"> | |
{{ form.hidden_tag() }} | |
{{ form.example }} | |
<input type="submit"> | |
</form> |
This file contains hidden or 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
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
import re | |
for i in ['w','1','_','\\','+']: | |
if re.search(r"[^\w]",i): #^在[]里 | |
print i | |
# http://www.runoob.com/regexp/regexp-rule.html |
NewerOlder