Example #1
0
    def antPage(self):
        try:
            # channel
            c = Channel()
            _val = ('http://piao.ctrip.com/dest/p-shandong-10/s-tickets/A110/',1,10,'山东')
            c.antChannelList(_val)
            channels = c.channel_list
            if channels and len(channels) > 0:
                Common.log('# add channels num: %d' % len(channels))
                self.mysqlAccess.insertXCChannel(channels)
            else:
                Common.log('# not get channels...')

        except Exception as e:
            Common.log('# XCSpotChannel antpage error: %s'%e)
            Common.traceback_log()
Example #2
0
    def antPage(self):
        try:
            # channel
            c = Channel()
            _val = ('http://piao.ctrip.com/dest/p-shandong-10/s-tickets/A110/',
                    1, 10, '山东')
            c.antChannelList(_val)
            channels = c.channel_list
            if channels and len(channels) > 0:
                Common.log('# add channels num: %d' % len(channels))
                self.mysqlAccess.insertXCChannel(channels)
            else:
                Common.log('# not get channels...')

        except Exception as e:
            Common.log('# XCSpotChannel antpage error: %s' % e)
            Common.traceback_log()