Skip to content

feapder v1.5.1

Compare
Choose a tag to compare
@Boris-code Boris-code released this 23 May 07:46
· 705 commits to master since this release

更新

  1. 爬虫支持重复运行

举例说明

import feapder


class AirSpiderDemo(feapder.AirSpider):
    def start_requests(self):
        yield feapder.Request("https://www.baidu.com")

    def parse(self, request, response):
        print(response)


if __name__ == "__main__":
    # 循环运行,本次结束后马上开始下一次
    spider = AirSpiderDemo()
    while True:
        spider.start()
        spider.join() # 等待结束

    # 直接开启10个爬虫
    # for i in range(10):
    #     spider = AirSpiderDemo()
    #     spider.start()