示例#1
0
文件: duoSpider.py 项目: susemm/books
    def __init__(self, proxyHost='', proxyAuthUser='', proxyAuthPswd=''):
        Callbacks.__init__(self)
        self.init([Special.EVT_FIND_LINK, Special.EVT_FIND_BOOK])
        self.titles = {}
        self.links = {}
        self.authors = {}

        self.callbacks = {'http://www.duokan.com/special': self.findBooks,
                          'http://www.duokan.com/book': self.findBook,
                          'http://www.duokan.com': self.findLinks,
                          # 'http://www.duokan.com/r/%E5%85%8D%E8%B4%B9%E4%B8%93%E5%8C%BA': self.finfLimitFree,
                          }
        self.spider = Spider('Duokan Special')
        if len(proxyHost) > 0:
            self.spider.set_proxy(proxyHost, proxyAuthUser, proxyAuthPswd)
        self.spider.add_callbacks(self.callbacks)
        self.spider.add_urls([Special.siteRoot,
                              # 'http://www.duokan.com/r/%E5%85%8D%E8%B4%B9%E4%B8%93%E5%8C%BA'
                              ])
示例#2
0
文件: duoSpider.py 项目: suseme/books
    def __init__(self, proxyHost='', proxyAuthUser='', proxyAuthPswd=''):
        Callbacks.__init__(self)
        self.init([Special.EVT_FIND_LINK, Special.EVT_FIND_BOOK])
        self.titles = {}
        self.links = {}
        self.authors = {}

        self.callbacks = {
            'http://www.duokan.com/special': self.findBooks,
            'http://www.duokan.com/book': self.findBook,
            'http://www.duokan.com': self.findLinks,
            # 'http://www.duokan.com/r/%E5%85%8D%E8%B4%B9%E4%B8%93%E5%8C%BA': self.finfLimitFree,
        }
        self.spider = Spider('Duokan Special')
        if len(proxyHost) > 0:
            self.spider.set_proxy(proxyHost, proxyAuthUser, proxyAuthPswd)
        self.spider.add_callbacks(self.callbacks)
        self.spider.add_urls([
            Special.siteRoot,
            # 'http://www.duokan.com/r/%E5%85%8D%E8%B4%B9%E4%B8%93%E5%8C%BA'
        ])
示例#3
0
文件: __init__.py 项目: susemm/pyvin
 def __init__(self):
     wx.FileDropTarget.__init__(self)
     Callbacks.__init__(self)
     self.init([FileDropTarget.EVT_ON_DROP_FILES, ])