开源1--RSS新闻情报云

架构:C#控制台程序+ASP.NET后台/前台+MySQL

开源第一篇,先公布最主要的部分:AutoRSS.exe

此程序负责:

1、解析XML,将数据写入DB(ActionArticle.cs)

2、DownLoad XML中包含的图片至本地服务器,存放地址写入DB(ActionLoadImg.cs)

3、DownLoad新闻优先级评定(依据关键字)(ActionPriority.cs)

4、自动推送优先级高的新闻(AutoPush.cs)

5、发送邮件,通知程序运行Log(SysLog.cs)


运行效果:

由于不是第一次运行,所以会有今日已添加和此次已添加log



主程序源码:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Xml;
using ModuleFunction;
using System.Xml.Linq;
using System.IO;

//作者:jeremytian 
//时间:20140114
//功能:自动下载RSS订阅信息
namespace AutoRss
{
    class Program
    {
        static void Main(string[] args)
        {
            string strException = "AutoRss类名:Program;方法名:Main;";
            SysLog.textAll = "============================================";
            SysLog.textAll = strException + "       日志记录:      ";

            try
            {
                //获取订阅RSS新闻信息
                ActionArticle actionart = new ActionArticle();
                actionart.GetArticle();

                给新闻信息进行优先级评定
                ActionPriority actionpri = new ActionPriority();
                actionpri.SetPriority();

                //自动推送新闻
                //规则:包含关键字
                AutoPush autopush = new AutoPush();
                autopush.AutoPushNews();
            }
            catch (Exception ex)
            {
                Console.WriteLine(strException + ex.Message);
            }
            finally
            {
                DotNetSendMail sendmail = new DotNetSendMail();
                sendmail.SendMailConfig(SysLog.textPath, SysLog.textAll);
            }
        }
    }
}

源码地址:http://pan.baidu.com/s/1nt9aW69


注:

源码中暂不包含DB和后台维护程式。

不过源码都挺简单,封装的部分也很容易重写。

如有疑问回复。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Jeremy.tian

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值