1.简介
定时任务使用场景一般为指定时间做数据统计,临时数据清理等等。
单节点部署的服务一般是通过下面方式实现即可:
在SpringBoot启动类上面添加@EnableScheduling注解开启spring定时任务功能
在定时任务方法上添加@Scheduled实现
@SpringBootApplication
@EnableScheduling
public class PlatformApplication{}
@Component
@Slf4j
public cla
对于不熟悉HTML和正则表达式的人,可以用第三方模块包BeautifulSoup来提取HTML或XML中的数据。
实例化BeautifulSoup对象:
使用解析器分析指定的网页源代码,得到源代码的结构模型
from bs4 import BeautifulSoup
import requests as re
headers = {'User-Agent':'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-us) AppleWebK