code
stringlengths
1
1.49M
vector
listlengths
0
7.38k
snippet
listlengths
0
7.38k
#/usr/bin/env python # -*- coding: utf-8 -*- ''' Created on 2011-7-29 主要用于从网站上爬取信息后,抽取页面信息; @author: zhongfeng ''' from j360buy.image_price import captcha_360buy from pageparser import * from threadpool import ThreadPool, WorkRequest import json import os import re import string import threading ...
[ [ 8, 0, 0.0324, 0.0324, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0556, 0.0046, 0, 0.66, 0.037, 275, 0, 1, 0, 0, 275, 0, 0 ], [ 1, 0, 0.0602, 0.0046, 0, 0.66,...
[ "'''\nCreated on 2011-7-29\n\n主要用于从网站上爬取信息后,抽取页面信息;\n\n@author: zhongfeng\n'''", "from j360buy.image_price import captcha_360buy", "from pageparser import *", "from threadpool import ThreadPool, WorkRequest", "import json", "import os", "import re", "import string", "import threading", "import url...
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-8-16 @author: zhongfeng ''' J360buy_FEATURES_MAP__ = { ''' __ __ __ __ __ ...
[ [ 8, 0, 0.0282, 0.0235, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.5258, 0.9531, 0, 0.66, 1, 637, 0, 0, 0, 0, 0, 6, 0 ] ]
[ "'''\nCreated on 2011-8-16\n\n@author: zhongfeng\n'''", "J360buy_FEATURES_MAP__ = {\n '''\n __\n __\n __\n __\n __\n __" ]
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-7-26 京东价格图片识别模块 @author: zhongfeng ''' import ImageFilter, ImageChops from captcha_price import * from j360buy.j360_feature import J360buy_FEATURES_MAP__ import Image import re import time try: import psyco psyco.full() except ImportError: ...
[ [ 8, 0, 0.0972, 0.0972, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1667, 0.0139, 0, 0.66, 0.0909, 739, 0, 2, 0, 0, 739, 0, 0 ], [ 1, 0, 0.1806, 0.0139, 0, 0.66...
[ "'''\nCreated on 2011-7-26\n\n京东价格图片识别模块\n\n@author: zhongfeng\n'''", "import ImageFilter, ImageChops", "from captcha_price import *", "from j360buy.j360_feature import J360buy_FEATURES_MAP__", "import Image", "import re", "import time", "try:\n import psyco\n psyco.full()\nexcept ImportError:\n...
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-8-1 @author: zhongfeng ''' from j360buy.j360pageparser import parserDict,j360buyRoot from spider import main if __name__ == '__main__': main(j360buyRoot,parserDict)
[ [ 8, 0, 0.3889, 0.3889, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.6667, 0.0556, 0, 0.66, 0.3333, 666, 0, 2, 0, 0, 666, 0, 0 ], [ 1, 0, 0.7222, 0.0556, 0, 0.66...
[ "'''\nCreated on 2011-8-1\n\n@author: zhongfeng\n\n\n'''", "from j360buy.j360pageparser import parserDict,j360buyRoot", "from spider import main", "if __name__ == '__main__':\n\n main(j360buyRoot,parserDict)", " main(j360buyRoot,parserDict)" ]
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-8-16 @author: zhongfeng ''' J360buy_FEATURES_MAP__ = { ''' __ __ __ __ __ ...
[ [ 8, 0, 0.0282, 0.0235, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.5258, 0.9531, 0, 0.66, 1, 637, 0, 0, 0, 0, 0, 6, 0 ] ]
[ "'''\nCreated on 2011-8-16\n\n@author: zhongfeng\n'''", "J360buy_FEATURES_MAP__ = {\n '''\n __\n __\n __\n __\n __\n __" ]
#!/usr/bin/env python # -*- coding: utf8 -*- from logfacade import LoggerFactory ''' Created on 2011-10-9 @author: zhongfeng ''' from crawlerhttp import crawle import re from threadpool import ThreadPool, WorkRequest from dbproc.basedbproc import getConnect,MySQLQueryPagination def getProdImgUrlFro...
[ [ 1, 0, 0.0556, 0.0185, 0, 0.66, 0, 602, 0, 1, 0, 0, 602, 0, 0 ], [ 8, 0, 0.1481, 0.0926, 0, 0.66, 0.1111, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2222, 0.0185, 0, 0.66...
[ "from logfacade import LoggerFactory", "'''\nCreated on 2011-10-9\n\n@author: zhongfeng\n'''", "from crawlerhttp import crawle", "import re", "from threadpool import ThreadPool, WorkRequest", "from dbproc.basedbproc import getConnect,MySQLQueryPagination", "def getProdImgUrlFromProdId(*prodId):\n raw...
#!/usr/bin/env python # -*- coding: utf8 -*- from logfacade import LoggerFactory ''' Created on 2011-10-9 @author: zhongfeng ''' from crawlerhttp import crawle import re from threadpool import ThreadPool, WorkRequest from dbproc.basedbproc import getConnect,MySQLQueryPagination def getProdImgUrlFro...
[ [ 1, 0, 0.0556, 0.0185, 0, 0.66, 0, 602, 0, 1, 0, 0, 602, 0, 0 ], [ 8, 0, 0.1481, 0.0926, 0, 0.66, 0.1111, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2222, 0.0185, 0, 0.66...
[ "from logfacade import LoggerFactory", "'''\nCreated on 2011-10-9\n\n@author: zhongfeng\n'''", "from crawlerhttp import crawle", "import re", "from threadpool import ThreadPool, WorkRequest", "from dbproc.basedbproc import getConnect,MySQLQueryPagination", "def getProdImgUrlFromProdId(*prodId):\n raw...
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-8-1 @author: zhongfeng ''' from j360buy.j360pageparser import parserDict,j360buyRoot from spider import main if __name__ == '__main__': main(j360buyRoot,parserDict)
[ [ 8, 0, 0.3889, 0.3889, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.6667, 0.0556, 0, 0.66, 0.3333, 666, 0, 2, 0, 0, 666, 0, 0 ], [ 1, 0, 0.7222, 0.0556, 0, 0.66...
[ "'''\nCreated on 2011-8-1\n\n@author: zhongfeng\n\n\n'''", "from j360buy.j360pageparser import parserDict,j360buyRoot", "from spider import main", "if __name__ == '__main__':\n\n main(j360buyRoot,parserDict)", " main(j360buyRoot,parserDict)" ]
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-9-24 @author: zhongfeng ''' import re,os,sys import chardet from pageparser import ObuyUrlSummary from utils import Singleton from ConfigParser import ConfigParser, NoOptionError def __getUrlSumsFromSection(section): curPath = os....
[ [ 8, 0, 0.0577, 0.0481, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0962, 0.0096, 0, 0.66, 0.1, 540, 0, 3, 0, 0, 540, 0, 0 ], [ 1, 0, 0.1058, 0.0096, 0, 0.66, ...
[ "'''\nCreated on 2011-9-24\n\n@author: zhongfeng\n'''", "import re,os,sys", "import chardet", "from pageparser import ObuyUrlSummary", "from utils import Singleton", "from ConfigParser import ConfigParser, NoOptionError", "def __getUrlSumsFromSection(section):\n curPath = os.path.abspath(os.path.dirn...
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-7-26 图片识别模块 @author: zhongfeng ''' import ImageFilter, ImageChops import Image import re,itertools import time try: import psyco psyco.full() except ImportError: pass class CaptchaAlgorithm(object): '''captcha algorithm''' def Le...
[ [ 8, 0, 0.0374, 0.0374, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0642, 0.0053, 0, 0.66, 0.1, 739, 0, 2, 0, 0, 739, 0, 0 ], [ 1, 0, 0.0695, 0.0053, 0, 0.66, ...
[ "'''\nCreated on 2011-7-26\n\n图片识别模块\n\n@author: zhongfeng\n'''", "import ImageFilter, ImageChops", "import Image", "import re,itertools", "import time", "try:\n import psyco\n psyco.full()\nexcept ImportError:\n pass", " import psyco", " psyco.full()", "class CaptchaAlgorithm(object)...
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-7-26 京东价格图片识别模块 @author: zhongfeng ''' import ImageFilter, ImageChops from captcha_price import * from medicine.kxr.kxr_feature import KXR_FEATURES_MAP__ import Image import os,sys try: import psyco psyco.full() except ImportError: pass ...
[ [ 8, 0, 0.0886, 0.0886, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1519, 0.0127, 0, 0.66, 0.1, 739, 0, 2, 0, 0, 739, 0, 0 ], [ 1, 0, 0.1646, 0.0127, 0, 0.66, ...
[ "'''\nCreated on 2011-7-26\n\n京东价格图片识别模块\n\n@author: zhongfeng\n'''", "import ImageFilter, ImageChops", "from captcha_price import *", "from medicine.kxr.kxr_feature import KXR_FEATURES_MAP__", "import Image", "import os,sys", "try:\n import psyco\n psyco.full()\nexcept ImportError:\n pass", ...
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2012-02-29 @author: zhongfeng ''' KXR_FEATURES_MAP__ = { ''' ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ __##__ __##__ ______ '...
[ [ 8, 0, 0.0274, 0.0228, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.5251, 0.9543, 0, 0.66, 1, 713, 0, 0, 0, 0, 0, 6, 0 ] ]
[ "'''\nCreated on 2012-02-29\n\n@author: zhongfeng\n'''", "KXR_FEATURES_MAP__ = {\n '''\n______\n______\n______\n______\n______\n______" ]
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-7-26 京东价格图片识别模块 @author: zhongfeng ''' import ImageFilter, ImageChops from captcha_price import * from medicine.kxr.kxr_feature import KXR_FEATURES_MAP__ import Image import os,sys try: import psyco psyco.full() except ImportError: pass ...
[ [ 8, 0, 0.0886, 0.0886, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1519, 0.0127, 0, 0.66, 0.1, 739, 0, 2, 0, 0, 739, 0, 0 ], [ 1, 0, 0.1646, 0.0127, 0, 0.66, ...
[ "'''\nCreated on 2011-7-26\n\n京东价格图片识别模块\n\n@author: zhongfeng\n'''", "import ImageFilter, ImageChops", "from captcha_price import *", "from medicine.kxr.kxr_feature import KXR_FEATURES_MAP__", "import Image", "import os,sys", "try:\n import psyco\n psyco.full()\nexcept ImportError:\n pass", ...
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2012-02-29 @author: zhongfeng ''' KXR_FEATURES_MAP__ = { ''' ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ __##__ __##__ ______ '...
[ [ 8, 0, 0.0274, 0.0228, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.5251, 0.9543, 0, 0.66, 1, 713, 0, 0, 0, 0, 0, 6, 0 ] ]
[ "'''\nCreated on 2012-02-29\n\n@author: zhongfeng\n'''", "KXR_FEATURES_MAP__ = {\n '''\n______\n______\n______\n______\n______\n______" ]
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Created on 2011-8-27 主要用于从网站上爬取信息后,抽取页面信息; @author: zhongfeng ''' from pageparser import * from spiderconfigparser import SpiderConfig from crawlerhttp import crawleRetries icsonRoot = ObuyUrlSummary(url=r'http://www.icson.com/portal.html', name='i...
[ [ 8, 0, 0.0414, 0.0414, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0769, 0.0059, 0, 0.66, 0.0625, 488, 0, 1, 0, 0, 488, 0, 0 ], [ 1, 0, 0.0828, 0.0059, 0, 0.66...
[ "'''\nCreated on 2011-8-27\n\n主要用于从网站上爬取信息后,抽取页面信息;\n\n@author: zhongfeng\n'''", "from pageparser import *", "from spiderconfigparser import SpiderConfig", "from crawlerhttp import crawleRetries", "icsonRoot = ObuyUrlSummary(url=r'http://www.icson.com/portal.html', name='icson', \n isRecursed=True, c...
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-8-25 @author: zhongfeng ''' from icson.icsonpageparser import parserDict,icsonRoot from spider import ObuySpider from crawlerhttp import CrawlResult import os,sys from logfacade import LoggerFactory from upload import fileUpload from s...
[ [ 8, 0, 0.1757, 0.1622, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2973, 0.027, 0, 0.66, 0.1111, 965, 0, 2, 0, 0, 965, 0, 0 ], [ 1, 0, 0.3243, 0.027, 0, 0.66, ...
[ "'''\nCreated on 2011-8-25\n\n@author: zhongfeng\n\n'''", "from icson.icsonpageparser import parserDict,icsonRoot", "from spider import ObuySpider", "from crawlerhttp import CrawlResult", "import os,sys", "from logfacade import LoggerFactory", "from upload import fileUpload", "from spiderconfigparser ...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Created on 2011-8-27 主要用于从网站上爬取信息后,抽取页面信息; @author: zhongfeng ''' from pageparser import * from spiderconfigparser import SpiderConfig from crawlerhttp import crawleRetries icsonRoot = ObuyUrlSummary(url=r'http://www.icson.com/portal.html', name='i...
[ [ 8, 0, 0.0414, 0.0414, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0769, 0.0059, 0, 0.66, 0.0625, 488, 0, 1, 0, 0, 488, 0, 0 ], [ 1, 0, 0.0828, 0.0059, 0, 0.66...
[ "'''\nCreated on 2011-8-27\n\n主要用于从网站上爬取信息后,抽取页面信息;\n\n@author: zhongfeng\n'''", "from pageparser import *", "from spiderconfigparser import SpiderConfig", "from crawlerhttp import crawleRetries", "icsonRoot = ObuyUrlSummary(url=r'http://www.icson.com/portal.html', name='icson', \n isRecursed=True, c...
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-8-25 @author: zhongfeng ''' from icson.icsonpageparser import parserDict,icsonRoot from spider import ObuySpider from crawlerhttp import CrawlResult import os,sys from logfacade import LoggerFactory from upload import fileUpload from s...
[ [ 8, 0, 0.1757, 0.1622, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2973, 0.027, 0, 0.66, 0.1111, 965, 0, 2, 0, 0, 965, 0, 0 ], [ 1, 0, 0.3243, 0.027, 0, 0.66, ...
[ "'''\nCreated on 2011-8-25\n\n@author: zhongfeng\n\n'''", "from icson.icsonpageparser import parserDict,icsonRoot", "from spider import ObuySpider", "from crawlerhttp import CrawlResult", "import os,sys", "from logfacade import LoggerFactory", "from upload import fileUpload", "from spiderconfigparser ...
#/usr/bin/env python # -*- coding: utf-8 -*- import re import time import random from BeautifulSoup import BeautifulSoup from crawlerhttp import UrlSummary, crawle urlsProxy = ["http://proxy.ipcn.org/proxylist.html"] #urlsProxy = ["http://www.proxycn.com/html_proxy/http-1.html"] desSite = 'http://www.360...
[ [ 1, 0, 0.0656, 0.0164, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.082, 0.0164, 0, 0.66, 0.1111, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 1, 0, 0.0984, 0.0164, 0, 0...
[ "import re", "import time", "import random", "from BeautifulSoup import BeautifulSoup", "from crawlerhttp import UrlSummary, crawle", "urlsProxy = [\"http://proxy.ipcn.org/proxylist.html\"]", "desSite = 'http://www.360buy.com'", "class ChoiceProxy(object):\n proxyList = []\n def __init__(self):\...
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-8-16 @author: zhongfeng ''' SUNING_FEATURES_MAP = { ''' __ __ __ __ __ __ __ __ __ __ __ ## ## ''' : '.', ...
[ [ 8, 0, 0.0284, 0.0237, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.5261, 0.9526, 0, 0.66, 1, 143, 0, 0, 0, 0, 0, 6, 0 ] ]
[ "'''\nCreated on 2011-8-16\n\n@author: zhongfeng\n'''", "SUNING_FEATURES_MAP = {\n '''\n__\n__\n__\n__\n__\n__" ]
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-7-26 国美价格图片识别模块 @author: zhongfeng ''' import ImageFilter, ImageChops from captcha_price import * from suning.suning_feature import SUNING_FEATURES_MAP import Image import itertools import re import time try: import psyco psyco.full() except ...
[ [ 8, 0, 0.0745, 0.0745, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1277, 0.0106, 0, 0.66, 0.0714, 739, 0, 2, 0, 0, 739, 0, 0 ], [ 1, 0, 0.1383, 0.0106, 0, 0.66...
[ "'''\nCreated on 2011-7-26\n\n国美价格图片识别模块\n\n@author: zhongfeng\n'''", "import ImageFilter, ImageChops", "from captcha_price import *", "from suning.suning_feature import SUNING_FEATURES_MAP", "import Image", "import itertools", "import re", "import time", "try:\n import psyco\n psyco.full()\ne...
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-7-26 国美价格图片识别模块 @author: zhongfeng ''' import ImageFilter, ImageChops from captcha_price import * from suning.suning_feature import SUNING_FEATURES_MAP import Image import itertools import re import time try: import psyco psyco.full() except ...
[ [ 8, 0, 0.0745, 0.0745, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1277, 0.0106, 0, 0.66, 0.0714, 739, 0, 2, 0, 0, 739, 0, 0 ], [ 1, 0, 0.1383, 0.0106, 0, 0.66...
[ "'''\nCreated on 2011-7-26\n\n国美价格图片识别模块\n\n@author: zhongfeng\n'''", "import ImageFilter, ImageChops", "from captcha_price import *", "from suning.suning_feature import SUNING_FEATURES_MAP", "import Image", "import itertools", "import re", "import time", "try:\n import psyco\n psyco.full()\ne...
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-8-16 @author: zhongfeng ''' SUNING_FEATURES_MAP = { ''' __ __ __ __ __ __ __ __ __ __ __ ## ## ''' : '.', ...
[ [ 8, 0, 0.0284, 0.0237, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.5261, 0.9526, 0, 0.66, 1, 143, 0, 0, 0, 0, 0, 6, 0 ] ]
[ "'''\nCreated on 2011-8-16\n\n@author: zhongfeng\n'''", "SUNING_FEATURES_MAP = {\n '''\n__\n__\n__\n__\n__\n__" ]
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-8-2 @author: zhongfeng ''' from suning.suningparser import parserDict,sunningRoot from spider import main if __name__ == '__main__': main(sunningRoot,parserDict)
[ [ 8, 0, 0.4333, 0.4, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.7333, 0.0667, 0, 0.66, 0.3333, 150, 0, 2, 0, 0, 150, 0, 0 ], [ 1, 0, 0.8, 0.0667, 0, 0.66, ...
[ "'''\nCreated on 2011-8-2\n\n@author: zhongfeng\n\n'''", "from suning.suningparser import parserDict,sunningRoot", "from spider import main", "if __name__ == '__main__':\n main(sunningRoot,parserDict)", " main(sunningRoot,parserDict)" ]
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-8-2 @author: zhongfeng ''' from suning.suningparser import parserDict,sunningRoot from spider import main if __name__ == '__main__': main(sunningRoot,parserDict)
[ [ 8, 0, 0.4333, 0.4, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.7333, 0.0667, 0, 0.66, 0.3333, 150, 0, 2, 0, 0, 150, 0, 0 ], [ 1, 0, 0.8, 0.0667, 0, 0.66, ...
[ "'''\nCreated on 2011-8-2\n\n@author: zhongfeng\n\n'''", "from suning.suningparser import parserDict,sunningRoot", "from spider import main", "if __name__ == '__main__':\n main(sunningRoot,parserDict)", " main(sunningRoot,parserDict)" ]
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-8-2 @author: zhongfeng ''' from efeihu.efeihupageparser import parserDict,efeihuRoot from spider import main if __name__ == '__main__': main(efeihuRoot,parserDict)
[ [ 8, 0, 0.4062, 0.375, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.6875, 0.0625, 0, 0.66, 0.3333, 263, 0, 2, 0, 0, 263, 0, 0 ], [ 1, 0, 0.8125, 0.0625, 0, 0.66,...
[ "'''\nCreated on 2011-8-2\n\n@author: zhongfeng\n\n'''", "from efeihu.efeihupageparser import parserDict,efeihuRoot", "from spider import main", "if __name__ == '__main__':\n main(efeihuRoot,parserDict)", " main(efeihuRoot,parserDict)" ]
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Created on 2011-11-22 主要用于从网站上爬取信息后,抽取页面信息; @author: zhongfeng ''' from pageparser import * import urlparse from spiderconfigparser import SpiderConfig efeihuRoot = ObuyUrlSummary(url=r'http://www.efeihu.com/', name='efeihu') class EfeihuAllSortPa...
[ [ 8, 0, 0.049, 0.049, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0839, 0.007, 0, 0.66, 0.0625, 488, 0, 1, 0, 0, 488, 0, 0 ], [ 1, 0, 0.0909, 0.007, 0, 0.66, ...
[ "'''\nCreated on 2011-11-22\n\n主要用于从网站上爬取信息后,抽取页面信息;\n\n@author: zhongfeng\n'''", "from pageparser import *", "import urlparse", "from spiderconfigparser import SpiderConfig", "efeihuRoot = ObuyUrlSummary(url=r'http://www.efeihu.com/', name='efeihu')", "class EfeihuAllSortParser(RootCatagoryPageParser): \...
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-8-2 @author: zhongfeng ''' from efeihu.efeihupageparser import parserDict,efeihuRoot from spider import main if __name__ == '__main__': main(efeihuRoot,parserDict)
[ [ 8, 0, 0.4062, 0.375, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.6875, 0.0625, 0, 0.66, 0.3333, 263, 0, 2, 0, 0, 263, 0, 0 ], [ 1, 0, 0.8125, 0.0625, 0, 0.66,...
[ "'''\nCreated on 2011-8-2\n\n@author: zhongfeng\n\n'''", "from efeihu.efeihupageparser import parserDict,efeihuRoot", "from spider import main", "if __name__ == '__main__':\n main(efeihuRoot,parserDict)", " main(efeihuRoot,parserDict)" ]
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Created on 2011-11-22 主要用于从网站上爬取信息后,抽取页面信息; @author: zhongfeng ''' from pageparser import * import urlparse from spiderconfigparser import SpiderConfig efeihuRoot = ObuyUrlSummary(url=r'http://www.efeihu.com/', name='efeihu') class EfeihuAllSortPa...
[ [ 8, 0, 0.049, 0.049, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0839, 0.007, 0, 0.66, 0.0625, 488, 0, 1, 0, 0, 488, 0, 0 ], [ 1, 0, 0.0909, 0.007, 0, 0.66, ...
[ "'''\nCreated on 2011-11-22\n\n主要用于从网站上爬取信息后,抽取页面信息;\n\n@author: zhongfeng\n'''", "from pageparser import *", "import urlparse", "from spiderconfigparser import SpiderConfig", "efeihuRoot = ObuyUrlSummary(url=r'http://www.efeihu.com/', name='efeihu')", "class EfeihuAllSortParser(RootCatagoryPageParser): \...
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-9-24 @author: zhongfeng ''' import re,os,sys import chardet from pageparser import ObuyUrlSummary from utils import Singleton from ConfigParser import ConfigParser, NoOptionError def __getUrlSumsFromSection(section): curPath = os....
[ [ 8, 0, 0.0577, 0.0481, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0962, 0.0096, 0, 0.66, 0.1, 540, 0, 3, 0, 0, 540, 0, 0 ], [ 1, 0, 0.1058, 0.0096, 0, 0.66, ...
[ "'''\nCreated on 2011-9-24\n\n@author: zhongfeng\n'''", "import re,os,sys", "import chardet", "from pageparser import ObuyUrlSummary", "from utils import Singleton", "from ConfigParser import ConfigParser, NoOptionError", "def __getUrlSumsFromSection(section):\n curPath = os.path.abspath(os.path.dirn...
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-7-26 图片识别模块 @author: zhongfeng ''' import ImageFilter, ImageChops import Image import re,itertools import time try: import psyco psyco.full() except ImportError: pass class CaptchaAlgorithm(object): '''captcha algorithm''' def Le...
[ [ 8, 0, 0.0374, 0.0374, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0642, 0.0053, 0, 0.66, 0.1, 739, 0, 2, 0, 0, 739, 0, 0 ], [ 1, 0, 0.0695, 0.0053, 0, 0.66, ...
[ "'''\nCreated on 2011-7-26\n\n图片识别模块\n\n@author: zhongfeng\n'''", "import ImageFilter, ImageChops", "import Image", "import re,itertools", "import time", "try:\n import psyco\n psyco.full()\nexcept ImportError:\n pass", " import psyco", " psyco.full()", "class CaptchaAlgorithm(object)...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Created on 2011-7-27 主要用于从网站上爬取信息后,抽取页面信息; @author: zhongfeng ''' from BeautifulSoup import BeautifulSoup from crawlerhttp import UrlSummary, CrawlerType, crawleRetries from time import strftime import chardet, re from urlparse import urlparse from t...
[ [ 8, 0, 0.0236, 0.0236, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0404, 0.0034, 0, 0.66, 0.0435, 878, 0, 1, 0, 0, 878, 0, 0 ], [ 1, 0, 0.0438, 0.0034, 0, 0.66...
[ "'''\nCreated on 2011-7-27\n\n主要用于从网站上爬取信息后,抽取页面信息;\n\n@author: zhongfeng\n'''", "from BeautifulSoup import BeautifulSoup", "from crawlerhttp import UrlSummary, CrawlerType, crawleRetries", "from time import strftime", "import chardet, re", "from urlparse import urlparse", "from threadpool import WorkRe...
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-8-16 @author: zhongfeng ''' GOME_FEATURES_MAP = { ''' __ __ __ __ __ __ __ __ ## ## ''' : '.', ''' ____...
[ [ 8, 0, 0.0317, 0.0265, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.5291, 0.9471, 0, 0.66, 1, 764, 0, 0, 0, 0, 0, 6, 0 ] ]
[ "'''\nCreated on 2011-8-16\n\n@author: zhongfeng\n'''", "GOME_FEATURES_MAP = {\n '''\n__\n__\n__\n__\n__\n__" ]
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-7-26 国美价格图片识别模块 @author: zhongfeng ''' import ImageFilter, ImageChops from captcha_price import * from gome.gome_feature import GOME_FEATURES_MAP import Image import itertools import re import time try: import psyco psyco.full() except Import...
[ [ 8, 0, 0.0753, 0.0753, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.129, 0.0108, 0, 0.66, 0.0714, 739, 0, 2, 0, 0, 739, 0, 0 ], [ 1, 0, 0.1398, 0.0108, 0, 0.66,...
[ "'''\nCreated on 2011-7-26\n\n国美价格图片识别模块\n\n@author: zhongfeng\n'''", "import ImageFilter, ImageChops", "from captcha_price import *", "from gome.gome_feature import GOME_FEATURES_MAP", "import Image", "import itertools", "import re", "import time", "try:\n import psyco\n psyco.full()\nexcept ...
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-8-2 @author: zhongfeng ''' from gome.gomepageparser import parserDict,gomeRoot from spider import main if __name__ == '__main__': main(gomeRoot,parserDict)
[ [ 8, 0, 0.4286, 0.3571, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.7143, 0.0714, 0, 0.66, 0.3333, 874, 0, 2, 0, 0, 874, 0, 0 ], [ 1, 0, 0.7857, 0.0714, 0, 0.66...
[ "'''\nCreated on 2011-8-2\n\n@author: zhongfeng\n'''", "from gome.gomepageparser import parserDict,gomeRoot", "from spider import main", "if __name__ == '__main__':\n main(gomeRoot,parserDict)", " main(gomeRoot,parserDict)" ]
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-7-26 国美价格图片识别模块 @author: zhongfeng ''' import ImageFilter, ImageChops from captcha_price import * from gome.gome_feature import GOME_FEATURES_MAP import Image import itertools import re import time try: import psyco psyco.full() except Import...
[ [ 8, 0, 0.0753, 0.0753, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.129, 0.0108, 0, 0.66, 0.0714, 739, 0, 2, 0, 0, 739, 0, 0 ], [ 1, 0, 0.1398, 0.0108, 0, 0.66,...
[ "'''\nCreated on 2011-7-26\n\n国美价格图片识别模块\n\n@author: zhongfeng\n'''", "import ImageFilter, ImageChops", "from captcha_price import *", "from gome.gome_feature import GOME_FEATURES_MAP", "import Image", "import itertools", "import re", "import time", "try:\n import psyco\n psyco.full()\nexcept ...
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-8-2 @author: zhongfeng ''' from gome.gomepageparser import parserDict,gomeRoot from spider import main if __name__ == '__main__': main(gomeRoot,parserDict)
[ [ 8, 0, 0.4286, 0.3571, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.7143, 0.0714, 0, 0.66, 0.3333, 874, 0, 2, 0, 0, 874, 0, 0 ], [ 1, 0, 0.7857, 0.0714, 0, 0.66...
[ "'''\nCreated on 2011-8-2\n\n@author: zhongfeng\n'''", "from gome.gomepageparser import parserDict,gomeRoot", "from spider import main", "if __name__ == '__main__':\n main(gomeRoot,parserDict)", " main(gomeRoot,parserDict)" ]
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-8-16 @author: zhongfeng ''' GOME_FEATURES_MAP = { ''' __ __ __ __ __ __ __ __ ## ## ''' : '.', ''' ____...
[ [ 8, 0, 0.0317, 0.0265, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.5291, 0.9471, 0, 0.66, 1, 764, 0, 0, 0, 0, 0, 6, 0 ] ]
[ "'''\nCreated on 2011-8-16\n\n@author: zhongfeng\n'''", "GOME_FEATURES_MAP = {\n '''\n__\n__\n__\n__\n__\n__" ]
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Created on 2011-11-25 主要用于从网站上爬取信息后,抽取页面信息; @author: zhongfeng ''' from pageparser import * from spiderconfigparser import SpiderConfig lusenRoot = ObuyUrlSummary(url=r'http://www.lusen.com/', name='lusen') class LusenAllSortParser(RootCatagoryPage...
[ [ 8, 0, 0.056, 0.056, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.096, 0.008, 0, 0.66, 0.0667, 488, 0, 1, 0, 0, 488, 0, 0 ], [ 1, 0, 0.104, 0.008, 0, 0.66, ...
[ "'''\nCreated on 2011-11-25\n\n主要用于从网站上爬取信息后,抽取页面信息;\n\n@author: zhongfeng\n'''", "from pageparser import *", "from spiderconfigparser import SpiderConfig", "lusenRoot = ObuyUrlSummary(url=r'http://www.lusen.com/', name='lusen')", "class LusenAllSortParser(RootCatagoryPageParser): \n def __init__(self, d...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Created on 2011-11-25 主要用于从网站上爬取信息后,抽取页面信息; @author: zhongfeng ''' from pageparser import * from spiderconfigparser import SpiderConfig lusenRoot = ObuyUrlSummary(url=r'http://www.lusen.com/', name='lusen') class LusenAllSortParser(RootCatagoryPage...
[ [ 8, 0, 0.056, 0.056, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.096, 0.008, 0, 0.66, 0.0667, 488, 0, 1, 0, 0, 488, 0, 0 ], [ 1, 0, 0.104, 0.008, 0, 0.66, ...
[ "'''\nCreated on 2011-11-25\n\n主要用于从网站上爬取信息后,抽取页面信息;\n\n@author: zhongfeng\n'''", "from pageparser import *", "from spiderconfigparser import SpiderConfig", "lusenRoot = ObuyUrlSummary(url=r'http://www.lusen.com/', name='lusen')", "class LusenAllSortParser(RootCatagoryPageParser): \n def __init__(self, d...
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-8-2 @author: zhongfeng ''' from lusen.lusenpageparser import parserDict,lusenRoot from spider import main if __name__ == '__main__': main(lusenRoot,parserDict)
[ [ 8, 0, 0.4333, 0.4, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.7333, 0.0667, 0, 0.66, 0.3333, 925, 0, 2, 0, 0, 925, 0, 0 ], [ 1, 0, 0.8, 0.0667, 0, 0.66, ...
[ "'''\nCreated on 2011-8-2\n\n@author: zhongfeng\n\n'''", "from lusen.lusenpageparser import parserDict,lusenRoot", "from spider import main", "if __name__ == '__main__':\n main(lusenRoot,parserDict)", " main(lusenRoot,parserDict)" ]
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-8-2 @author: zhongfeng ''' from lusen.lusenpageparser import parserDict,lusenRoot from spider import main if __name__ == '__main__': main(lusenRoot,parserDict)
[ [ 8, 0, 0.4333, 0.4, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.7333, 0.0667, 0, 0.66, 0.3333, 925, 0, 2, 0, 0, 925, 0, 0 ], [ 1, 0, 0.8, 0.0667, 0, 0.66, ...
[ "'''\nCreated on 2011-8-2\n\n@author: zhongfeng\n\n'''", "from lusen.lusenpageparser import parserDict,lusenRoot", "from spider import main", "if __name__ == '__main__':\n main(lusenRoot,parserDict)", " main(lusenRoot,parserDict)" ]
#!/usr/bin/env python # -*- coding: utf-8 -*- import MySQLdb import os import hashlib #DB parameter def update360buyRepu(): conn = getConnect() qPage = MySQLQueryPagination(conn=conn, numPerPage=2000) sqlStr = r'SELECT id,repu FROM `prod_base_info_3c` where site_id=6' for result in ...
[ [ 1, 0, 0.0093, 0.0023, 0, 0.66, 0, 838, 0, 1, 0, 0, 838, 0, 0 ], [ 1, 0, 0.0116, 0.0023, 0, 0.66, 0.0278, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0162, 0.0023, 0, ...
[ "import MySQLdb", "import os", "import hashlib", "def update360buyRepu():\n conn = getConnect()\n qPage = MySQLQueryPagination(conn=conn, numPerPage=2000)\n sqlStr = r'SELECT id,repu FROM `prod_base_info_3c` where site_id=6'\n for result in qPage.queryForList(sql=sqlStr):\n prodList = []\n ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import MySQLdb import os import hashlib #DB parameter def update360buyRepu(): conn = getConnect() qPage = MySQLQueryPagination(conn=conn, numPerPage=2000) sqlStr = r'SELECT id,repu FROM `prod_base_info_3c` where site_id=6' for result in ...
[ [ 1, 0, 0.0093, 0.0023, 0, 0.66, 0, 838, 0, 1, 0, 0, 838, 0, 0 ], [ 1, 0, 0.0116, 0.0023, 0, 0.66, 0.0278, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0162, 0.0023, 0, ...
[ "import MySQLdb", "import os", "import hashlib", "def update360buyRepu():\n conn = getConnect()\n qPage = MySQLQueryPagination(conn=conn, numPerPage=2000)\n sqlStr = r'SELECT id,repu FROM `prod_base_info_3c` where site_id=6'\n for result in qPage.queryForList(sql=sqlStr):\n prodList = []\n ...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Created on 2011-7-27 主要用于从网站上爬取信息后,抽取页面信息; @author: zhongfeng ''' from BeautifulSoup import BeautifulSoup, Comment from pageparser import * import itertools import json import os import re import urllib import urlparse import string from enum impor...
[ [ 8, 0, 0.0195, 0.018, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0329, 0.003, 0, 0.66, 0.0333, 878, 0, 2, 0, 0, 878, 0, 0 ], [ 1, 0, 0.0359, 0.003, 0, 0.66, ...
[ "'''\nCreated on 2011-7-27\n主要用于从网站上爬取信息后,抽取页面信息;\n\n@author: zhongfeng\n'''", "from BeautifulSoup import BeautifulSoup, Comment", "from pageparser import *", "import itertools", "import json", "import os", "import re", "import urllib", "import urlparse", "import string", "from enum import Enum"...
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-8-2 @author: zhongfeng ''' from pageparser import ObuyUrlSummary from amazon.amazonpageparser import parserDict,rootUrlSummary from spider import ObuySpider,main import os,sys from logfacade import LoggerFactory class AmazonSpider(ObuySpi...
[ [ 8, 0, 0.1395, 0.1163, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2093, 0.0233, 0, 0.66, 0.1429, 488, 0, 1, 0, 0, 488, 0, 0 ], [ 1, 0, 0.2326, 0.0233, 0, 0.66...
[ "'''\nCreated on 2011-8-2\n\n@author: zhongfeng\n'''", "from pageparser import ObuyUrlSummary", "from amazon.amazonpageparser import parserDict,rootUrlSummary", "from spider import ObuySpider,main", "import os,sys", "from logfacade import LoggerFactory", "class AmazonSpider(ObuySpider):\n def __init_...
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-8-2 @author: zhongfeng ''' from pageparser import ObuyUrlSummary from amazon.amazonpageparser import parserDict,rootUrlSummary from spider import ObuySpider,main import os,sys from logfacade import LoggerFactory class AmazonSpider(ObuySpi...
[ [ 8, 0, 0.1395, 0.1163, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2093, 0.0233, 0, 0.66, 0.1429, 488, 0, 1, 0, 0, 488, 0, 0 ], [ 1, 0, 0.2326, 0.0233, 0, 0.66...
[ "'''\nCreated on 2011-8-2\n\n@author: zhongfeng\n'''", "from pageparser import ObuyUrlSummary", "from amazon.amazonpageparser import parserDict,rootUrlSummary", "from spider import ObuySpider,main", "import os,sys", "from logfacade import LoggerFactory", "class AmazonSpider(ObuySpider):\n def __init_...
#/usr/bin/env python # -*- coding: utf-8 -*- ''' Created on 2011-7-27 主要用于从网站上爬取信息后,抽取页面信息; @author: zhongfeng ''' from pageparser import * import re from copy import deepcopy class AmazonAllSortParser(RootCatagoryPageParser): ''' 从http://www.amazon.cn/gp/site-directory获取所有的分类信息, ...
[ [ 8, 0, 0.0333, 0.0333, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0571, 0.0048, 0, 0.66, 0.0556, 488, 0, 1, 0, 0, 488, 0, 0 ], [ 1, 0, 0.0619, 0.0048, 0, 0.66...
[ "'''\nCreated on 2011-7-27\n\n主要用于从网站上爬取信息后,抽取页面信息;\n\n@author: zhongfeng\n'''", "from pageparser import *", "import re", "from copy import deepcopy", "class AmazonAllSortParser(RootCatagoryPageParser):\n '''\n 从http://www.amazon.cn/gp/site-directory获取所有的分类信息,\n 组合成ObuyUrlSummary\n ...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Created on 2011-7-27 主要用于从网站上爬取信息后,抽取页面信息; @author: zhongfeng ''' from BeautifulSoup import BeautifulSoup, Comment from pageparser import * import itertools import json import os import re import urllib import urlparse import string from enum impor...
[ [ 8, 0, 0.0195, 0.018, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0329, 0.003, 0, 0.66, 0.0333, 878, 0, 2, 0, 0, 878, 0, 0 ], [ 1, 0, 0.0359, 0.003, 0, 0.66, ...
[ "'''\nCreated on 2011-7-27\n主要用于从网站上爬取信息后,抽取页面信息;\n\n@author: zhongfeng\n'''", "from BeautifulSoup import BeautifulSoup, Comment", "from pageparser import *", "import itertools", "import json", "import os", "import re", "import urllib", "import urlparse", "import string", "from enum import Enum"...
#/usr/bin/env python # -*- coding: utf-8 -*- ''' Created on 2011-10-10 @author: zhongfeng ''' ## {{{ http://code.activestate.com/recipes/84317/ (r2) from threading import Condition,Thread import copy class Future(object): def __init__(self,func,*param): # Constructor self.__d...
[ [ 8, 0, 0.0424, 0.0303, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0727, 0.0061, 0, 0.66, 0.0625, 83, 0, 2, 0, 0, 83, 0, 0 ], [ 1, 0, 0.0788, 0.0061, 0, 0.66, ...
[ "'''\nCreated on 2011-10-10\n\n@author: zhongfeng\n'''", "from threading import Condition,Thread", "import copy", "class Future(object):\n\n def __init__(self,func,*param):\n # Constructor\n self.__done=0\n self.__result=None\n self.__status='working'\n self.__C=Condition...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Created on 2011-8-02 主要用于从网站上爬取信息后,抽取页面信息; @author: zhongfeng ''' from pageparser import * from spiderconfigparser import SpiderConfig dangdangRoot = ObuyUrlSummary(url=r'http://category.dangdang.com/', name='dangdang') class DangDangAllSortParse...
[ [ 8, 0, 0.0383, 0.0383, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.071, 0.0055, 0, 0.66, 0.0625, 488, 0, 1, 0, 0, 488, 0, 0 ], [ 1, 0, 0.0765, 0.0055, 0, 0.66,...
[ "'''\nCreated on 2011-8-02\n\n主要用于从网站上爬取信息后,抽取页面信息;\n\n@author: zhongfeng\n'''", "from pageparser import *", "from spiderconfigparser import SpiderConfig", "dangdangRoot = ObuyUrlSummary(url=r'http://category.dangdang.com/', name='dangdang')", "class DangDangAllSortParser(RootCatagoryPageParser):\n '''\n...
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-8-2 @author: zhongfeng ''' from dangdang.dangpageparser import parserDict,dangdangRoot from spider import main if __name__ == '__main__': main(dangdangRoot,parserDict)
[ [ 8, 0, 0.4062, 0.375, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.6875, 0.0625, 0, 0.66, 0.3333, 945, 0, 2, 0, 0, 945, 0, 0 ], [ 1, 0, 0.8125, 0.0625, 0, 0.66,...
[ "'''\nCreated on 2011-8-2\n\n@author: zhongfeng\n\n'''", "from dangdang.dangpageparser import parserDict,dangdangRoot", "from spider import main", "if __name__ == '__main__':\n main(dangdangRoot,parserDict)", " main(dangdangRoot,parserDict)" ]
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-8-2 @author: zhongfeng ''' from dangdang.dangpageparser import parserDict,dangdangRoot from spider import main if __name__ == '__main__': main(dangdangRoot,parserDict)
[ [ 8, 0, 0.4062, 0.375, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.6875, 0.0625, 0, 0.66, 0.3333, 945, 0, 2, 0, 0, 945, 0, 0 ], [ 1, 0, 0.8125, 0.0625, 0, 0.66,...
[ "'''\nCreated on 2011-8-2\n\n@author: zhongfeng\n\n'''", "from dangdang.dangpageparser import parserDict,dangdangRoot", "from spider import main", "if __name__ == '__main__':\n main(dangdangRoot,parserDict)", " main(dangdangRoot,parserDict)" ]
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Created on 2011-8-02 主要用于从网站上爬取信息后,抽取页面信息; @author: zhongfeng ''' from pageparser import * from spiderconfigparser import SpiderConfig dangdangRoot = ObuyUrlSummary(url=r'http://category.dangdang.com/', name='dangdang') class DangDangAllSortParse...
[ [ 8, 0, 0.0383, 0.0383, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.071, 0.0055, 0, 0.66, 0.0625, 488, 0, 1, 0, 0, 488, 0, 0 ], [ 1, 0, 0.0765, 0.0055, 0, 0.66,...
[ "'''\nCreated on 2011-8-02\n\n主要用于从网站上爬取信息后,抽取页面信息;\n\n@author: zhongfeng\n'''", "from pageparser import *", "from spiderconfigparser import SpiderConfig", "dangdangRoot = ObuyUrlSummary(url=r'http://category.dangdang.com/', name='dangdang')", "class DangDangAllSortParser(RootCatagoryPageParser):\n '''\n...
#/usr/bin/env python # -*- coding: utf-8 -*- ''' Created on 2011-07-11 日志工厂类 @author: zhongfeng ''' import logging.config import os,sys class LoggerFactory(object): _loggerFac = None def __init__(self): pass def __new__(cls): ''' 单态实现,初始化一次 ...
[ [ 8, 0, 0.08, 0.0933, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1333, 0.0133, 0, 0.66, 0.2, 232, 0, 1, 0, 0, 232, 0, 0 ], [ 1, 0, 0.1467, 0.0133, 0, 0.66, ...
[ "'''\nCreated on 2011-07-11\n\n日志工厂类\n\n@author: zhongfeng\n'''", "import logging.config", "import os,sys", "class LoggerFactory(object):\n _loggerFac = None\n def __init__(self):\n pass\n def __new__(cls):\n '''\n 单态实现,初始化一次 \n '''", " _loggerFac = None",...
import os, marshal, thread # Filename used for index files, must not contain numbers INDEX_FILENAME = 'index' # Exception thrown when calling get() on an empty queue class Empty(Exception): pass class PersistentQueue: def __init__(self, name, cache_size=512, marshal=marshal): """ Create a persi...
[ [ 1, 0, 0.005, 0.005, 0, 0.66, 0, 688, 0, 3, 0, 0, 688, 0, 0 ], [ 14, 0, 0.0198, 0.005, 0, 0.66, 0.25, 961, 1, 0, 0, 0, 0, 3, 0 ], [ 3, 0, 0.0347, 0.005, 0, 0.66, ...
[ "import os, marshal, thread", "INDEX_FILENAME = 'index'", "class Empty(Exception): pass", "class PersistentQueue:\n\n def __init__(self, name, cache_size=512, marshal=marshal):\n \"\"\"\n Create a persistent FIFO queue named by the 'name' argument.\n\n The number of cached queue items...
#/usr/bin/env python # -*- coding: utf-8 -*- ''' Created on 2011-11-9 @author: zhongfeng ''' from egou.egoupageparser import * from crawlerhttp import crawle from pageparser import * from dbproc.catagoryproc import * def getContentFromUrlSum(urlsum): while True: result = crawle(urlsum)...
[ [ 8, 0, 0.1053, 0.0877, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1754, 0.0175, 0, 0.66, 0.125, 157, 0, 1, 0, 0, 157, 0, 0 ], [ 1, 0, 0.193, 0.0175, 0, 0.66, ...
[ "'''\nCreated on 2011-11-9\n\n@author: zhongfeng\n'''", "from egou.egoupageparser import *", "from crawlerhttp import crawle", "from pageparser import *", "from dbproc.catagoryproc import *", "def getContentFromUrlSum(urlsum):\n while True:\n result = crawle(urlsum)\n if result.code == 20...
#/usr/bin/env python # -*- coding: utf-8 -*- ''' Created on 2011-11-09 @author: zhongfeng ''' import re from pageparser import * egouRoot = ObuyUrlSummary(url=r'http://www.egou.com/', name='egou') mainHost = 'http://www.egou.com' def filterCatName(name): p = re.compile(r'\([0-9]*\)') retur...
[ [ 8, 0, 0.0448, 0.0373, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0746, 0.0075, 0, 0.66, 0.0588, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0821, 0.0075, 0, 0.66...
[ "'''\nCreated on 2011-11-09\n\n@author: zhongfeng\n'''", "import re", "from pageparser import *", "egouRoot = ObuyUrlSummary(url=r'http://www.egou.com/', name='egou')", "mainHost = 'http://www.egou.com'", "def filterCatName(name):\n p = re.compile(r'\\([0-9]*\\)')\n return p.sub('',name)", " p ...
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-8-2 @author: zhongfeng ''' from newegg.neweggpageparser import parserDict,newEggRoot from spider import main if __name__ == '__main__': main(newEggRoot,parserDict)
[ [ 8, 0, 0.4333, 0.4, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.7333, 0.0667, 0, 0.66, 0.3333, 638, 0, 2, 0, 0, 638, 0, 0 ], [ 1, 0, 0.8, 0.0667, 0, 0.66, ...
[ "'''\nCreated on 2011-8-2\n\n@author: zhongfeng\n\n'''", "from newegg.neweggpageparser import parserDict,newEggRoot", "from spider import main", "if __name__ == '__main__':\n main(newEggRoot,parserDict)", " main(newEggRoot,parserDict)" ]
#/usr/bin/env python # -*- coding: utf-8 -*- ''' Created on 2011-7-27 主要用于从网站上爬取信息后,抽取页面信息; @author: zhongfeng ''' from pageparser import * import re from spiderconfigparser import SpiderConfig from crawlerhttp import crawleRetries from utils import Future newEggRoot = ObuyUrlSummary(url=ur'http:/...
[ [ 8, 0, 0.0341, 0.0341, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0585, 0.0049, 0, 0.66, 0.0556, 488, 0, 1, 0, 0, 488, 0, 0 ], [ 1, 0, 0.0634, 0.0049, 0, 0.66...
[ "'''\nCreated on 2011-7-27\n\n主要用于从网站上爬取信息后,抽取页面信息;\n\n@author: zhongfeng\n'''", "from pageparser import *", "import re", "from spiderconfigparser import SpiderConfig", "from crawlerhttp import crawleRetries", "from utils import Future", "class NewEggAllSortParser(RootCatagoryPageParser):\n '''\n ...
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-8-2 @author: zhongfeng ''' from newegg.neweggpageparser import parserDict,newEggRoot from spider import main if __name__ == '__main__': main(newEggRoot,parserDict)
[ [ 8, 0, 0.4333, 0.4, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.7333, 0.0667, 0, 0.66, 0.3333, 638, 0, 2, 0, 0, 638, 0, 0 ], [ 1, 0, 0.8, 0.0667, 0, 0.66, ...
[ "'''\nCreated on 2011-8-2\n\n@author: zhongfeng\n\n'''", "from newegg.neweggpageparser import parserDict,newEggRoot", "from spider import main", "if __name__ == '__main__':\n main(newEggRoot,parserDict)", " main(newEggRoot,parserDict)" ]
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Created on 2011-7-27 主要用于从网站上爬取信息后,抽取页面信息; @author: zhongfeng ''' from BeautifulSoup import BeautifulSoup from crawlerhttp import UrlSummary, CrawlerType, crawleRetries from time import strftime import chardet, re from urlparse import urlparse from t...
[ [ 8, 0, 0.0236, 0.0236, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0404, 0.0034, 0, 0.66, 0.0435, 878, 0, 1, 0, 0, 878, 0, 0 ], [ 1, 0, 0.0438, 0.0034, 0, 0.66...
[ "'''\nCreated on 2011-7-27\n\n主要用于从网站上爬取信息后,抽取页面信息;\n\n@author: zhongfeng\n'''", "from BeautifulSoup import BeautifulSoup", "from crawlerhttp import UrlSummary, CrawlerType, crawleRetries", "from time import strftime", "import chardet, re", "from urlparse import urlparse", "from threadpool import WorkRe...
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-8-16 @author: zhongfeng ''' COO8_FEATURES_MAP = { ''' __ __ __ __ __ __ __ __ __ __ ## #_ ''' : '.', ...
[ [ 8, 0, 0.0258, 0.0215, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.5236, 0.9571, 0, 0.66, 1, 864, 0, 0, 0, 0, 0, 6, 0 ] ]
[ "'''\nCreated on 2011-8-16\n\n@author: zhongfeng\n'''", "COO8_FEATURES_MAP = {\n '''\n__\n__\n__\n__\n__\n__" ]
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-8-16 @author: zhongfeng ''' COO8_FEATURES_MAP = { ''' __ __ __ __ __ __ __ __ __ ## #_ ## ''' : '.', ...
[ [ 8, 0, 0.0278, 0.0231, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.5255, 0.9537, 0, 0.66, 1, 864, 0, 0, 0, 0, 0, 6, 0 ] ]
[ "'''\nCreated on 2011-8-16\n\n@author: zhongfeng\n'''", "COO8_FEATURES_MAP = {\n '''\n__\n__\n__\n__\n__\n__" ]
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-7-26 京东价格图片识别模块 @author: zhongfeng ''' import ImageFilter, ImageChops from captcha_price import * from coo8.coo8_feature2 import COO8_FEATURES_MAP import Image import itertools import re import time try: import psyco psyco.full() except Impor...
[ [ 8, 0, 0.1045, 0.1045, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1791, 0.0149, 0, 0.66, 0.0667, 739, 0, 2, 0, 0, 739, 0, 0 ], [ 1, 0, 0.194, 0.0149, 0, 0.66,...
[ "'''\nCreated on 2011-7-26\n\n京东价格图片识别模块\n\n@author: zhongfeng\n'''", "import ImageFilter, ImageChops", "from captcha_price import *", "from coo8.coo8_feature2 import COO8_FEATURES_MAP", "import Image", "import itertools", "import re", "import time", "try:\n import psyco\n psyco.full()\nexcept...
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-7-26 京东价格图片识别模块 @author: zhongfeng ''' import ImageFilter, ImageChops from captcha_price import * from coo8.coo8_feature2 import COO8_FEATURES_MAP import Image import itertools import re import time try: import psyco psyco.full() except Impor...
[ [ 8, 0, 0.1045, 0.1045, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1791, 0.0149, 0, 0.66, 0.0667, 739, 0, 2, 0, 0, 739, 0, 0 ], [ 1, 0, 0.194, 0.0149, 0, 0.66,...
[ "'''\nCreated on 2011-7-26\n\n京东价格图片识别模块\n\n@author: zhongfeng\n'''", "import ImageFilter, ImageChops", "from captcha_price import *", "from coo8.coo8_feature2 import COO8_FEATURES_MAP", "import Image", "import itertools", "import re", "import time", "try:\n import psyco\n psyco.full()\nexcept...
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-8-1 @author: zhongfeng ''' from coo8.coo8pageparser import parserDict,coo8Root from spider import main if __name__ == '__main__': main(coo8Root,parserDict)
[ [ 8, 0, 0.4062, 0.375, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.6875, 0.0625, 0, 0.66, 0.3333, 430, 0, 2, 0, 0, 430, 0, 0 ], [ 1, 0, 0.75, 0.0625, 0, 0.66, ...
[ "'''\nCreated on 2011-8-1\n\n@author: zhongfeng\n\n'''", "from coo8.coo8pageparser import parserDict,coo8Root", "from spider import main", "if __name__ == '__main__':\n main(coo8Root,parserDict)", " main(coo8Root,parserDict)" ]
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-8-16 @author: zhongfeng ''' COO8_FEATURES_MAP = { ''' __ __ __ __ __ __ __ __ __ ## #_ ## ''' : '.', ...
[ [ 8, 0, 0.0278, 0.0231, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.5255, 0.9537, 0, 0.66, 1, 864, 0, 0, 0, 0, 0, 6, 0 ] ]
[ "'''\nCreated on 2011-8-16\n\n@author: zhongfeng\n'''", "COO8_FEATURES_MAP = {\n '''\n__\n__\n__\n__\n__\n__" ]
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-8-16 @author: zhongfeng ''' COO8_FEATURES_MAP = { ''' __ __ __ __ __ __ __ __ __ __ ## #_ ''' : '.', ...
[ [ 8, 0, 0.0258, 0.0215, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.5236, 0.9571, 0, 0.66, 1, 864, 0, 0, 0, 0, 0, 6, 0 ] ]
[ "'''\nCreated on 2011-8-16\n\n@author: zhongfeng\n'''", "COO8_FEATURES_MAP = {\n '''\n__\n__\n__\n__\n__\n__" ]
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Created on 2011-8-7 主要用于从网站上爬取信息后,抽取页面信息; @author: zhongfeng ''' from cStringIO import StringIO from coo8.image_price import captcha_coo8 from crawlerhttp import crawleRetries from pageparser import * from threadpool import ThreadPool, WorkRequest im...
[ [ 8, 0, 0.0326, 0.0326, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0558, 0.0047, 0, 0.66, 0.04, 764, 0, 1, 0, 0, 764, 0, 0 ], [ 1, 0, 0.0605, 0.0047, 0, 0.66, ...
[ "'''\nCreated on 2011-8-7\n\n主要用于从网站上爬取信息后,抽取页面信息;\n\n@author: zhongfeng\n'''", "from cStringIO import StringIO", "from coo8.image_price import captcha_coo8", "from crawlerhttp import crawleRetries", "from pageparser import *", "from threadpool import ThreadPool, WorkRequest", "import json", "import o...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Created on 2011-8-7 主要用于从网站上爬取信息后,抽取页面信息; @author: zhongfeng ''' from cStringIO import StringIO from coo8.image_price import captcha_coo8 from crawlerhttp import crawleRetries from pageparser import * from threadpool import ThreadPool, WorkRequest im...
[ [ 8, 0, 0.0326, 0.0326, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0558, 0.0047, 0, 0.66, 0.04, 764, 0, 1, 0, 0, 764, 0, 0 ], [ 1, 0, 0.0605, 0.0047, 0, 0.66, ...
[ "'''\nCreated on 2011-8-7\n\n主要用于从网站上爬取信息后,抽取页面信息;\n\n@author: zhongfeng\n'''", "from cStringIO import StringIO", "from coo8.image_price import captcha_coo8", "from crawlerhttp import crawleRetries", "from pageparser import *", "from threadpool import ThreadPool, WorkRequest", "import json", "import o...
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-8-1 @author: zhongfeng ''' from coo8.coo8pageparser import parserDict,coo8Root from spider import main if __name__ == '__main__': main(coo8Root,parserDict)
[ [ 8, 0, 0.4062, 0.375, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.6875, 0.0625, 0, 0.66, 0.3333, 430, 0, 2, 0, 0, 430, 0, 0 ], [ 1, 0, 0.75, 0.0625, 0, 0.66, ...
[ "'''\nCreated on 2011-8-1\n\n@author: zhongfeng\n\n'''", "from coo8.coo8pageparser import parserDict,coo8Root", "from spider import main", "if __name__ == '__main__':\n main(coo8Root,parserDict)", " main(coo8Root,parserDict)" ]
#/usr/bin/env python # -*- coding: utf-8 -*- ''' Created on 2011-9-19 @author: zhongfeng ''' import sys,os from dbproc.basedbproc import * def createSiteCat(urls, siteName, catKeyFunc=getCatKey,saveFlag = True): siteId = getSiteIdByName(siteName) for urlsum in urls: parent = urlsum.pare...
[ [ 8, 0, 0.0233, 0.0194, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0349, 0.0039, 0, 0.66, 0.0455, 509, 0, 2, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0388, 0.0039, 0, 0.66...
[ "'''\nCreated on 2011-9-19\n\n@author: zhongfeng\n'''", "import sys,os", "from dbproc.basedbproc import *", "def createSiteCat(urls, siteName, catKeyFunc=getCatKey,saveFlag = True):\n siteId = getSiteIdByName(siteName)\n for urlsum in urls:\n parent = urlsum.parentPath\n path = []\n ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os,sys import glob from dbproc.basedbproc import getConnect,initClientEncode #=============================================================================== # 表 `prod_catagory` db proc #=====================================================================...
[ [ 1, 0, 0.0533, 0.0133, 0, 0.66, 0, 688, 0, 2, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0667, 0.0133, 0, 0.66, 0.1429, 958, 0, 1, 0, 0, 958, 0, 0 ], [ 1, 0, 0.08, 0.0133, 0, 0....
[ "import os,sys", "import glob", "from dbproc.basedbproc import getConnect,initClientEncode", "def updateProdCat(conn,selfCatId,catBaseId,id):\n ''' 更新各站点三级分类的对应的自有分类和所属大类别信息 '''\n curs = initClientEncode(conn)\n sqlStr = '''UPDATE `prod_catagory` SET `self_cat_id` = %s,\n ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os,sys import glob from dbproc.basedbproc import getConnect,initClientEncode #=============================================================================== # 表 `prod_catagory` db proc #=====================================================================...
[ [ 1, 0, 0.0533, 0.0133, 0, 0.66, 0, 688, 0, 2, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0667, 0.0133, 0, 0.66, 0.1429, 958, 0, 1, 0, 0, 958, 0, 0 ], [ 1, 0, 0.08, 0.0133, 0, 0....
[ "import os,sys", "import glob", "from dbproc.basedbproc import getConnect,initClientEncode", "def updateProdCat(conn,selfCatId,catBaseId,id):\n ''' 更新各站点三级分类的对应的自有分类和所属大类别信息 '''\n curs = initClientEncode(conn)\n sqlStr = '''UPDATE `prod_catagory` SET `self_cat_id` = %s,\n ...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Created on 2011-11-11 @author: zhongfeng ''' from itertools import chain import os from dbproc.basedbproc import getCatBySiteIdAndLevel,getAllWebsiteBaseInfo,seEncode def createSiteCat(site_id): catDict = {} for level in xrange(0,3): c...
[ [ 8, 0, 0.1714, 0.1429, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2571, 0.0286, 0, 0.66, 0.2, 808, 0, 1, 0, 0, 808, 0, 0 ], [ 1, 0, 0.2857, 0.0286, 0, 0.66, ...
[ "'''\nCreated on 2011-11-11\n\n@author: zhongfeng\n'''", "from itertools import chain", "import os", "from dbproc.basedbproc import getCatBySiteIdAndLevel,getAllWebsiteBaseInfo,seEncode", "def createSiteCat(site_id):\n catDict = {}\n for level in xrange(0,3):\n catLevelRet = getCatBySiteIdAndLe...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Created on 2011-11-11 @author: zhongfeng ''' from itertools import chain import os from dbproc.basedbproc import getCatBySiteIdAndLevel,getAllWebsiteBaseInfo,seEncode def createSiteCat(site_id): catDict = {} for level in xrange(0,3): c...
[ [ 8, 0, 0.1714, 0.1429, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2571, 0.0286, 0, 0.66, 0.2, 808, 0, 1, 0, 0, 808, 0, 0 ], [ 1, 0, 0.2857, 0.0286, 0, 0.66, ...
[ "'''\nCreated on 2011-11-11\n\n@author: zhongfeng\n'''", "from itertools import chain", "import os", "from dbproc.basedbproc import getCatBySiteIdAndLevel,getAllWebsiteBaseInfo,seEncode", "def createSiteCat(site_id):\n catDict = {}\n for level in xrange(0,3):\n catLevelRet = getCatBySiteIdAndLe...
#! /usr/bin/env python # -*- coding: utf-8 -*- import ez_setup import shutil, sys, os, glob ez_setup.use_setuptools() from setuptools import setup, find_packages import py2exe curpath = os.path.dirname(os.path.abspath(__file__)) def find_py_modules(): fileList = (os.path.split(full)[-1] for full...
[ [ 1, 0, 0.0488, 0.0122, 0, 0.66, 0, 650, 0, 1, 0, 0, 650, 0, 0 ], [ 1, 0, 0.061, 0.0122, 0, 0.66, 0.1, 614, 0, 4, 0, 0, 614, 0, 0 ], [ 8, 0, 0.0854, 0.0122, 0, 0.66...
[ "import ez_setup", "import shutil, sys, os, glob", "ez_setup.use_setuptools()", "from setuptools import setup, find_packages", "import py2exe", "curpath = os.path.dirname(os.path.abspath(__file__))", "def find_py_modules():\n\n fileList = (os.path.split(full)[-1] for full in glob.glob(os.path.join(cu...
#! /usr/bin/env python # -*- coding: utf-8 -*- import ez_setup import shutil, sys, os, glob ez_setup.use_setuptools() from setuptools import setup, find_packages import py2exe curpath = os.path.dirname(os.path.abspath(__file__)) def find_py_modules(): fileList = (os.path.split(full)[-1] for full...
[ [ 1, 0, 0.0488, 0.0122, 0, 0.66, 0, 650, 0, 1, 0, 0, 650, 0, 0 ], [ 1, 0, 0.061, 0.0122, 0, 0.66, 0.1, 614, 0, 4, 0, 0, 614, 0, 0 ], [ 8, 0, 0.0854, 0.0122, 0, 0.66...
[ "import ez_setup", "import shutil, sys, os, glob", "ez_setup.use_setuptools()", "from setuptools import setup, find_packages", "import py2exe", "curpath = os.path.dirname(os.path.abspath(__file__))", "def find_py_modules():\n\n fileList = (os.path.split(full)[-1] for full in glob.glob(os.path.join(cu...
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-7-26 京东价格图片识别模块 @author: zhongfeng ''' import ImageFilter, ImageChops from captcha_price import * from j360buy.j360_feature import __360buy_FEATURES_MAP__ import Image import re import time try: import psyco psyco.full() except ImportError: ...
[ [ 8, 0, 0.0769, 0.0769, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1319, 0.011, 0, 0.66, 0.0909, 739, 0, 2, 0, 0, 739, 0, 0 ], [ 1, 0, 0.1429, 0.011, 0, 0.66, ...
[ "'''\nCreated on 2011-7-26\n\n京东价格图片识别模块\n\n@author: zhongfeng\n'''", "import ImageFilter, ImageChops", "from captcha_price import *", "from j360buy.j360_feature import __360buy_FEATURES_MAP__", "import Image", "import re", "import time", "try:\n import psyco\n psyco.full()\nexcept ImportError:\...
#/usr/bin/env python # -*- coding: utf-8 -*- ''' Created on 2011-7-27 主要用于从网站上爬取信息后,抽取页面信息; @author: zhongfeng ''' from cStringIO import StringIO from j360buy.image_price import captcha_360buy from crawlerhttp import crawle from pageparser import * from threadpool import ThreadPool, WorkRequest impo...
[ [ 8, 0, 0.0414, 0.0414, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.071, 0.0059, 0, 0.66, 0.05, 764, 0, 1, 0, 0, 764, 0, 0 ], [ 1, 0, 0.0769, 0.0059, 0, 0.66, ...
[ "'''\nCreated on 2011-7-27\n\n主要用于从网站上爬取信息后,抽取页面信息;\n\n@author: zhongfeng\n'''", "from cStringIO import StringIO", "from j360buy.image_price import captcha_360buy", "from crawlerhttp import crawle", "from pageparser import *", "from threadpool import ThreadPool, WorkRequest", "import json", "import os...
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-8-16 @author: zhongfeng ''' __360buy_FEATURES_MAP__ = { ''' __ __ __ __ __ ...
[ [ 8, 0, 0.0282, 0.0235, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.5258, 0.9531, 0, 0.66, 1, 768, 0, 0, 0, 0, 0, 6, 0 ] ]
[ "'''\nCreated on 2011-8-16\n\n@author: zhongfeng\n'''", "__360buy_FEATURES_MAP__ = {\n '''\n __\n __\n __\n __\n __\n __" ]
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-7-26 京东价格图片识别模块 @author: zhongfeng ''' import ImageFilter, ImageChops from captcha_price import * from j360buy.j360_feature import __360buy_FEATURES_MAP__ import Image import re import time try: import psyco psyco.full() except ImportError: ...
[ [ 8, 0, 0.0769, 0.0769, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1319, 0.011, 0, 0.66, 0.0909, 739, 0, 2, 0, 0, 739, 0, 0 ], [ 1, 0, 0.1429, 0.011, 0, 0.66, ...
[ "'''\nCreated on 2011-7-26\n\n京东价格图片识别模块\n\n@author: zhongfeng\n'''", "import ImageFilter, ImageChops", "from captcha_price import *", "from j360buy.j360_feature import __360buy_FEATURES_MAP__", "import Image", "import re", "import time", "try:\n import psyco\n psyco.full()\nexcept ImportError:\...
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-8-1 @author: zhongfeng ''' from j360pageparser import J360buyAllSortParser,J360buySort3PageParser,J360buySort4PageParser from pageparser import ObuyUrlSummary from spider import ObuySpider if __name__ == '__main__': parserDict = {0...
[ [ 8, 0, 0.1463, 0.122, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2439, 0.0244, 0, 0.66, 0.25, 566, 0, 3, 0, 0, 566, 0, 0 ], [ 1, 0, 0.2683, 0.0244, 0, 0.66, ...
[ "'''\nCreated on 2011-8-1\n\n@author: zhongfeng\n'''", "from j360pageparser import J360buyAllSortParser,J360buySort3PageParser,J360buySort4PageParser", "from pageparser import ObuyUrlSummary", "from spider import ObuySpider", "if __name__ == '__main__':\n\n parserDict = {0:J360buyAllSortParser,3:J360buyS...
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-8-16 @author: zhongfeng ''' __360buy_FEATURES_MAP__ = { ''' __ __ __ __ __ ...
[ [ 8, 0, 0.0282, 0.0235, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.5258, 0.9531, 0, 0.66, 1, 768, 0, 0, 0, 0, 0, 6, 0 ] ]
[ "'''\nCreated on 2011-8-16\n\n@author: zhongfeng\n'''", "__360buy_FEATURES_MAP__ = {\n '''\n __\n __\n __\n __\n __\n __" ]
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-8-1 @author: zhongfeng ''' from j360pageparser import J360buyAllSortParser,J360buySort3PageParser,J360buySort4PageParser from pageparser import ObuyUrlSummary from spider import ObuySpider if __name__ == '__main__': parserDict = {0...
[ [ 8, 0, 0.1463, 0.122, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2439, 0.0244, 0, 0.66, 0.25, 566, 0, 3, 0, 0, 566, 0, 0 ], [ 1, 0, 0.2683, 0.0244, 0, 0.66, ...
[ "'''\nCreated on 2011-8-1\n\n@author: zhongfeng\n'''", "from j360pageparser import J360buyAllSortParser,J360buySort3PageParser,J360buySort4PageParser", "from pageparser import ObuyUrlSummary", "from spider import ObuySpider", "if __name__ == '__main__':\n\n parserDict = {0:J360buyAllSortParser,3:J360buyS...
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-7-26 京东价格图片识别模块 @author: zhongfeng ''' import ImageFilter, ImageChops import Image import re import time try: import psyco psyco.full() except ImportError: pass class CaptchaAlgorithm(object): '''captcha algorithm''' def Levensht...
[ [ 8, 0, 0.056, 0.056, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.096, 0.008, 0, 0.66, 0.1, 739, 0, 2, 0, 0, 739, 0, 0 ], [ 1, 0, 0.104, 0.008, 0, 0.66, 0.2...
[ "'''\nCreated on 2011-7-26\n\n京东价格图片识别模块\n\n@author: zhongfeng\n'''", "import ImageFilter, ImageChops", "import Image", "import re", "import time", "try:\n import psyco\n psyco.full()\nexcept ImportError:\n pass", " import psyco", " psyco.full()", "class CaptchaAlgorithm(object):\n ...
#/usr/bin/env python # -*- coding: utf-8 -*- ''' Created on 2011-8-02 主要用于从网站上爬取信息后,抽取页面信息; @author: zhongfeng ''' from pageparser import * class IcsonAllSortParser(RootCatagoryPageParser): ''' 从http://sz.icson.com/portal.html获取所有的分类信息, 组合成ObuyUrlSummary ''' ...
[ [ 8, 0, 0.0479, 0.0479, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.089, 0.0068, 0, 0.66, 0.0769, 488, 0, 1, 0, 0, 488, 0, 0 ], [ 3, 0, 0.1849, 0.1712, 0, 0.66,...
[ "'''\nCreated on 2011-8-02\n\n主要用于从网站上爬取信息后,抽取页面信息;\n\n@author: zhongfeng\n'''", "from pageparser import *", "class IcsonAllSortParser(RootCatagoryPageParser):\n '''\n 从http://sz.icson.com/portal.html获取所有的分类信息,\n 组合成ObuyUrlSummary\n ''' \n mainHost = 'http://sz.icson.com/'\n ...
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-8-2 @author: zhongfeng ''' from icson.icsonpageparser import IcsonAllSortParser,IcsonSort3PageParser,IcsonSort4PageParser from pageparser import ObuyUrlSummary from spider import ObuySpider if __name__ == '__main__': parserDict = {...
[ [ 8, 0, 0.1667, 0.1389, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2778, 0.0278, 0, 0.66, 0.25, 965, 0, 3, 0, 0, 965, 0, 0 ], [ 1, 0, 0.3056, 0.0278, 0, 0.66, ...
[ "'''\nCreated on 2011-8-2\n\n@author: zhongfeng\n'''", "from icson.icsonpageparser import IcsonAllSortParser,IcsonSort3PageParser,IcsonSort4PageParser", "from pageparser import ObuyUrlSummary", "from spider import ObuySpider", "if __name__ == '__main__':\n\n parserDict = {0:IcsonAllSortParser,3:IcsonSort...
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-8-2 @author: zhongfeng ''' from icson.icsonpageparser import IcsonAllSortParser,IcsonSort3PageParser,IcsonSort4PageParser from pageparser import ObuyUrlSummary from spider import ObuySpider if __name__ == '__main__': parserDict = {...
[ [ 8, 0, 0.1667, 0.1389, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2778, 0.0278, 0, 0.66, 0.25, 965, 0, 3, 0, 0, 965, 0, 0 ], [ 1, 0, 0.3056, 0.0278, 0, 0.66, ...
[ "'''\nCreated on 2011-8-2\n\n@author: zhongfeng\n'''", "from icson.icsonpageparser import IcsonAllSortParser,IcsonSort3PageParser,IcsonSort4PageParser", "from pageparser import ObuyUrlSummary", "from spider import ObuySpider", "if __name__ == '__main__':\n\n parserDict = {0:IcsonAllSortParser,3:IcsonSort...
#! /usr/bin/env python # -*- coding: utf-8 -*- # setup.py # Part of 21obuys, a package providing enumerated types for Python. # # Copyright © 2007 Ben Finney # This is free software; you may copy, modify and/or distribute this work # under the terms of the GNU General Public License, version 2 or later # or, at your ...
[ [ 1, 0, 0.22, 0.02, 0, 0.66, 0, 650, 0, 1, 0, 0, 650, 0, 0 ], [ 8, 0, 0.24, 0.02, 0, 0.66, 0.3333, 479, 3, 0, 0, 0, 0, 0, 1 ], [ 1, 0, 0.28, 0.02, 0, 0.66, 0.66...
[ "import ez_setup", "ez_setup.use_setuptools()", "from setuptools import setup, find_packages", "setup(\n name = \"21obus\",\n version = '1.0',\n scripts = ['src/360buyspider.py'],\n packages = find_packages('src'), # include all packages under src\n package_dir = {'':'src'}, # tell distutils...
#/usr/bin/env python # -*- coding: utf-8 -*- import re import time import random from BeautifulSoup import BeautifulSoup from crawlerhttp import UrlSummary, crawle urlsProxy = ["http://proxy.ipcn.org/proxylist.html"] #urlsProxy = ["http://www.proxycn.com/html_proxy/http-1.html"] desSite = 'http://www.360...
[ [ 1, 0, 0.0656, 0.0164, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.082, 0.0164, 0, 0.66, 0.1111, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 1, 0, 0.0984, 0.0164, 0, 0...
[ "import re", "import time", "import random", "from BeautifulSoup import BeautifulSoup", "from crawlerhttp import UrlSummary, crawle", "urlsProxy = [\"http://proxy.ipcn.org/proxylist.html\"]", "desSite = 'http://www.360buy.com'", "class ChoiceProxy(object):\n proxyList = []\n def __init__(self):\...
#/usr/bin/env python # -*- coding: utf-8 -*- ''' Created on 2011-7-27 主要用于从网站上爬取信息后,抽取页面信息; @author: zhongfeng ''' from pageparser import * class SuningAllSortParser(RootCatagoryPageParser): ''' 从http://www.suning.com/获取所有的分类信息, 组合成ObuyUrlSummary ''' mainHos...
[ [ 8, 0, 0.0556, 0.0556, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0952, 0.0079, 0, 0.66, 0.0833, 488, 0, 1, 0, 0, 488, 0, 0 ], [ 3, 0, 0.2183, 0.2222, 0, 0.66...
[ "'''\nCreated on 2011-7-27\n\n主要用于从网站上爬取信息后,抽取页面信息;\n\n@author: zhongfeng\n'''", "from pageparser import *", "class SuningAllSortParser(RootCatagoryPageParser):\n '''\n 从http://www.suning.com/获取所有的分类信息,\n 组合成ObuyUrlSummary\n ''' \n mainHost = r'http://www.suning.com' \n def _...
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-7-26 京东价格图片识别模块 @author: zhongfeng ''' import ImageFilter, ImageChops import Image import re import time try: import psyco psyco.full() except ImportError: pass class CaptchaAlgorithm(object): '''captcha algorithm''' def Levensht...
[ [ 8, 0, 0.056, 0.056, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.096, 0.008, 0, 0.66, 0.1, 739, 0, 2, 0, 0, 739, 0, 0 ], [ 1, 0, 0.104, 0.008, 0, 0.66, 0.2...
[ "'''\nCreated on 2011-7-26\n\n京东价格图片识别模块\n\n@author: zhongfeng\n'''", "import ImageFilter, ImageChops", "import Image", "import re", "import time", "try:\n import psyco\n psyco.full()\nexcept ImportError:\n pass", " import psyco", " psyco.full()", "class CaptchaAlgorithm(object):\n ...
#/usr/bin/env python # -*- coding: utf-8 -*- ''' Created on 2011-7-27 主要用于从网站上爬取信息后,抽取页面信息; @author: zhongfeng ''' from pageparser import * class GomeAllSortParser(RootCatagoryPageParser): ''' 从http://www.gome.com.cn/allSort.html获取所有的分类信息, 组合成ObuyUrlSummary ''' ...
[ [ 8, 0, 0.0543, 0.0543, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.093, 0.0078, 0, 0.66, 0.0833, 488, 0, 1, 0, 0, 488, 0, 0 ], [ 3, 0, 0.2326, 0.2558, 0, 0.66,...
[ "'''\nCreated on 2011-7-27\n\n主要用于从网站上爬取信息后,抽取页面信息;\n\n@author: zhongfeng\n'''", "from pageparser import *", "class GomeAllSortParser(RootCatagoryPageParser):\n '''\n 从http://www.gome.com.cn/allSort.html获取所有的分类信息,\n 组合成ObuyUrlSummary\n ''' \n mainHost = r'http://www.gome.com.cn'...
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-8-2 @author: zhongfeng ''' from gomepageparser import GomeAllSortParser,GomeSort3PageParser,GomeSort4PageParser from pageparser import ObuyUrlSummary from spider import ObuySpider if __name__ == '__main__': parserDict = {0:GomeAllS...
[ [ 8, 0, 0.1935, 0.1613, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.3226, 0.0323, 0, 0.66, 0.25, 507, 0, 3, 0, 0, 507, 0, 0 ], [ 1, 0, 0.3548, 0.0323, 0, 0.66, ...
[ "'''\nCreated on 2011-8-2\n\n@author: zhongfeng\n'''", "from gomepageparser import GomeAllSortParser,GomeSort3PageParser,GomeSort4PageParser", "from pageparser import ObuyUrlSummary", "from spider import ObuySpider", "if __name__ == '__main__':\n\n parserDict = {0:GomeAllSortParser,3:GomeSort3PageParser,...
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-8-2 @author: zhongfeng ''' from gomepageparser import GomeAllSortParser,GomeSort3PageParser,GomeSort4PageParser from pageparser import ObuyUrlSummary from spider import ObuySpider if __name__ == '__main__': parserDict = {0:GomeAllS...
[ [ 8, 0, 0.1935, 0.1613, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.3226, 0.0323, 0, 0.66, 0.25, 507, 0, 3, 0, 0, 507, 0, 0 ], [ 1, 0, 0.3548, 0.0323, 0, 0.66, ...
[ "'''\nCreated on 2011-8-2\n\n@author: zhongfeng\n'''", "from gomepageparser import GomeAllSortParser,GomeSort3PageParser,GomeSort4PageParser", "from pageparser import ObuyUrlSummary", "from spider import ObuySpider", "if __name__ == '__main__':\n\n parserDict = {0:GomeAllSortParser,3:GomeSort3PageParser,...
#/usr/bin/env python # -*- coding: utf-8 -*- ''' Created on 2011-7-27 主要用于从网站上爬取信息后,抽取页面信息; @author: zhongfeng ''' from pageparser import * import re from copy import deepcopy class AmazonAllSortParser(RootCatagoryPageParser): ''' 从http://www.amazon.cn/gp/site-directory获取所有的分类信息, ...
[ [ 8, 0, 0.033, 0.033, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0566, 0.0047, 0, 0.66, 0.0588, 488, 0, 1, 0, 0, 488, 0, 0 ], [ 1, 0, 0.0613, 0.0047, 0, 0.66, ...
[ "'''\nCreated on 2011-7-27\n\n主要用于从网站上爬取信息后,抽取页面信息;\n\n@author: zhongfeng\n'''", "from pageparser import *", "import re", "from copy import deepcopy", "class AmazonAllSortParser(RootCatagoryPageParser):\n '''\n 从http://www.amazon.cn/gp/site-directory获取所有的分类信息,\n 组合成ObuyUrlSummary\n ...
#/usr/bin/env python # -*- coding: utf-8 -*- ''' Created on 2011-7-27 主要用于从网站上爬取信息后,抽取页面信息; @author: zhongfeng ''' from BeautifulSoup import BeautifulSoup, Comment from copy import deepcopy from pageparser import * import itertools import json import os import re import urllib import urlparse ...
[ [ 8, 0, 0.0236, 0.0236, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0405, 0.0034, 0, 0.66, 0.0435, 878, 0, 2, 0, 0, 878, 0, 0 ], [ 1, 0, 0.0439, 0.0034, 0, 0.66...
[ "'''\nCreated on 2011-7-27\n\n主要用于从网站上爬取信息后,抽取页面信息;\n\n@author: zhongfeng\n'''", "from BeautifulSoup import BeautifulSoup, Comment", "from copy import deepcopy", "from pageparser import *", "import itertools", "import json", "import os", "import re", "import urllib", "import urlparse", "class Am...
#!/usr/bin/env python # -*- coding: utf8 -*- ''' Created on 2011-8-2 @author: zhongfeng ''' from dangpageparser import DangDangAllSortParser,DangDangSort3PageParser,DangDangSort4PageParser from pageparser import ObuyUrlSummary from spider import ObuySpider if __name__ == '__main__': parserDict =...
[ [ 8, 0, 0.1667, 0.1389, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2778, 0.0278, 0, 0.66, 0.25, 953, 0, 3, 0, 0, 953, 0, 0 ], [ 1, 0, 0.3056, 0.0278, 0, 0.66, ...
[ "'''\nCreated on 2011-8-2\n\n@author: zhongfeng\n'''", "from dangpageparser import DangDangAllSortParser,DangDangSort3PageParser,DangDangSort4PageParser", "from pageparser import ObuyUrlSummary", "from spider import ObuySpider", "if __name__ == '__main__':\n\n parserDict = {0:DangDangAllSortParser,3:Dang...