电影管理网站-第一章 抓取

news/2024/5/9 18:10:10/文章来源:https://ohyewang.blog.csdn.net/article/details/78995483

最近自己为了提升一下技术,写了一个简单的电影链接网站。主要分三部份:

第一个:网站

点击打开链接

第二个:后台管理

点击打开链接

账号:ag  密码:test@123

第三个:抓取服务

本文重点介绍抓取服务,目前只抓取了两个电影网站的部份信息(只供技术开发使用为目的)。

现在直接上代码:

Program

 

using Autofac;
using Autofac.Builder;
using OA.Common.DtoModel;
using Ohye.Film.Application;
using Ohye.Film.Domain;
using Ohye.Film.Infrastructure;
using Ohye.Film.Infrastructure.EFRepositories;
using Ohye.Film.Infrastructure.EFRepositories.UnitOfWork;
using Ohye.Film.Service.Spider;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;namespace Ohye.Film.Service
{class Program{static void Main(string[] args){Init();SpireFilms();List<string> spiredFilmDate = new List<string>();List<string> createIndexDate = new List<string>();while (true){var date = DateTime.Now.ToString("yyyyMMdd");var hour = DateTime.Now.Hour;if (hour == 4 && !spiredFilmDate.Contains(date)){SpireFilms();spiredFilmDate.Add(date);}if (hour == 6 && !createIndexDate.Contains(date)){System.Net.Http.HttpClient http = new System.Net.Http.HttpClient();http.GetAsync("http://film.ohyewang.com/");createIndexDate.Add(date);Console.ForegroundColor = ConsoleColor.Red;Console.WriteLine($"生成首页成功:{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");}System.Threading.Thread.Sleep(TimeSpan.FromMinutes(10));}}private static void SpireFilms(){List<Tuple<string, int, string>> pageList = new List<Tuple<string, int, string>>();pageList.Add(new Tuple<string, int, string>("http://list.iqiyi.com/www/1/2-----------2017--11-1-1-iqiyi--.html", 2017, "美国"));pageList.Add(new Tuple<string, int, string>("http://list.iqiyi.com/www/1/2-----------2016--11-1-1-iqiyi--.html", 2016, "美国"));pageList.Add(new Tuple<string, int, string>("http://list.iqiyi.com/www/1/2-----------2015--11-1-1-iqiyi--.html", 2015, "美国"));pageList.Add(new Tuple<string, int, string>("http://list.iqiyi.com/www/1/1-----------2017--11-1-1-iqiyi--.html", 2017, "华语"));pageList.Add(new Tuple<string, int, string>("http://list.iqiyi.com/www/1/1-----------2016--11-1-1-iqiyi--.html", 2016, "华语"));pageList.Add(new Tuple<string, int, string>("http://list.iqiyi.com/www/1/1-----------2015--11-1-1-iqiyi--.html", 2015, "华语"));pageList.ForEach(p =>{ISplider _AIQIYI = new AIQIYI { Url = p.Item1, Year = p.Item2, Country = p.Item3 };_AIQIYI.SpliderResult();});List<Tuple<string, int, string>> pageListMGTV = new List<Tuple<string, int, string>>();pageListMGTV.Add(new Tuple<string, int, string>("https://list.mgtv.com/3/a4-537193-------2835073-2-1--a1-.html?channelId=3", 0, "美国"));pageListMGTV.Add(new Tuple<string, int, string>("https://list.mgtv.com/3/a4-49-------2835073-2-1--a1-.html?channelId=3", 0, "华语"));pageListMGTV.ForEach(p =>{ISplider _mgtv = new mgtv { Url = p.Item1, Year = p.Item2, Country = p.Item3 };_mgtv.SpliderResult();});//List<Tuple<string, int, string>> pageListQQ = new List<Tuple<string, int, string>>();//pageListQQ.Add(new Tuple<string, int, string>("http://film.qq.com/film_all_list/allfilm.html?type=movie&sort=5", 0, "美国"));//pageListQQ.ForEach(p =>//{//    ISplider _qq = new qq { Url = p.Item1, Year = p.Item2, Country = p.Item3 };//    _qq.SpliderResult();//});}static void Init(){AutoMapperConfig.RegisterMappings();var builder = IocCenter.ContainerBuilder;SetupResolveRules(builder);}static void SetupResolveRules(ContainerBuilder builder){var application = Assembly.Load("Ohye.Film.Application");builder.Register<OAUser>(c => CreateOAUser()).AsSelf();builder.RegisterType<EntityManager>().AsSelf().SingleInstance();builder.RegisterAssemblyTypes(application).Where(t => t.Name.EndsWith("Service")).AsSelf().InstancePerDependency();builder.RegisterType<OhyeFilmDbContext>().InstancePerLifetimeScope();builder.RegisterType<UnitOfWork>().As<IUnitOfWork>().InstancePerDependency();builder.RegisterGeneric(typeof(Repository<>)).As(typeof(IRepository<>)).InstancePerDependency();}static OAUser CreateOAUser(){return new OAUser{EmplID = "",EmplName = "系统管理员",DeptID = "",DeptName = "总部",};}}
}

 

 

 

 

 

Config

 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;namespace Ohye.Film.Service
{public class Config{public static string DataDir{get{return System.Configuration.ConfigurationManager.AppSettings["DataDir"];}}public static string TempDir{get{string temp = $"{DataDir}FilmTemp";if (!System.IO.Directory.Exists(temp)){System.IO.Directory.CreateDirectory(temp);}return temp;}}}
}

 

 

 

 

 

SpireClient

 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net;
using System.Net.Http;
using HtmlAgilityPack;namespace Ohye.Film.Service.Spider
{public class SpireClient{static List<string> _spiredUrlList;HttpClient _httpClient;public event EventHandler<string> Complete;public SpireClient(){_spiredUrlList = new List<string>();_httpClient = new HttpClient();}public async Task<string> GetHtml(string url){return await _httpClient.GetStringAsync(url);}public void SpireUrl(string url){if (_spiredUrlList.Contains(url)) return;_spiredUrlList.Add(url);_httpClient.GetAsync(url).ContinueWith((r) =>{HttpResponseMessage response = r.Result;response.Content.ReadAsStringAsync().ContinueWith((t) =>{OnGetResult(this    , t.Result);});});}private void OnGetResult(object sender, string e){Complete?.Invoke(sender, e);}public List<HtmlNode> SelectNodes(string content, string regex){HtmlDocument htmlDoc = new HtmlDocument();htmlDoc.LoadHtml(content);var htmlNodes = htmlDoc.DocumentNode.SelectNodes(regex);if (htmlNodes == null) return new List<HtmlNode>();return htmlNodes.ToList();}}
}

 

 

 

 

 

HttpImage

 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net.Http;
using System.IO;
using OA.Infrastructure;namespace Ohye.Film.Service.Spider
{public class HttpImage{public string GetImg(string url){byte[][] images = DownloadPicAsync(new string[] { url }).Result;//多线程下载图片,充分利用CPU多核string imageName = url.Substring(url.LastIndexOf('/') + 1, url.Length - url.LastIndexOf('/') - 1);string filePath = $@"{ Config.TempDir}\{imageName}";using (FileStream stream = new FileStream(filePath, FileMode.OpenOrCreate)){byte[] buff = images[0];stream.Write(buff, 0, buff.Length);Console.WriteLine("成功下载图片:" + imageName);}string fileID = MongoContext.Mongo.SaveFile(filePath);File.Delete(filePath);return fileID;}/// <summary>/// 批量下载图片/// </summary>/// <param name="urls"></param>/// <returns></returns>public async Task<byte[][]> DownloadPicAsync(IEnumerable<string> urls){HttpClient httpClient = new HttpClient();Task<byte[]>[] downloadTask = urls.Select(r => httpClient.GetByteArrayAsync(r)).ToArray();byte[][] data = await Task.WhenAll(downloadTask);return data;}}
}

 

 

 

 

 

AIQIYI

 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Ohye.Film.DTO.Film;
using Ohye.Film.Application.Film;
using Autofac;
using Ohye.Film.Infrastructure.Enums;
using Ohye.Film.Infrastructure;namespace Ohye.Film.Service.Spider
{public class AIQIYI : ISplider{public AIQIYI(){}public string Url { get; set; }public int Year { get; set; }public string Country { get; set; }public void SpliderResult(){SpireClient spireClient = new SpireClient();spireClient.Complete += SpireClient_Complete;spireClient.SpireUrl(Url);}private void SpireClient_Complete(object sender, string html){SpireClient client = (SpireClient)sender;var productNodes = client.SelectNodes(html, "//ul[contains(@class,'site-piclist')]/li");productNodes.ForEach(p =>{var linkPic = client.SelectNodes(p.InnerHtml, "//div[@class='site-piclist_pic']/a").SingleOrDefault();bool canRead = !client.SelectNodes(linkPic.InnerHtml, "//p[@class='viedo_lt ']").Any();var productName = linkPic.Attributes.Where(x => x.Name == "title").SingleOrDefault().Value.Trim();var detailURL = linkPic.Attributes.Where(x => x.Name == "href").SingleOrDefault().Value.Trim();var detailHtml = client.GetHtml(detailURL).Result;var introduction = client.SelectNodes(detailHtml, "//span[@id='data-videoInfoDes']").SingleOrDefault()?.InnerText.Trim();var imgUrl = client.SelectNodes(linkPic.InnerHtml, "//img").SingleOrDefault().Attributes.Where(x => x.Name == "src").SingleOrDefault().Value.Trim();var duration = client.SelectNodes(linkPic.InnerHtml, "//span[@class='icon-vInfo']").SingleOrDefault().InnerText.Trim();var linkInfo = client.SelectNodes(p.InnerHtml, "//div[@class='site-piclist_info']").SingleOrDefault();var score = client.SelectNodes(linkInfo.InnerHtml, "//span[@class='score']").SingleOrDefault().InnerText.Trim();var authors = client.SelectNodes(linkInfo.InnerHtml, "//div[@class='role_info']/em/a").SelectMany(x => x.Attributes).Where(x => x.Name == "title").Select(x => x.Value).ToList();try{HttpImage httpImage = new HttpImage();IocCenter.Resolve<ProductService>(_productService =>{if (!_productService.CheckExisted(productName)){TimeSpan dur;TimeSpan.TryParse(duration, out dur);FM_ProductDTO product = new FM_ProductDTO{ID = Guid.NewGuid(),Name = productName,CategoryID = Guid.Parse("d012fcc6-b25a-447c-b079-95cc293a3f92"),Year = Year,Score = decimal.Parse(score),Duration = dur,CanRead = canRead,ImageID = null,IsDeleted = false,Country = Country,Content = new FM_ContentDTO{ID = Guid.NewGuid(),Introduction = introduction,ReadCount = 0,DownLoadCount = 0},LinkList = !canRead ? new List<FM_LinkDTO>() : new List<FM_LinkDTO>{new FM_LinkDTO{ID=Guid.NewGuid(),Address=detailURL,AuditStatus= AuditStatus.AuditPass,AuditTime=DateTime.Now,LinkType=LinkType.PlayUrl,}},AuthorList = authors.Select(x => new FM_AuthorDTO{ID = Guid.NewGuid(),AuhorType = AuhorType.Main,Name = x}).ToList()};product.ImageID = httpImage.GetImg(imgUrl);_productService.Add(product);Console.ForegroundColor = ConsoleColor.DarkGreen;Console.WriteLine(productName);Console.ForegroundColor = ConsoleColor.Gray;}else if (canRead){var productInfo = _productService.CheckCanRead(productName);if (!productInfo.Item1){Console.ForegroundColor = ConsoleColor.Green;Console.WriteLine($"发现新可播放电影:{productName}");//重新更新_productService.UpdateLink(productInfo.Item2, new List<FM_LinkDTO>{new FM_LinkDTO{ID = Guid.NewGuid(),Address = detailURL,AuditStatus = AuditStatus.AuditPass,AuditTime = DateTime.Now,LinkType = LinkType.PlayUrl}});}}else{Console.WriteLine($"已存在:{productName}");}});}catch (Exception ex){Console.ForegroundColor = ConsoleColor.Red;Console.WriteLine(productName + ex.Message + ex.InnerException);Console.WriteLine("failed");}});//查找下一页var cc = client.SelectNodes(html, "//div[@class='mod-page']/a[@data-search-page='item']").ToList();var pagesNodes = client.SelectNodes(html, "//div[@class='mod-page']/a[@data-search-page='item']").ToList().Where(p => p.Attributes["data-key"].Value != "down" && p.Attributes["data-key"].Value != "up").Select(p => new Tuple<int, string>(Int32.Parse(p.Attributes["data-key"].Value), p.Attributes["href"].Value));var currentPage = client.SelectNodes(html, "//div[@class='mod-page']/span[@class='curPage']").SingleOrDefault();if (currentPage != null){var pageIndex = Int32.Parse(currentPage.InnerText);var nextPageIndex = pageIndex + 1;pagesNodes.ToList().ForEach(x =>{if (x.Item1 == nextPageIndex){Url = $"http://list.iqiyi.com/{x.Item2}";SpliderResult();}});}}}
}

 

 

 

 

 

mgtv

 

using Ohye.Film.Application.Film;
using Ohye.Film.DTO.Film;
using Ohye.Film.Infrastructure;
using Ohye.Film.Infrastructure.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;namespace Ohye.Film.Service.Spider
{public class mgtv : ISplider{public mgtv(){}public string Url { get; set; }public int Year { get; set; }public string Country { get; set; }public void SpliderResult(){SpireClient spireClient = new SpireClient();spireClient.Complete += SpireClient_Complete;spireClient.SpireUrl(Url);}private void SpireClient_Complete(object sender, string html){SpireClient client = (SpireClient)sender;var productNodes = client.SelectNodes(html, "//ul/li[contains(@class,'m-result-list-item')]");productNodes.ForEach(p =>{var linkPic = client.SelectNodes(p.InnerHtml, "//a[contains(@class,'u-video u-video-y')]").SingleOrDefault();bool canRead = !client.SelectNodes(linkPic.InnerHtml, "//i[@class='mark-v']").Any();var productName = client.SelectNodes(p.InnerHtml, "//a[@class='u-title']").FirstOrDefault().InnerHtml.Trim();var detailURL = linkPic.Attributes.Where(x => x.Name == "href").SingleOrDefault().Value.Trim();detailURL = $"https://{detailURL.Substring(2)}";var detailHtml = client.GetHtml(detailURL).Result;var introduction = client.SelectNodes(detailHtml, "//p[@class='u-meta-intro']/span[@class='details']").FirstOrDefault()?.InnerText.Trim();var imgUrl = client.SelectNodes(linkPic.InnerHtml, "//img[@class='u-pic']").SingleOrDefault().Attributes.Where(x => x.Name == "src").SingleOrDefault().Value.Trim();imgUrl = $"https://{imgUrl.Substring(2)}";var duration = "";var score = client.SelectNodes(linkPic.InnerHtml, "//em[@class='u-meta']").SingleOrDefault().InnerText.Trim();var authors = client.SelectNodes(p.InnerHtml, "//span[@class='u-desc']/a").SelectMany(x => x.Attributes).Where(x => x.Name == "title").Select(x => x.Value).ToList();try{HttpImage httpImage = new HttpImage();IocCenter.Resolve<ProductService>(_productService =>{if (!_productService.CheckExisted(productName)){TimeSpan dur;TimeSpan.TryParse(duration, out dur);FM_ProductDTO product = new FM_ProductDTO{ID = Guid.NewGuid(),Name = productName,CategoryID = Guid.Parse("d012fcc6-b25a-447c-b079-95cc293a3f92"),Year = Year,Score = decimal.Parse(score == "" ? "0" : score),Duration = dur,CanRead = canRead,ImageID = null,IsDeleted = false,Country = Country,Content = new FM_ContentDTO{ID = Guid.NewGuid(),Introduction = introduction,ReadCount = 0,DownLoadCount = 0},LinkList = !canRead ? new List<FM_LinkDTO>() : new List<FM_LinkDTO>{new FM_LinkDTO{ID=Guid.NewGuid(),Address=detailURL,AuditStatus= AuditStatus.AuditPass,AuditTime=DateTime.Now,LinkType=LinkType.PlayUrl,}},AuthorList = authors.Select(x => new FM_AuthorDTO{ID = Guid.NewGuid(),AuhorType = AuhorType.Main,Name = x}).ToList()};product.ImageID = httpImage.GetImg(imgUrl);_productService.Add(product);Console.ForegroundColor = ConsoleColor.DarkGreen;Console.WriteLine(productName);Console.ForegroundColor = ConsoleColor.Gray;}else if (canRead){var productInfo = _productService.CheckCanRead(productName);if (!productInfo.Item1){Console.ForegroundColor = ConsoleColor.Green;Console.WriteLine($"发现新可播放电影:{productName}");//重新更新_productService.UpdateLink(productInfo.Item2, new List<FM_LinkDTO>{new FM_LinkDTO{ID = Guid.NewGuid(),Address = detailURL,AuditStatus = AuditStatus.AuditPass,AuditTime = DateTime.Now,LinkType = LinkType.PlayUrl}});}}else{Console.WriteLine($"已存在:{productName}");}});}catch (Exception ex){Console.ForegroundColor = ConsoleColor.Red;Console.WriteLine(productName + ex.Message + ex.InnerException);Console.WriteLine("failed");}});//查找下一页var pages = client.SelectNodes(html, "//div[contains(@class,'w-pages w-pages-default')]/ul/li/a").ToList();var pagesNodes = pages.Where(p => 1 == 1&& p.Attributes["href"]!=null&&p.InnerText != "..."&&p.InnerText!= "  ").Select(p => new Tuple<int, string>(Int32.Parse(p.InnerText), p.Attributes["href"].Value)).ToList();var currentPage = pages.Where(p => p.Attributes["class"] != null && p.Attributes["class"].Value == "current").SingleOrDefault();if (currentPage != null){var pageIndex = Int32.Parse(currentPage.InnerText);var nextPageIndex = pageIndex + 1;pagesNodes.ToList().ForEach(x =>{if (x.Item1 == nextPageIndex){Url = $"https://list.mgtv.com/{x.Item2}";SpliderResult();}});}}}
}

 

 

 

 

 

qq

 

using Ohye.Film.Application.Film;
using Ohye.Film.DTO.Film;
using Ohye.Film.Infrastructure;
using Ohye.Film.Infrastructure.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;namespace Ohye.Film.Service.Spider
{public class qq : ISplider{public qq(){}public string Url { get; set; }public int Year { get; set; }public string Country { get; set; }public void SpliderResult(){SpireClient spireClient = new SpireClient();spireClient.Complete += SpireClient_Complete;spireClient.SpireUrl(Url);}private void SpireClient_Complete(object sender, string html){SpireClient client = (SpireClient)sender;var productNodes = client.SelectNodes(html, "//ul[@class='figures_list']/li");productNodes.ForEach(p =>{var linkPic = client.SelectNodes(p.InnerHtml, "//a").SingleOrDefault();bool canRead = !client.SelectNodes(linkPic.InnerHtml, "//i[@class='mark_v ']").Any();var productName = linkPic.Attributes.Where(x => x.Name == "title").SingleOrDefault().Value.Trim();var detailURL = linkPic.Attributes.Where(x => x.Name == "href").SingleOrDefault().Value.Trim();var detailHtml = client.GetHtml(detailURL).Result;var introduction = client.SelectNodes(detailHtml, "//span[@id='data-videoInfoDes']").SingleOrDefault()?.InnerText.Trim();var imgUrl = client.SelectNodes(linkPic.InnerHtml, "//img").SingleOrDefault().Attributes.Where(x => x.Name == "src").SingleOrDefault().Value.Trim();var duration = ""; //client.SelectNodes(linkPic.InnerHtml, "//span[@class='icon-vInfo']").SingleOrDefault().InnerText.Trim();var linkInfo = client.SelectNodes(p.InnerHtml, "//div[@class='figure_title_score']").SingleOrDefault();var score = client.SelectNodes(linkInfo.InnerHtml, "//div[@class='figure_score']/em[@class='score_l']").SingleOrDefault().InnerText.Trim()+"."+ client.SelectNodes(p.InnerHtml, "//div[@class='figure_score']/em[@class='score_2']").SingleOrDefault().InnerText.Trim();var authors = new List<string>();//client.SelectNodes(linkInfo.InnerHtml, "//div[@class='role_info']/em/a").SelectMany(x => x.Attributes).Where(x => x.Name == "title").Select(x => x.Value).ToList();try{HttpImage httpImage = new HttpImage();IocCenter.Resolve<ProductService>(_productService =>{if (!_productService.CheckExisted(productName)){TimeSpan dur;TimeSpan.TryParse(duration, out dur);FM_ProductDTO product = new FM_ProductDTO{ID = Guid.NewGuid(),Name = productName,CategoryID = Guid.Parse("d012fcc6-b25a-447c-b079-95cc293a3f92"),Year = Year,Score = decimal.Parse(score),Duration = dur,CanRead = canRead,ImageID = null,IsDeleted = false,Country = Country,Content = new FM_ContentDTO{ID = Guid.NewGuid(),Introduction = introduction,ReadCount = 0,DownLoadCount = 0},LinkList = !canRead ? new List<FM_LinkDTO>() : new List<FM_LinkDTO>{new FM_LinkDTO{ID=Guid.NewGuid(),Address=detailURL,AuditStatus= AuditStatus.AuditPass,AuditTime=DateTime.Now,LinkType=LinkType.PlayUrl,}},AuthorList = authors.Select(x => new FM_AuthorDTO{ID = Guid.NewGuid(),AuhorType = AuhorType.Main,Name = x}).ToList()};product.ImageID = httpImage.GetImg(imgUrl);_productService.Add(product);Console.ForegroundColor = ConsoleColor.DarkGreen;Console.WriteLine(productName);Console.ForegroundColor = ConsoleColor.Gray;}else if (canRead){var productInfo = _productService.CheckCanRead(productName);if (!productInfo.Item1){Console.ForegroundColor = ConsoleColor.Green;Console.WriteLine($"发现新可播放电影:{productName}");//重新更新_productService.UpdateLink(productInfo.Item2, new List<FM_LinkDTO>{new FM_LinkDTO{ID = Guid.NewGuid(),Address = detailURL,AuditStatus = AuditStatus.AuditPass,AuditTime = DateTime.Now,LinkType = LinkType.PlayUrl}});}}else{Console.WriteLine($"已存在:{productName}");}});}catch (Exception ex){Console.ForegroundColor = ConsoleColor.Red;Console.WriteLine(productName + ex.Message + ex.InnerException);Console.WriteLine("failed");}});//查找下一页var cc = client.SelectNodes(html, "//div[@class='mod-page']/a[@data-search-page='item']").ToList();var pagesNodes = client.SelectNodes(html, "//div[@class='mod-page']/a[@data-search-page='item']").ToList().Where(p => p.Attributes["data-key"].Value != "down" && p.Attributes["data-key"].Value != "up").Select(p => new Tuple<int, string>(Int32.Parse(p.Attributes["data-key"].Value), p.Attributes["href"].Value));var currentPage = client.SelectNodes(html, "//div[@class='mod-page']/span[@class='curPage']").SingleOrDefault();if (currentPage != null){var pageIndex = Int32.Parse(currentPage.InnerText);var nextPageIndex = pageIndex + 1;pagesNodes.ToList().ForEach(x =>{if (x.Item1 == nextPageIndex){Url = $"http://list.iqiyi.com/{x.Item2}";SpliderResult();}});}}}
}

 

 

 

 

 

ISplider

 

using Ohye.Film.DTO.Film;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;namespace Ohye.Film.Service.Spider
{public interface ISplider{/// <summary>/// URL/// </summary>string Url { get; set; }void SpliderResult();}
}

 

后续....

感兴趣的可以加入下面群

 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.luyixian.cn/news_show_767625.aspx

如若内容造成侵权/违法违规/事实不符,请联系dt猫网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

电影管理网站-第二章 API项目搭建

自WCF之后&#xff0c;现在主流的就是WebAPI&#xff0c;如果你还在用WCF来创建新的项目&#xff0c;那就看看WebAPI是否更好呢&#xff01; 第一步 新建项目&#xff1a;Ohye.Film.API 添加控制器&#xff1a;FilmController using Ohye.Film.Application.Film; using Ohye.…

微信网站应用开发的详细流程和引导

微信作为强大的通讯工具和社交平台&#xff0c;已经成了手机必不可少的应用&#xff0c;因此很多网站选择把微信登录网站的功能&#xff0c;方便微信用户注册登录和使用网站&#xff0c;也就是所谓的微信扫码登录应用网站。&#xff08;特别提示&#xff0c;网站应用适用于网站…

我的世界服务器广告网站,友情广告:来《我的世界》中国版一起创造世界!

原标题&#xff1a;友情广告&#xff1a;来《我的世界》中国版一起创造世界&#xff01;我是陆大明&#xff0c;今天接了条友情广告。是我们网易另一款游戏&#xff1a;《我的世界》中国版&#xff01;目前已经正式开启PCJava版不限号测试了。对于这款风靡全球的沙盒游戏&#…

半小时搭建电子商务网站--opencart

原文链接: http://codeshold.me/2017/01/opencart_installation.html 前言 朋友在亚马逊&#xff08;美国&#xff09;上开了一家网点且注册了自己的品牌&#xff0c;amazon需要品牌商提供自己的网站&#xff0c;于是乎朋友找到了我&#xff0c;并给了我一个品牌商网站的参考…

亿级流量电商详情页系统实战-2.大型电商网站的异步多级缓存构建+nginx数据本地化动态渲染的架构

1.架构图 大型电商网站的详情页架构一般是这样的核心思路&#xff0c;如下图&#xff1a; 2.两个关键点 缓存数据生产服务 缓存数据生产服务&#xff0c;一般会监听一个MQ。当有服务&#xff08;如商品服务&#xff09;数据发生变更&#xff0c;会发消息给MQ&#xff0c;此…

php自动上传图片,PHP实现网站上传图片自动加水印_php

以下为引用的内容&#xff1a;/*****************************************************参数说明:$max_file_size : 上传文件大小限制, 单位BYTE$destination_folder : 上传文件路径$watermark : 是否附加水印(1为加水印,其他为不加水印);使用说明:1. 将php.INI文件里面的"…

linux 搜索深度搜,打造国内最大知识搜索网站 解析深度搜搜索优势

近来&#xff0c;一个新型的知识搜索引擎深度搜(www.shendusou.com)引起了很多互联网用户的关注&#xff0c;原因在于其搜索内容的专业性和精准性能很好的满足各类搜索用户的不同需求。接下来&#xff0c;让我们以奶粉作为关键词一起看看深度搜的优势究竟在那里。一、不同板块分…

jav简单的个人博客网站代码_「免费」简单几步搭建个人博客网站!你确定不看看?...

序言个人博客相比大家都很熟悉&#xff0c;特别是做技术&#xff0c;搞研究的等等&#xff0c;各行各业的人都有各行各业不同风格不同用途的博客网站&#xff0c;在网站上面分享自己想分享的内容供其它人随时查看&#xff0c;但是现在各大云服务平台的建站需求都是收费的&#…

html5响应时效果,HTML5响应式网站给我们的生活带来哪些改变

原标题&#xff1a;HTML5响应式网站给我们的生活带来哪些改变正如我们所看到的一样&#xff0c;HTML5大潮正来势汹汹。互联互通的大时代下每个人都要参与其中。下面&#xff0c;蓝鸥带您看懂HTML5网站有哪些不同&#xff0c;又会给我们的生活带来哪些改变?HTML5响应式网站是HT…

织梦网站如何发布在ecs服务器上,ecs云服务器部署织梦网站

ecs云服务器部署织梦网站 内容精选换一换华为云帮助中心&#xff0c;为用户提供产品简介、价格说明、购买指南、用户指南、API参考、最佳实践、常见问题、视频帮助等技术文档&#xff0c;帮助您快速上手使用华为云服务。华为云帮助中心&#xff0c;为用户提供产品简介、价格说明…

go分析和kegg分析_利用g:profiler基因注释网站进行GO注释分析

由于本人个人的一些原因&#xff0c;距离上次更新文章已经有很长时间了。在此向大家说一声抱歉。之前有关GO注释的文章里&#xff0c;有读者咨询&#xff0c;是否有批量查找基因GO注释的方法。本期&#xff0c;本人就给读者推荐一个非常实用的&#xff0c;完成基因GO批量注释的…

linux设置网站的错误页面,Linux宝塔面板怎么给网站单独设置404页面

许多网站管理员都使用宝塔面板&#xff0c;因为它易于使用且快速。 Ourboke联盟在使用过程中发现&#xff0c;在Linux系统下安装的宝塔面板网站的自定义404错误页面在上传后仍显示默认的404页面。Linux宝塔面板怎么给网站单独设置404页面如果云服务器放置多个网站&#xff0c;它…

SEO需要优化的HTML代码,SEO人员必须要懂html代码

原标题&#xff1a;SEO人员必须要懂html代码之前很多次听到有人说SEO的入行门槛很低&#xff0c;什么人都可以做&#xff0c;不需要什么基础。在本人看来&#xff0c;做SEO是需要有一定的html代码基础的&#xff0c;这是必备的。SEO涉及的方方面面有很多&#xff0c;范围很广&a…

一个漂亮的暗系色调网站主页,外表美观。

最近尝试了一下一个网站主页设计&#xff0c;主要部分都完成了 外表还算美观&#xff0c;简单容易上手。 废话不多说&#xff0c;先上效果图&#xff1a;首先初期布局大致是这样&#xff1a; 一个头部加一个尾部加主体内容&#xff08;颜色为了方便大家辨认设置的&#xff09;在…

Nginx网站服务与虚拟Web主机(域名、IP、端口)

文章目录一、Nginx概述1.什么是Lginx2.Nginx工作原理3.Nginx 的模块从功能上分为如下三类4.Nginx的模块从结构上分为核心模块、基础模块和第三方模块二、搭建Nginx虚拟Web主机1.搭建Nginx服务2.管理Nginx服务3.配置nginx的验证功能三、配置虚拟主机功能1.基于域名2.基于IP3.基于…

网站如何提速?让网站秒开

配置小鸟云服务器&#xff0c;如果选择的带宽比较小&#xff0c;比如1M&#xff0c;而网站页面很大&#xff0c;在打开网站时速度比较慢&#xff0c;怎么办&#xff1f; 在这里主要说一种提速方法&#xff1a; 1&#xff1a;升级带宽&#xff08;推荐&#xff09;&#xff0c…

服务器常见问题|新手建站云服务器到底该如何选购?

云服务器其实相当于一个服务器主机&#xff0c;其配置和物理结构远优与普通家用主机。云服务器有独立的IP&#xff0c;独立的操作系统&#xff0c;内存&#xff0c;带宽等&#xff0c;在功能与使用方法上也与服务器一模一样。你可以简单理解为&#xff0c;通过虚拟化技术实现的…

为什么建站必备云虚拟主机?

2021年第一季度&#xff0c;云基础设置服务支出增长35%&#xff0c;达到418亿美元&#xff0c;各行各业“上云”已经不算新鲜事&#xff0c;在云服务市场加速回暖的今天&#xff0c;不管是企业还是个人&#xff0c;都会选择云基础设施加快上云的步伐&#xff0c;建立属于自己的…

网站提示有风险?注意做好这几点!

在互联网虚拟世界&#xff0c;安全问题随时存在。当我们访问一个网站却被提示不安全&#xff0c;页面打不开。如果网站本身没有问题&#xff0c;那么很大几率是因为浏览器检查到网站的ssl证书过期了或者存在问题&#xff0c;为了保护用户才会出现这种提示。 检查证书是否过期 …

小鸟云云服务器可以绑定多个域名搭建多个网站吗?

云服务器绑定多个域名搭建多个网站在操作过程中有一些注意事项比如&#xff1a; 1.建站首先要准备域名、服务器 如果我们的网站是在国内&#xff0c;可以找国内的域名商注册域名&#xff0c;如果涉及到跨境电商&#xff0c;可以注册一个国外域名。同时对云服务器的选择需要注…