Skip to content

Instantly share code, notes, and snippets.

View sophie2805's full-sized avatar

sophie2805

  • State Street Global Exchange
View GitHub Profile
@sophie2805
sophie2805 / gist:53d8f3cbc4c9e969052f
Created July 3, 2015 01:40
get the web page, regrex find the specific Chinese content
package test;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.Calendar;
import java.util.concurrent.TimeUnit;
import org.junit.*;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;
import org.openqa.selenium.*;
@sophie2805
sophie2805 / gist:c2e77d61eed2bfdd7f3a
Created June 26, 2015 14:02
using python requests auto login and reply
#-*- coding:utf-8 -*-
__author__ = 'Sophie2805'
import re
import time
import requests
agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0'
@sophie2805
sophie2805 / gist:54a3ff729074011f91a1
Created June 26, 2015 11:57
auto login discuz bbs and reply
#-*- coding:utf-8 -*-
__author__ = 'Sophie2805'
import urllib
import urllib2
import time
import re
import cookielib
jar = cookielib.CookieJar()