Skip to content

Instantly share code, notes, and snippets.

View hondajojo's full-sized avatar
🏠
Working from home

maijver hondajojo

🏠
Working from home
View GitHub Profile
# 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
# 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
# coding:utf8
import demjson
str = """
{
title: '#戒不掉#陈伟霆的声音刘雯的笑,戒不掉COCO CRUSH…',
articleid: "20180419A02UE5",
channel:"cmsid",
cid :"2586256129",
commentNumber: "38",
@hondajojo
hondajojo / jianshu_rss.go
Created September 26, 2017 05:21
简书rss
package main
import (
"time"
"fmt"
"crypto/md5"
"encoding/hex"
"net/url"
"net/http"
"io/ioutil"
@hondajojo
hondajojo / main.go
Last active May 3, 2017 09:12
go 指针
package main
import "fmt"
const MAX int = 3
func main() {
// 变量是一种使用方便的占位符,用于引用计算机内存地址。
// Go 语言的取地址符是 &,放到一个变量前使用就会返回相应变量的内存地址
// http://www.runoob.com/go/go-array-of-pointers.html
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",
};
@hondajojo
hondajojo / pan.baidu.com.py
Created November 22, 2016 08:50 — forked from PeterDing/pan.baidu.com.py
百度云、百度网盘,递归下载自己的文件或分享的文件 -- keywords: pan.baidu.com, login, recursively, download -- # 移到仓库 https://github.com/PeterDing/iScript
#!/usr/bin/env python2
# vim: set fileencoding=utf8
import os
import sys
import requests
import urllib
import json
import re
import time
@hondajojo
hondajojo / flask-rest-server.py
Last active September 21, 2016 08:59 — forked from ethan-funny/flask-rest-server.py
flask restful api with flask_sqlalchemy
#!/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
@hondajojo
hondajojo / example.html
Created March 21, 2016 02:16 — forked from doobeh/example.html
Simple example of using a RadioField in Flask-WTForms to generate a form.
<form method="post">
{{ form.hidden_tag() }}
{{ form.example }}
<input type="submit">
</form>
#!/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