Python之Scrapy爬虫(热门网站数据爬取)

news/2024/5/19 14:37:34/文章来源:https://blog.csdn.net/qq_44111805/article/details/116331326

第一关:猫眼电影排行TOP100信息爬取
在这里插入图片描述
在这里插入图片描述

代码:
item.py文件

import scrapy
class MaoyanItem(scrapy.Item):#********** Begin **********#name = scrapy.Field()starts = scrapy.Field()releasetime = scrapy.Field()score = scrapy.Field()#********** End **********#

pipeline.py文件

import pymysql
class MaoyanPipeline(object):def process_item(self, item, spider):#********** Begin **********##1.连接数据库connection = pymysql.connect(host='localhost',  # 连接的是本地数据库port=3306,         #数据库端口名user='root',        # 自己的mysql用户名passwd='123123',  # 自己的密码db='mydb',      # 数据库的名字charset='utf8',     # 默认的编码方式)        #2.建表、给表插入数据,完成后关闭数据库连接,return返回itemname = item['name']starts = item['starts']releasetime = item['releasetime']score = item['score']try:with connection.cursor() as cursor:sql1 = 'Create Table If Not Exists mymovies(name varchar(50) CHARACTER SET utf8 NOT NULL,starts text CHARACTER SET utf8 NOT NULL,releasetime varchar(50) CHARACTER SET utf8 DEFAULT NULL,score varchar(20) CHARACTER SET utf8 NOT NULL,PRIMARY KEY(name))'# 单章小说的写入sql2 = 'Insert into mymovies values (\'%s\',\'%s\',\'%s\',\'%s\')' % (name, starts, releasetime, score)cursor.execute(sql1)cursor.execute(sql2)# 提交本次插入的记录connection.commit()finally:# 关闭连接connection.close()    return item#********** End **********#

movies.py文件

import scrapy
from maoyan.items import MaoyanItem
class MoviesSpider(scrapy.Spider):name = 'movies'allowed_domains = ['127.0.0.1']offset = 0url = "http://127.0.0.1:8080/board/4?offset="#********** Begin **********##1.对url进行定制,为翻页做准备start_urls = [url + str(offset)]#2.定义爬虫函数parse()def parse(self, response):item = MaoyanItem()movies = response.xpath("//div[ @class ='board-item-content']")for each in movies:#电影名name = each.xpath(".//div/p/a/text()").extract()[0]#主演明星starts = each.xpath(".//div[1]/p/text()").extract()[0]#上映时间releasetime = each.xpath(".//div[1]/p[3]/text()").extract()[0]score1 = each.xpath(".//div[2]/p/i[1]/text()").extract()[0]score2 = each.xpath(".//div[2]/p/i[2]/text()").extract()[0]#评分score = score1 + score2item['name'] = nameitem['starts'] = startsitem['releasetime'] = releasetimeitem['score'] = scoreyield item#3.在函数的最后offset自加10,然后重新发出请求实现翻页功能if self.offset < 90:self.offset += 10yield scrapy.Request(self.url+str(self.offset), callback=self.parse)#********** End **********#

第二关:小说网站玄幻分类第一页小说爬取
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
代码:
items.py文件

import scrapy
#存放全部小说信息
class NovelprojectItem(scrapy.Item):#********** Begin **********#name = scrapy.Field()author = scrapy.Field()state = scrapy.Field()description = scrapy.Field()#********** End **********#
#单独存放小说章节
class NovelprojectItem2(scrapy.Item):#********** Begin **********#tablename = scrapy.Field()title = scrapy.Field()#********** End **********#

pipeline.py文件

import pymysql
from NovelProject.items import NovelprojectItem,NovelprojectItem2
class NovelprojectPipeline(object):def process_item(self, item, spider):#********** Begin **********##1.和本地的数据库mydb建立连接connection = pymysql.connect(host='localhost',    # 连接的是本地数据库port = 3306,         # 端口号user='root',         # 自己的mysql用户名passwd='123123',     # 自己的密码db='mydb',           # 数据库的名字charset='utf8',      # 默认的编码方式:)#2.处理来自NovelprojectItem的item(处理完成后return返回item)if isinstance(item, NovelprojectItem):# 从items里取出数据name = item['name']author = item['author']state = item['state']description = item['description']try:with connection.cursor() as cursor:# 小说信息写入sql1 = 'Create Table If Not Exists novel(name varchar(20) CHARACTER SET utf8 NOT NULL,author varchar(10) CHARACTER SET utf8,state varchar(20) CHARACTER SET utf8,description text CHARACTER SET utf8,PRIMARY KEY (name))'sql2 = 'Insert into novel values (\'%s\',\'%s\',\'%s\',\'%s\')' % (name, author, state, description)cursor.execute(sql1)cursor.execute(sql2)# 提交本次插入的记录connection.commit()finally:# 关闭连接connection.close()return item#3.处理来自NovelprojectItem2的item(处理完成后return返回item)elif isinstance(item, NovelprojectItem2):tablename = item['tablename']title = item['title']try:with connection.cursor() as cursor:# 小说章节的写入sql3 = 'Create Table If Not Exists %s(title varchar(20) CHARACTER SET utf8 NOT NULL,PRIMARY KEY (title))' % tablenamesql4 = 'Insert into %s values (\'%s\')' % (tablename, title)cursor.execute(sql3)cursor.execute(sql4)connection.commit()finally:connection.close()return item#********** End **********#

novel.py文件

import scrapy
import re
from scrapy.http import Request
from NovelProject.items import NovelprojectItem
from NovelProject.items import NovelprojectItem2
class NovelSpider(scrapy.Spider):name = 'novel'allowed_domains = ['127.0.0.1']start_urls = ['http://127.0.0.1:8000/list/1_1.html']   #全书网玄幻魔法类第一页#********** Begin **********##1.定义函数,通过'马上阅读'获取每一本书的 URLdef parse(self, response):book_urls = response.xpath('//li/a[@class="l mr10"]/@href').extract()three_book_urls = book_urls[0:3]  #只取3本for book_url in three_book_urls:yield Request(book_url, callback=self.parse_read)#2.定义函数,进入小说简介页面,获取信息,得到后yield返回给pipelines处理,并获取'开始阅读'的url,进入章节目录def parse_read(self, response):item = NovelprojectItem()# 小说名字name = response.xpath('//div[@class="b-info"]/h1/text()').extract_first()#小说简介description = response.xpath('//div[@class="infoDetail"]/div/text()').extract_first()# 小说连载状态state = response.xpath('//div[@class="bookDetail"]/dl[1]/dd/text()').extract_first()# 作者名字author = response.xpath('//div[@class="bookDetail"]/dl[2]/dd/text()').extract_first()item['name'] = nameitem['description'] = descriptionitem['state'] = stateitem['author'] = authoryield item# 获取开始阅读按钮的URL,进入章节目录read_url = response.xpath('//a[@class="reader"]/@href').extract()[0]yield Request(read_url, callback=self.parse_info)#3.定义函数,进入章节目录,获取小说章节名并yield返回def parse_info(self, response):item = NovelprojectItem2()tablename = response.xpath('//div[@class="main-index"]/a[3]/text()').extract_first()titles = response.xpath('//div[@class="clearfix dirconone"]/li')for each in titles:title = each.xpath('.//a/text()').extract_first()item['tablename'] = tablenameitem['title'] = titleyield item#********** End **********#

第三关:模拟登陆拉勾网爬取招聘信息
在这里插入图片描述
在这里插入图片描述
代码:
items.py文件

# -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# https://doc.scrapy.org/en/latest/topics/items.html
import scrapy
class AjaxprojectItem(scrapy.Item):#********** Begin **********#jobName = scrapy.Field()jobMoney = scrapy.Field()jobNeed = scrapy.Field()jobCompany = scrapy.Field()jobType = scrapy.Field()jobSpesk = scrapy.Field()    #********** End **********#

middlewares.py文件

# -*- coding: utf-8 -*-
# Define here the models for your spider middleware
#
# See documentation in:
# https://doc.scrapy.org/en/latest/topics/spider-middleware.html
import scrapy
#********** Begin **********#
from scrapy import signals
from scrapy.downloadermiddlewares.useragent import UserAgentMiddleware
from scrapy.downloadermiddlewares.cookies import CookiesMiddleware
import random
#********** End **********#
class AjaxprojectSpiderMiddleware(object):# Not all methods need to be defined. If a method is not defined,# scrapy acts as if the spider middleware does not modify the# passed objects.@classmethoddef from_crawler(cls, crawler):# This method is used by Scrapy to create your spiders.s = cls()crawler.signals.connect(s.spider_opened, signal=signals.spider_opened)return sdef process_spider_input(self, response, spider):# Called for each response that goes through the spider# middleware and into the spider.# Should return None or raise an exception.return Nonedef process_spider_output(self, response, result, spider):# Called with the results returned from the Spider, after# it has processed the response.# Must return an iterable of Request, dict or Item objects.for i in result:yield idef process_spider_exception(self, response, exception, spider):# Called when a spider or process_spider_input() method# (from other spider middleware) raises an exception.# Should return either None or an iterable of Response, dict# or Item objects.passdef process_start_requests(self, start_requests, spider):# Called with the start requests of the spider, and works# similarly to the process_spider_output() method, except# that it doesn’t have a response associated.# Must return only requests (not items).for r in start_requests:yield rdef spider_opened(self, spider):spider.logger.info('Spider opened: %s' % spider.name)
class AjaxprojectDownloaderMiddleware(object):# Not all methods need to be defined. If a method is not defined,# scrapy acts as if the downloader middleware does not modify the# passed objects.@classmethoddef from_crawler(cls, crawler):# This method is used by Scrapy to create your spiders.s = cls()crawler.signals.connect(s.spider_opened, signal=signals.spider_opened)return sdef process_request(self, request, spider):# Called for each request that goes through the downloader# middleware.# Must either:# - return None: continue processing this request# - or return a Response object# - or return a Request object# - or raise IgnoreRequest: process_exception() methods of#   installed downloader middleware will be calledreturn Nonedef process_response(self, request, response, spider):# Called with the response returned from the downloader.# Must either;# - return a Response object# - return a Request object# - or raise IgnoreRequestreturn responsedef process_exception(self, request, exception, spider):# Called when a download handler or a process_request()# (from other downloader middleware) raises an exception.# Must either:# - return None: continue processing this exception# - return a Response object: stops process_exception() chain# - return a Request object: stops process_exception() chainpassdef spider_opened(self, spider):spider.logger.info('Spider opened: %s' % spider.name)
#********** Begin **********#
#别忘了在开头导入依赖
class MyUserAgentMiddleware(UserAgentMiddleware):#设置User-agentdef __init__(self, user_agent):self.user_agent = user_agent@classmethoddef from_crawler(cls, crawler):return cls(user_agent = crawler.settings.get('MY_USER_AGENT'))def process_request(self, request, spider):agent = random.choice(self.user_agent)request.headers['User-Agent'] = agent
class CookieMiddleware(CookiesMiddleware):def __init__(self, cookie):self.cookie = cookie@classmethoddef from_crawler(cls, crawler):return cls(cookie = crawler.settings.get('COOKIE'))def process_request(self, request, spider):request.cookies = self.cookie   
#********** End **********#

pipelines.py文件

# -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: https://doc.scrapy.org/en/latest/topics/item-pipeline.html
import pymysql
class AjaxprojectPipeline(object):def process_item(self, item, spider):#********** Begin **********##1.连接数据库connection = pymysql.connect(host='localhost',   # 连接的是本地数据库port=3306,          #数据库端口名user='root',        # 自己的mysql用户名passwd='123123',    # 自己的密码db='mydb',          # 数据库的名字charset='utf8',     # 默认的编码方式)#2.建表,插入数据,完毕后关闭数据库连接,并return itemjobName = item['jobName']jobMoney = item['jobMoney']jobNeed = item['jobNeed']jobCompany = item['jobCompany']jobType = item['jobType']jobSpesk = item['jobSpesk']try:with connection.cursor() as cursor:sql1 = 'Create Table If Not Exists lgjobs(jobName varchar(20) CHARACTER SET utf8 NOT NULL,jobMoney varchar(10),jobNeed varchar(20) CHARACTER SET utf8 ,jobCompany varchar(20) CHARACTER SET utf8 ,jobType varchar(20) CHARACTER SET utf8 ,jobSpesk varchar(20) CHARACTER SET utf8 ,PRIMARY KEY(jobName))'sql2 = 'Insert into lgjobs values (\'%s\',\'%s\',\'%s\',\'%s\',\'%s\',\'%s\')' % (jobName, jobMoney, jobNeed, jobCompany,jobType,jobSpesk)cursor.execute(sql1)cursor.execute(sql2)# 提交本次插入的记录connection.commit()finally:# 关闭连接connection.close()return item    #********** End **********#

settings.py文件

# -*- coding: utf-8 -*-
# Scrapy settings for AjaxProject project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
#     https://doc.scrapy.org/en/latest/topics/settings.html
#     https://doc.scrapy.org/en/latest/topics/downloader-middleware.html
#     https://doc.scrapy.org/en/latest/topics/spider-middleware.html
BOT_NAME = 'AjaxProject'
SPIDER_MODULES = ['AjaxProject.spiders']
NEWSPIDER_MODULE = 'AjaxProject.spiders'
# Crawl responsibly by identifying yourself (and your website) on the user-agent
# Obey robots.txt rules
ROBOTSTXT_OBEY = False
# Configure maximum concurrent requests performed by Scrapy (default: 16)
#CONCURRENT_REQUESTS = 32
# Configure a delay for requests for the same website (default: 0)
# See https://doc.scrapy.org/en/latest/topics/settings.html#download-delay
# See also autothrottle settings and docs
#DOWNLOAD_DELAY = 3
# The download delay setting will honor only one of:
#CONCURRENT_REQUESTS_PER_DOMAIN = 16
#CONCURRENT_REQUESTS_PER_IP = 16
# Disable cookies (enabled by default)
#COOKIES_ENABLED = True
# Disable Telnet Console (enabled by default)
#TELNETCONSOLE_ENABLED = False
# Override the default request headers:
#DEFAULT_REQUEST_HEADERS = {
#   'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
#   'Accept-Language': 'en',
#}
# Enable or disable spider middlewares
# See https://doc.scrapy.org/en/latest/topics/spider-middleware.html
#SPIDER_MIDDLEWARES = {
#    'AjaxProject.middlewares.AjaxprojectSpiderMiddleware': 543,
#}
# Enable or disable downloader middlewares
# See https://doc.scrapy.org/en/latest/topics/downloader-middleware.html
# Enable or disable extensions
# See https://doc.scrapy.org/en/latest/topics/extensions.html
#EXTENSIONS = {
#    'scrapy.extensions.telnet.TelnetConsole': None,
#}
# Configure item pipelines
# See https://doc.scrapy.org/en/latest/topics/item-pipeline.html
# Enable and configure the AutoThrottle extension (disabled by default)
# See https://doc.scrapy.org/en/latest/topics/autothrottle.html
#AUTOTHROTTLE_ENABLED = True
# The initial download delay
#AUTOTHROTTLE_START_DELAY = 5
# The maximum download delay to be set in case of high latencies
#AUTOTHROTTLE_MAX_DELAY = 60
# The average number of requests Scrapy should be sending in parallel to
# each remote server
#AUTOTHROTTLE_TARGET_CONCURRENCY = 1.0
# Enable showing throttling stats for every response received:
#AUTOTHROTTLE_DEBUG = False
# Enable and configure HTTP caching (disabled by default)
# See https://doc.scrapy.org/en/latest/topics/downloader-middleware.html#httpcache-middleware-settings
#HTTPCACHE_ENABLED = True
#HTTPCACHE_EXPIRATION_SECS = 0
#HTTPCACHE_DIR = 'httpcache'
#HTTPCACHE_IGNORE_HTTP_CODES = []
#HTTPCACHE_STORAGE = 'scrapy.extensions.httpcache.FilesystemCacheStorage'
#********** Begin **********#
#MY_USER_AGENT
MY_USER_AGENT = ["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0","Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36"
]
#DOWNLOADER_MIDDLEWARES    
DOWNLOADER_MIDDLEWARES = {'scrapy.downloadermiddleware.useragent.UserAgentMiddleware': None,#这里要设置系统的useragent为None,否者会被覆盖掉'AjaxProject.middlewares.MyUserAgentMiddleware': 400,'scrapy.contrib.downloadermiddleware.cookies.CookiesMiddleware': 700,
}
#ITEM_PIPELINES
ITEM_PIPELINES = {'AjaxProject.pipelines.AjaxprojectPipeline': 300,
}
#DOWNLOAD_DELAY
DOWNLOAD_DELAY = 1.5
#COOKIE
COOKIE = {"user_trace_token": "20171109093921 - c87e4dd6 - 6116 - 4060 - a976 - 38df4f6dfc1c","_ga = GA1": ".2.1308939382.1510191563","LGUID": "20171109093922 - cff5ddb7 - c4ee - 11e7 - 985f - 5254005c3644","JSESSIONID": "ABAAABAAAGGABCBAE8E3FCEFC061F7CF2860681B1BF3D98","X_HTTP_TOKEN": "0f2396abe975f6a09df1c0b8a0a3a258","showExpriedIndex": "1","showExpriedCompanyHome": "1","showExpriedMyPublish": "1","hasDeliver": "12","index_location_city": "% E6 % B7 % B1 % E5 % 9C % B3","TG - TRACK - CODE": "index_user","login": "false","unick": "","_putrc": "","LG_LOGIN_USER_ID": "","_gat": "1","LGSID": "20180720141029 - 99fde5eb - 8be3 - 11e8 - 9e4d - 5254005c3644","PRE_UTM": "","PRE_HOST": "","PRE_SITE": "","PRE_LAND": "https % 3A % 2F % 2Fwww.lagou.com % 2Fzhaopin % 2F","SEARCH_ID": "5ddd3d52f1d94b45820534b397ef21e6","LGRID": "20180720141849 - c455d124 - 8be4 - 11e8 - 9e4d - 5254005c3644",
}
#********** End **********#

ajax.py文件

# -*- coding: utf-8 -*-
import scrapy
from scrapy.http import Request
import requests
from AjaxProject.items import AjaxprojectItem
class AjaxSpider(scrapy.Spider):name = 'ajax'allowed_domains = ['www.lagou.com']start_urls = ['https://www.lagou.com/zhaopin/%d/' %n for n in range(1,6)]  #爬取招聘信息1-5页#********** Begin **********##定义爬虫处理函数parse()def parse(self, response):Jobs = response.xpath('//ul[@class="item_con_list"]/li')for Job in Jobs:jobName = Job.xpath('div/div/div/a/h3/text()').extract_first()jobMoney = Job.xpath('div/div/div/div/span/text()').extract_first()jobNeed = Job.xpath('div/div/div/div/text()').extract()jobNeed = jobNeed[2].strip()jobCompany = Job.xpath('div/div/div/a/text()').extract()jobCompany = jobCompany[3].strip()jobType = Job.xpath('div/div/div/text()').extract()jobType = jobType[7].strip()jobSpesk = Job.xpath('div[@class="list_item_bot"]/div/text()').extract()jobSpesk = jobSpesk[-1].strip()item = AjaxprojectItem()item['jobName'] = jobNameitem['jobMoney'] = jobMoneyitem['jobNeed'] = jobNeeditem['jobCompany'] = jobCompanyitem['jobType'] = jobTypeitem['jobSpesk'] = jobSpeskyield item#********** End **********#

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

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

相关文章

2015年免费的25款 WordPress 网站模板

2015年 WordPress 插件和主题的数量继续在增长。这一年&#xff0c;我们可以期待WP主题引入一些新的技术&#xff0c;从背景&#xff0c;自适应响应式图像到从背景图片中提取主色。 本文包含25款最近发布的 WordPress 主题列表。这些主题都是优质&#xff0c;免费的&#xff0c…

wordpress和传统网站的加载性能优化

前言 网站的性能优化是非常重要的&#xff0c;直接决定了用户体验&#xff0c;和网站的负载能力。 Wordpress是一款非常受欢迎的Blog/CMS开源软件。全球数百万的网站使用wordpress搭建。 那么&#xff0c;如何让wordpress的性能、效能达到最佳&#xff0c;在减少服务器负荷的情…

Nginx——使用 Nginx 提升网站访问速度【转载+整理】

原文地址 本文是写于 2008 年&#xff0c;文中提到 Nginx 不支持 Windows 操作系统&#xff0c;但是现在它已经支持了&#xff0c;此外还支持 FreeBSD&#xff0c;Solaris&#xff0c;MacOS X~ Nginx&#xff08;“engine x”&#xff09; 是一个高性能的 HTTP 和反向代理服务器…

烂泥:Wordpress添加PHP测试页到网站根目录

本文首发于烂泥行天下&#xff0c;由秀依林枫提供友情赞助。 呵呵&#xff0c;对于我们这些非程序员来说wordpress的也是很神秘的。咱也对这个了解不多&#xff0c;不过今天为了添加一个测试页&#xff0c;搞的我很纠结。 尽管自己的博客也是wordpress写的&#xff0c;但是刚刚…

通过避免下列 10 个常见 ASP.NET 缺陷使网站平稳运行(转载)

LoadControl 和输出缓存会话和输出缓存Forms 身份验证票证生存期视图状态&#xff1a;无声的性能杀手SQL Server 会话状态&#xff1a;另一个性能杀手未缓存的角色配置文件属性序列化线程池饱和模拟和 ACL 授权不要完全信赖它 — 请设置数据库的配置文件&#xff01;ASP.NET 成…

让自己的网站或博客被百度收录的小技巧

刚开的博客通常情况下前一两个月是不太会被百度搜到的。 但是我们可以主动到搜索引擎网站上登记 &#xff0c;目前提供这种功能的网站很多&#xff0c;下面提供几个免费登录入口&#xff1a; Google免费登录入口&#xff1a;http://www.google.com/intl/zh-CN/add_url.html 百度…

【转】 详细介绍windows下使用python pylot进行网站压力测试

windows下使用python进行网站压力测试&#xff0c;有两个必不可少的程序需要安装&#xff0c;一个是python&#xff0c;另一个是pylot。python是一个安装软件&#xff0c;用来运行python程序&#xff0c;而pylot则是python的一个功能插件&#xff0c;作用是进行网站压力测试。本…

强迫症发 - 网站公安机关备案号图标矢量化

强迫症这毛病说发就发&#xff0c;今天又跟备案图标较上劲了&#xff01;把矢量化后的图标分享出来&#xff0c;给有同样症状的同学用...... 不明白为何我要折腾的同学请把网页放大看&#xff0c;能放多大就放多大&#xff01; 素材下载地址&#xff1a; http://www.stumbling…

如何为 Drupal 7 网站添加悬浮的反馈按钮?

最近有客户咨询我们要怎么为 Drupal 网站添加悬浮按钮&#xff0c;方便访客能够链接到反馈表单页面。很幸运&#xff0c;使用 Feedback Simple 模块可以很容易实现。在这篇短教程中&#xff0c;我将和大家分享如何添加链接到“反馈”页面的悬浮按钮。创建反馈页面使用 Webform …

iptables 防火墙 只允许某IP访问某端口、访问特定网站

2019独角兽企业重金招聘Python工程师标准>>> 1.先备份iptables # cp /etc/sysconfig/iptables /var/tmp 需要开80端口&#xff0c;指定IP和局域网 下面三行的意思&#xff1a; 先关闭所有的80端口 开启ip段192.168.1.0/24端的80口 开启ip段211.123.16.123/24端ip段的…

当你想对常用网站定制属于自己的颜色,然而又没人理你怎么办

自己动手定制的话&#xff0c;推荐两个chorme插件&#xff1a; 无事&#xff0c;举个栗子吧&#xff0c;刚好打开了知乎&#xff1a; 转载于:https://www.cnblogs.com/cynthia-wuqian/p/5319884.html

扒一扒HTTPS网站的内幕

215年6月&#xff0c;维基媒体基金会发布公告&#xff0c;旗下所有网站将默认开启HTTPS&#xff0c;这些网站中最为人所知的当然是全球最大的在线百科-维基百科。而更早时候的3月&#xff0c;百度已经发布公告&#xff0c;百度全站默认开启HTTPS。淘宝也默默做了全站HTTPS。 网…

电商总结(一)小型电商网站的架构

又是一年年底了&#xff0c;这一年&#xff0c;从传统软件行业进入到电商企业&#xff0c;算是一次转行了吧。刚开始&#xff0c;觉得电商网站没有什么技术含量&#xff0c;也没有什么门槛&#xff0c;都是一些现有的东西堆积木似的堆出来而已。然而&#xff0c;真正进入到这个…

delphi RAD Studio新版本及路线图 及官方网站 官方 版本发布时间

delphi RAD Studio Berlin 10.1 主要是FireMonkey 移动开发的改动&#xff0c;VCL确实没有多大变化。 http://docwiki.embarcadero.com/RADStudio/Berlin/en/Main_Page http://docwiki.embarcadero.com/RADStudio/Berlin/en/Whats_New EMB 官网地址资源 fix list for RAD Stud…

网站分页效果

为什么80%的码农都做不了架构师&#xff1f;>>> 网站分页效果函数 error_reporting(0); $host localhost; $user root; $pass 123; $dbname oa; $port 3306; $db new mysqli($host,$user,$pass,$dbname,$port); if($db->connect_error){die(mysql server …

网站漏洞修复与防护之CSRF跨站攻击

CSRF通俗来讲就是跨站伪造请求攻击&#xff0c;英文Cross-Site Request Forgery&#xff0c;在近几年的网站安全威胁排列中排前三&#xff0c;跨站攻击利用的是网站的用户在登陆的状态下&#xff0c;在用户不知不觉的情况下执行恶意代码以及执行网站的权限操作&#xff0c;CSRF…

写一个简单的网站文件管理器-框选

为了这个框选&#xff0c;耗费了无数脑细胞&#xff0c;牺牲了n多的封装特性 源码&#xff08;害人&#xff0c;下载请谨慎&#xff09;&#xff1a;https://files.cnblogs.com/files/allofalan/wnds.rar转载于:https://www.cnblogs.com/allofalan/p/9949410.html

绑定域名到JavaWeb项目,由域名直接访问到网站首页

转载请注明原文地址&#xff1a;http://www.cnblogs.com/ygj0930/p/6383996.html 一&#xff1a;购买域名 请移步到相关网站购买域名&#xff0c;我是在腾讯云买的。购买后记得实名认证&#xff0c;不然解析不了。 二&#xff1a;解析域名 大约七八分钟后&#xff0c;测试是否解…

Joomla网站的5项基本安全检查

2019独角兽企业重金招聘Python工程师标准>>> 我们帮助很多人修复了Joomla网站的问题。但我们发现许多问题是通过五种解决方案来解决。如果你实现所有五个解决方案&#xff0c;你将拥有一个更安全&#xff0c;更健康&#xff0c;更快速的Joomla网站。以下是这五种解决…

网站mysql防止sql注入攻击 3种方法总结

2019独角兽企业重金招聘Python工程师标准>>> mysql数据库一直以来都遭受到sql注入攻击的影响&#xff0c;很多网站&#xff0c;包括目前的PC端以及手机端都在使用phpmysql数据库这种架构&#xff0c;大多数网站受到的攻击都是与sql注入攻击有关&#xff0c;那么mysq…