/// <summary> /// 抓取 /// </summary> /// <returns></returns> List <OpenResult> IPicker.Run() { try { DuoBaoPicker picker = new DuoBaoPicker(URL, LotteryEnum.FC3D); List <OpenResult> dataList = picker.Pick(); return((from o in dataList select new OpenResult { create_time = DateTime.Now, open_time = o.open_time, lottery_code = o.lottery_code, issue_number = Convert.ToInt64(o.open_time.ToString("yyyyMMdd") + o.issue_number.ToString().Replace(o.open_time.ToString("yyyy"), "")), open_data = o.open_data, data_source = DataSourceEnum._168 }).OrderBy(o => o.issue_number).ToList()); } catch (Exception ex) { AppLog appLog = new AppLog { create_time = DateTime.Now, log_type = LogTypeEnum.ERROR, lottery_code = LotteryEnum.FC3D, data_source = DataSourceEnum.DuoBao, log_message = ex.ToString() }; AlphaLogManager.Error(appLog); return(new List <OpenResult>()); } }
/// <summary> /// 抓取 /// </summary> /// <returns></returns> List <OpenResult> IPicker.Run() { try { DuoBaoPicker picker = new DuoBaoPicker(URL, LotteryEnum.XJSSC); return(picker.Pick()); } catch (Exception ex) { AppLog appLog = new AppLog { create_time = DateTime.Now, log_type = LogTypeEnum.ERROR, lottery_code = LotteryEnum.XJSSC, data_source = DataSourceEnum.DuoBao, log_message = ex.ToString() }; AlphaLogManager.Error(appLog); return(new List <OpenResult>()); } }