Commit c678dd80 by chenweitao

测试新的md工具

parent 157f295d
# 微博领域标签大v采集
# 微博领域标签大v采集程序md
---
服务器配置
运行服务器:192.168.0.36
目录:/usr/data/javacrawler/weiboDomain
数据表说明
数据库地址 115.236.59.91
数据库名 weiboDomain
| 数据表名 | 备注 |
| -------- | :----: |
| domainTag |领域分类,以及各领域的采集依据 |
| weiboDomain | 采集的各领域用户表 |
采集地址:https://d.weibo.com/1087030002_417#
> 使用quartz定时器,所以主方法中仅初始化spring容器
package com.zhiweidata.weiboDomain.start;
```python
public static void main(String[] args) {
ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
> package com.zhiweidata.weiboDomain.start;
> public static void main(String[] args) {
> ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
>
> System.out.println("微博热门榜单采集开始...");
> //程序主体切换至com.zhiweidata.weiboDomain.quartz定时器
>
> }
System.out.println("微博热门榜单采集开始...");
//程序主体切换至com.zhiweidata.weiboDomain.quartz定时器
}
```
> 定时器程序入口在 com.zhiweidata.weiboDomain.quartz
>
> @Scheduled(cron = "0 0 20 * * *")
> public void execute() {
> String time = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd
> HH"));
> long start = System.currentTimeMillis();
> String cookie = "";
> serice.crawlerData(cookie);
> long end = System.currentTimeMillis();
> log.info(time + "次运行耗时:" + (end - start) + "\t毫秒");
> }
\ No newline at end of file
```python
@Scheduled(cron = "0 0 20 * * *")
public void execute() {
String time = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd
HH"));
long start = System.currentTimeMillis();
String cookie = "";
serice.crawlerData(cookie);
long end = System.currentTimeMillis();
log.info(time + "次运行耗时:" + (end - start) + "\t毫秒");
}
```
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment