21 lines
515 B
Python
21 lines
515 B
Python
#!/usr/bin/env python
|
|
# -*- coding: utf-8 -*-
|
|
# @Time : 2026/6/9 20:23
|
|
# @Author : cmk
|
|
# @File : baidu.py
|
|
# @Email : 15726649712@163.com
|
|
import requests
|
|
from bald_spider.core.engine import Engine
|
|
|
|
class Baidu_Spider():
|
|
start_urls = ['https://www.baidu.com/']
|
|
|
|
def start_requests(self):
|
|
for url in self.start_urls:
|
|
reponse = requests.get(url)
|
|
print(reponse)
|
|
|
|
if __name__ == '__main__':
|
|
spider = Baidu_Spider()
|
|
engine = Engine()
|
|
engine.start_spider(spider) |