This file contains 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
from twisted.web import client | |
from twisted.internet import reactor, defer | |
from lxml import etree | |
from StringIO import StringIO | |
import re | |
import os | |
save_dir = "~/.video/jizzhut/" | |
base_url = "http://jizzhut.com" | |
download_re = re.compile('so.addVariable\("content_video",\s*"([\w\d.:/_]*)"\);', re.M) |
This file contains 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
from twisted.web import client | |
from twisted.internet import reactor, defer | |
from lxml import etree | |
from StringIO import StringIO | |
import re | |
import os | |
save_dir = "~/.video/pornzapp/" | |
base_url = "http://www.pornzapp.com" | |
download_re = re.compile('"/js/interface.php\?id=([\w\d.:/_]*)"', re.M) |
This file contains 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
from twisted.web import client | |
from twisted.internet import reactor, defer | |
from lxml import etree | |
from StringIO import StringIO | |
import re | |
import os | |
save_dir = "~/.video/tube8/" | |
base_url = "http://www.tube8.com" | |
download_re = re.compile("so.addVariable\('videoUrl',\s*'([\w\d.:/_]*)'\);", re.M) |
This file contains 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
from twisted.web import client | |
from twisted.internet import reactor, defer | |
from lxml import etree | |
from StringIO import StringIO | |
import re | |
import os | |
save_dir = "~/.video/xhamster/" | |
base_url = "http://www.xhamster.com" | |
download_re = re.compile("so.addVariable\('file',\s*'([\w\d\.:/_\-\?=]*)'\);", re.M) |
This file contains 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
from twisted.web import client | |
from twisted.internet import reactor, defer | |
from lxml import etree | |
from StringIO import StringIO | |
import re | |
import os | |
save_dir = "~/.video/xnxx/" | |
base_url = "http://video.xnxx.com" | |
download_re = re.compile("so.addVariable\('flv_url',\s*'([\w\d.:/_]*)'\);", re.M) |
This file contains 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
import timeit | |
from cStringIO import StringIO | |
x1 = xrange(1000) | |
x2 = xrange(10000) | |
smallbuf = "buffer" | |
bigbuf = "buffer" * 1024 | |
def str_join1000(buf): |
This file contains 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
simple benchmark | |
http://github.com/mopemope/meinheld/tree/master/bench/hello/ | |
result: | |
ma2@xxxx:11:51:ab -c 100 -n 10000 http://192.168.2.10:8000/ ~ | |
This is ApacheBench, Version 2.0.41-dev <$Revision: 1.141 $> apache-2.0 | |
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Copyright (c) 2006 The Apache Software Foundation, http://www.apache.org/ |
This file contains 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
from os import path | |
from werkzeug import secure_filename | |
import eventlet | |
from eventlet.green import urllib2 | |
from pyquery import PyQuery as pq | |
from urlparse import urlparse | |
search_urls = [ | |
'http://www.empflix.com/browsecat.php?page=%s&chid=17&category=rd', | |
] |
This file contains 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
from meinheld import server | |
def hello_world(environ, start_response): | |
status = '200 OK' | |
res = "Hello world!" | |
response_headers = [('Content-type','text/plain')] | |
start_response(status, response_headers) | |
print environ | |
print environ["QUERY_STRING"] | |
return [res] |
This file contains 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
from os import path | |
from werkzeug import secure_filename | |
import eventlet | |
from eventlet.green import urllib2 | |
from pyquery import PyQuery as pq | |
from urlparse import urlparse | |
import psyco | |
psyco.full() | |
search_urls = [ |
OlderNewer