# -*- coding: utf-8 -*-
import scrapy
from models.zqLeague import *


class DemoSpider(scrapy.Spider):
    name = 'demo'
    allowed_domains = ['baidu.com']
    start_urls = ['http://baidu.com/']

    def start_requests(self):
        so = zqLeague()
        # so.select(league_id=3)
        # so.league_name='china no 1'
        print(so.update({'league_id': 1, 'league_name': 'ttt'}, 'league_id=3'))
        request = scrapy.FormRequest('https://baidu.com', callback=self.parse)
        yield request

    def parse(self, response):
        pass
