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
# -*- coding:utf-8 -*- | |
import requests, os, hashlib | |
from pymongo import Connection #引入Mongo支持 | |
#连接Mongo | |
mongo = Connection(host='127.0.0.1', port=27017) | |
db = mongo.bt #连接bt这个数据库,没有会自动新建 | |
#保存下载的BT种子 | |
def save_file_to_disk(content, info_hash): |
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
#coding=utf8 | |
##版本:1.0 | |
##环境:python2.7 | |
##作者:moxie | |
##日期:2013.08.23 | |
##说明:文件生成目录为:D:/ludatui | |
import urllib2,urllib | |
import re |
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
require 'net/http' | |
require 'nokogiri' | |
### | |
# Lsong | |
# i@lsong.org | |
# http://lsong.org | |
# | |
# MIT LICENSE | |
# http://lsong.mit-license.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
#!/usr/bin/env python | |
# -*- coding: utf8 -*- | |
# author: amoblin <amoblin@163.com> | |
import sys, re, urllib2, os, urllib | |
beauty_url = "http://huaban.com/favorite/beauty/" | |
#beauty_url = "http://huaban.com/" | |
pin_re = '<a href="/pins/(.+?)/"' |
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
# encoding:utf-8 | |
################################################################################# | |
#自定义区 | |
#beautiful soup doc : http://www.crummy.com/software/BeautifulSoup/bs4/doc/index.zh.html | |
################################################################################# | |
DEBUG = False #是否在调试 | |
EXAMPLE_URL = 'http://www.baidu.com' #示例网址 | |
HTML_ENCODING =None #返回的encoding,默认就好 | |
IMAGE_DIR = 'image' #存放目录 |
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
// vim: set et sw=2 ts=2 sts=2 ff=unix fenc=utf8: | |
// Author: Binux<i@binux.me> | |
// http://binux.me | |
// Created on 2013-11-11 18:50:58 | |
(function(){ | |
function getOffset(elem) { | |
var top = 0; | |
var left = 0; | |
do { |
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
#!/usr/bin/env python | |
# -*- encoding: utf-8 -*- | |
# vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8: | |
# Created on 2014-09-10 12:05:42 | |
import os | |
import re | |
import json | |
import datetime | |
from libs.pprint import pprint |
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
# !/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
import sys | |
import time | |
import Queue | |
import threading | |
import traceback | |
class ExitException(Exception): |
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
__author__ = 'dodola' | |
#encoding: utf-8 | |
from time import sleep, ctime | |
import time | |
import urllib.request | |
import threading | |
import contextlib | |
import queue | |
import string | |
import shutil |
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
#!/usr/bin/env python | |
# -*- coding: utf8 -*- | |
# author: amoblin <amoblin@163.com> | |
import sys, re, urllib2, os, urllib | |
beauty_url = "http://huaban.com/favorite/beauty/" | |
#beauty_url = "http://huaban.com/" | |
pin_re = '<a href="/pins/(.+?)/"' |
OlderNewer