学了一段时间python了,网上的公开课也看了不少,课程都听得懂,但是一想写点什么就不知道从何下手、觉得太麻烦,现在终于狠下心走出舒适区,动手写了第一个爬虫。

爬取目标

人民日报、上观新闻、观察者网、澎湃新闻
主要爬取了涉及时事、政治方面的几个板块。
因为新闻页面 html 比较好解析,而且不需要反爬。规避了很多困难。

代码

我把代码封装了一下,想试试的朋友可以直接下载,然后import 来使用。
毕竟还是初学者,觉得不同类之间的代码重复率很高,可能写了很多无用代码。 还请大家多多提出修改意见。

不多BB,上代码了。

爬取过程主要用到了requests和BeautifulSoup 库
数据最终存储在sqlite3 数据库里

# #!/usr/bin/env python
# # coding: utf-8
import requests
from bs4 import BeautifulSoup as bs
import re
import os
import time
import sqlite3
import datetime
def how():how =  '''(1)使用方法: update_info(['人民日报-时政','上观新闻-政情','观察者网-国际','澎湃新闻-时事'],3)\n-> 爬取这四个网站对应版块共[3]页的新闻信息\n(2)使用方法: update_content(['人民日报','澎湃新闻'])\n-> 更新这两个网站对应已爬取信息的新闻内容\n'''print(how)info = {'人民日报':['时政', '国际', '台湾', '军事','社会', '法治'],'上观新闻':['要闻', '政情', '天下'],'观察者网':['国际', '军事', '科技'],'澎湃新闻':['时事']
}def update_info(goal, page_num):'''如果 传入 update_info(['人民日报','上观新闻'])-> 爬取 这两个网站的新闻'''DB_Name = 'datasource.db'table_name = 'news_info'conn = sqlite3.connect(DB_Name)# print('连接数据库%s成功' % (DB_Name))cursor = conn.cursor()conn.execute('Pragma foreign_keys = ON;')# 创建表create = f'''Create Table if not exists news_info (info_ID Integer Primary key Autoincrement,Source Varchar(20), Title Varchar(100),Date char(8), Author Varchar(20), Url Varchar(100), updated varchar(8), Site Varchar(8))'''# 建立news_info 表 6列: info_ID(主) , 来源, 标题, 日期, 作者, URL, 是否有内容conn.execute(create)cursor.close()conn.close()for each in goal:page_info = each.split('-')[1]page_key = each.split('-')[0]if page_key =='人民日报':s = Rm_Spider(page_info,page_num)s.crawl_info()elif page_key == '上观新闻':s = Sg_Spider(page_info,page_num)s.crawl_info()elif page_key == '观察者网':s = Gc_Spider(page_info,page_num)s.crawl_info()elif page_key == '澎湃新闻':s = Pp_Spider(page_info,page_num)s.crawl_info()def update_content(goal):DB_Name = 'datasource.db'table_name = 'news_info'conn = sqlite3.connect(DB_Name)cursor = conn.cursor()conn.execute('Pragma foreign_keys = ON;')# 创建表conn.execute('''Create Table if not exists news_content (content_ID Integer Primary key Autoincrement,info_ID Integer,title Text, body Text, content Text,Foreign Key (info_ID) References news_info(info_ID));''')# 建立 news_content 表 4列 : content_ID(主),info_ID(外), 正文, 文本cursor.close()conn.close()for each in goal:if each == '人民日报':s = Rm_Spider('时政',1)s.crawl_content()s.updated()elif each == '上观新闻':s = Sg_Spider('政情', 1)s.crawl_content()s.updated()elif each == '观察者网':s = Gc_Spider('国际', 1)s.crawl_content()s.updated()elif each == '澎湃新闻':s = Pp_Spider('时事', 1)s.crawl_content()s.updated()
#人民日报虫
class Rm_Spider():def __init__(self,page_info,page_num):self.info = {'时政': 'politics', '国际': 'world', '台湾': 'tw', '军事': 'military','社会': 'society', '法治': 'legal'}self.page_info = self.info[page_info]self.page_num = page_numdef get_pagelist(self):page_info = self.page_infonum = self.page_numpagelist = []for index in range(1,num+1):if index == 1:page = f'http://{page_info}.people.com.cn/'else:page = f'http://{page_info}.people.com.cn/index{index}.html'pagelist.append(page)return pagelistdef get_html(self,url):response = requests.get(url)response.encoding = 'GBK'if response.status_code == 200:return response.textelse:return Nonedef get_linklist(self, page_html, page_info):#传入 get_html return的结果, self.page_infopage_info = self.page_infopattern = re.compile(r'^/n1(.*?)html$')soup = bs(page_html, 'lxml')  # 这是一个 bs实例对象link_list = soup.find_all('a', href=pattern)linklist = []for link in link_list:link = f'http://{page_info}.people.com.cn/{link.get("href")}'if link not in linklist:linklist.append(link)return linklistdef get_info(self, html, link):'''返回得到的新闻 来源,标题,日期,作者,url,有木有内容参数是get_html得到的html解析'''bsobj = bs(html, 'lxml')try:source = bsobj.find('div', class_="box01").div.a.text.replace('\u200b','').replace('\u3000', '').replace('\xa0', '').replace('\t', '').replace('\r', '')title = bsobj.h1.text.replace('\u200b','').replace('\u3000', '').replace('\xa0', ' ').replace('\t', '').replace('\r', '')author = bsobj.find('div', class_="edit clearfix").text.strip('(责编:)').replace('\u200b','').replace('\u3000', '').replace('\xa0', '').replace('\t', '').replace('\r', '')url = linkdate_str = url.split('/')[5] + url.split('/')[6]  # date 是 发布日期  link 是 urldate = datetime.datetime.strptime(date_str, "%Y%m%d").strftime('%Y-%m-%d')return source, title, author, date, urlexcept AttributeError:return None, None, None, None, Nonedef news_info_save(self, source, title, date, author, url):'''存入sqlite数据库中的news_info表'''news_info = 'Insert Into news_info(source, title, date, author, url, Site) Values (?,?,?,?,?,"人民日报");'self.cursor.execute(news_info, (source, title, date, author, url))self.conn.commit()def crawl_info(self):DB_Name = 'datasource.db'self.conn = sqlite3.connect(DB_Name)
#         print('Rm_Spider连接数据库%s成功' % (DB_Name))self.cursor = self.conn.cursor()self.conn.execute('Pragma foreign_keys = ON;')page_info = self.page_infonum = self.page_numpage_list = self.get_pagelist()  # page_info , numcount = 0print('人民日报--信息爬取开始')for each in page_list:html_code = self.get_html(each)  # 把每一个新闻版面的html代码拿到linklist = self.get_linklist(html_code,page_info)  # 拿到所有的链接for link in linklist:html_content = self.get_html(link)  # 拿到每一篇新闻的html代码news_source, news_title, news_date, news_author, news_url = self.get_info(html_content,link)  # 拿到写入文件的内容, 标题if news_source:count += 1self.news_info_save(news_source, news_title, news_date, news_author, news_url)print(f'{count}-{news_title}  信息爬取完成!'.ljust(100), end='\r')time.sleep(1)self.cursor.close()self.conn.close()print('\n结束')def get_content(self, html):'''返回得到的新闻正文,文本参数是get_html得到的html解析'''bsobj = bs(html, 'lxml')try:body = str(bsobj.find('div', id='rwb_zw')).replace('\u200b','').replace('\u3000', '').replace('\xa0', ' ').replace('\t', '').replace('\r', '')  # 正文title = bsobj.h1.text.replace('\u200b','').replace('\u3000', '').replace('\xa0', ' ').replace('\t', '').replace('\r', '')plist = bsobj.find('div', id='rwb_zw').find_all('p')  #result = ''for each in plist:clean_each = each.text.strip('\r\n\t\u3000')result += f'{clean_each}\n'content = f'{title}\n{result}'.replace('\u200b','').replace('\u3000', '').replace('\xa0', ' ').replace('\t', '').replace('\r', '')  # 文本return title, body, contentexcept AttributeError:return None, None, Nonedef news_content_save(self, info_ID, title, body, content):'''存入sqlite数据库中的news_content表'''news_content = 'Insert Into news_content(info_ID,title, body,content ) Values (?,?,?,?);'self.cursor.execute(news_content, (info_ID, title, body, content))self.conn.commit()def updated(self):DB_Name = 'datasource.db'conn1 = sqlite3.connect(DB_Name)cursor1 = conn1.cursor()cursor1.execute('Update news_info Set updated = "已更新" Where updated is null and Site = "人民日报"')conn1.commit()cursor1.close()conn1.close()def crawl_content(self):DB_Name = 'datasource.db'self.conn = sqlite3.connect(DB_Name)
#         print('Rm_Spider连接数据库%s成功' % (DB_Name))self.cursor = self.conn.cursor()self.conn.execute('Pragma foreign_keys = ON;')count = 0print('人民日报--内容爬取开始')sql = 'Select url, Info_ID From news_info Where site = "人民日报" and updated is null'url_list = self.cursor.execute(sql).fetchall()for each in url_list:link = each[0]info_ID = each[1]html_content = self.get_html(link)news_title, news_body, news_content = self.get_content(html_content)if news_title:count += 1self.news_content_save(info_ID, news_title,news_body, news_content)print(f'{count}-{news_title}  内容爬取完成!'.ljust(100), end='\r')time.sleep(1)self.cursor.close()self.conn.close()print('\n结束')
#上观新闻虫
class Sg_Spider():def __init__(self, page_info, page_num):self.info = {'要闻': '42', '政情': '1', '天下': '21'}self.page_info = self.info[page_info]self.page_num = page_numdef get_pagelist(self):page_info = self.page_infonum = self.page_numpagelist = []for index in range(1, num + 1):page = f'https://www.jfdaily.com/news/list?section={page_info}&page={index}'pagelist.append(page)return pagelistdef get_html(self, url):'''获取各版面的html代码参数:待爬取版面url'''response = requests.get(url)response.encoding = 'utf-8'if response.status_code == 200:return response.textelse:return Nonedef get_linklist(self, page_html):'''获取版面下各个新闻的链接参数为版面的html代码'''bsobj = bs(page_html, 'lxml')link_list = bsobj.find_all('div', class_="chengshi_img")#     print(each.a.get('href'))linklist = []for each in link_list:tail = each.a.get('href')link = f'https://www.jfdaily.com{tail}'if link not in linklist:linklist.append(link)return linklistdef get_info(self, html, link):bsobj = bs(html, 'lxml')date_pattern = re.compile(r'\d{4}-\d{2}-\d{2}')try:source = bsobj.find('span', class_="max-words").text.replace('\u200b','').replace('\u3000', '').replace('\xa0', '').replace('\t', '').replace('\r', '')title = bsobj.title.text.replace('\u200b','').replace('\u3000', '').replace('\xa0', ' ').replace('\t', '').replace('\r', '')  # 标题author = bsobj.find('div', class_="fenxiang_zz").find_all('span')[1].text.replace('\u200b','').replace('\u3000', '').replace('\xa0', '').replace('\t', '').replace('\r', '')url = linkdate = date_pattern.findall(bsobj.find('div', class_="fenxiang_zz").text)[0]return source, title, author, date, urlexcept AttributeError:return None, None, None, None, Nonedef get_content(self, html):bsobj = bs(html, 'lxml')try:title = bsobj.title.text.replace('\u200b','').replace('\u3000', '').replace('\xa0', ' ').replace('\t', '').replace('\r', '')   # 标题body = str(bsobj.find('div', id="newscontents")).replace('\u200b','').replace('\u3000', '').replace('\xa0', ' ').replace('\t', '').replace('\r', '')  # 正文plist = bsobj.find('div', id="newscontents").find_all('p')  # 文本列表pre_content = ''for p in plist:clean_p = p.text.strip("\r\n\t")pre_content += f'{clean_p}\n'content = f'{title}\n{pre_content}'.replace('\u200b','').replace('\u3000', '').replace('\xa0', ' ').replace('\t', '').replace('\r', '')  # 文本结果return title, body, contentexcept AttributeError:return None, None, Nonedef news_info_save(self, source, title, date, author, url):'''存入sqlite数据库中的news_info表'''news_info = 'Insert Into news_info(source, title, date, author, url,Site) Values (?,?,?,?,?,"上观新闻");'self.cursor.execute(news_info, (source, title, date, author, url))self.conn.commit()def news_content_save(self, info_ID, title, body, content):'''存入sqlite数据库中的news_content表'''news_content = 'Insert Into news_content(info_ID,title, body,content ) Values (?,?,?,?);'self.cursor.execute(news_content, (info_ID, title, body, content))self.conn.commit()def updated(self):DB_Name = 'datasource.db'conn1 = sqlite3.connect(DB_Name)cursor1 = conn1.cursor()cursor1.execute('Update news_info Set updated = "已更新" Where updated is null and Site = "上观新闻"')conn1.commit()cursor1.close()conn1.close()def crawl_info(self):DB_Name = 'datasource.db'self.conn = sqlite3.connect(DB_Name)
#         print('Sg_Spider连接数据库%s成功' % (DB_Name))self.cursor = self.conn.cursor()self.conn.execute('Pragma foreign_keys = ON;')page_info = self.page_infonum = self.page_numpage_list = self.get_pagelist()count = 0print('上观新闻--信息爬取开始')for each in page_list:html_code = self.get_html(each)  # 把每一个新闻版面的html代码拿到linklist = self.get_linklist(html_code)  # 拿到所有的链接for link in linklist:html_content = self.get_html(link)  # 拿到每一篇新闻的html代码news_source, news_title, news_date, news_author, news_url = self.get_info(html_content,link)  # 拿到写入文件的内容, 标题if news_source:count += 1self.news_info_save(news_source, news_title, news_date, news_author, news_url)print(f'{count}-{news_title}  信息爬取完成!'.ljust(100), end='\r')time.sleep(1)#关闭数据库self.cursor.close()self.conn.close()print('\n结束')def crawl_content(self):DB_Name = 'datasource.db'self.conn = sqlite3.connect(DB_Name)
#         print('Sg_Spider连接数据库%s成功' % (DB_Name))self.cursor = self.conn.cursor()self.conn.execute('Pragma foreign_keys = ON;')count = 0print('上观新闻--内容爬取开始')sql = 'Select url, Info_ID From news_info Where site = "上观新闻" and updated is null'url_list = self.cursor.execute(sql).fetchall()for each in url_list:link = each[0]info_ID = each[1]html_content = self.get_html(link)news_title, news_body, news_content = self.get_content(html_content)if news_title:count += 1self.news_content_save(info_ID, news_title,news_body, news_content)print(f'{count}-{news_title}  内容爬取完成!'.ljust(100), end='\r')time.sleep(1)self.cursor.close()self.conn.close()print('\n结束')
#观察者网虫
class Gc_Spider():def __init__(self, page_info, page_num):self.info = {'国际': 'GuoJi·ZhanLue', '军事': 'JunShi', '科技': 'GongYe·KeJi'}self.page_info = self.info[page_info]self.page_num = page_numdef get_pagelist(self):page_info = self.page_infonum = self.page_numpagelist = []for index in range(1, num + 1):page = f'https://www.guancha.cn/{page_info}/list_{index}.shtml'pagelist.append(page)return pagelistdef get_html(self, url):response = requests.get(url)response.encoding = 'utf-8'if response.status_code == 200:return response.textelse:return Nonedef get_linklist(self, page_html):bsobj = bs(page_html, 'lxml')linklist = []h4s = bsobj.find('ul', class_="column-list fix").find_all('h4')for h4 in h4s:link = f'https://www.guancha.cn{h4.a.get("href")}'linklist.append(link)return linklistdef get_info(self, html, link):bsobj = bs(html, 'lxml')try:title = bsobj.title.text.replace('\u200b','').replace('\u3000', '').replace('\xa0', ' ').replace('\t', '').replace('\r', '') # 标题url = linksource = bsobj.find('div', class_="time fix").find_all('span')[-1].text.strip('来源:').replace('\u200b','').replace('\u3000', '').replace('\xa0', '').replace('\t', '').replace('\r', '')author = bsobj.find('ul', class_="article-other").li.text.strip('责任编辑:\r\n\t\t\t&nbsp').replace('\u200b','').replace('\u3000', '').replace('\xa0', '').replace('\t', '').replace('\r', '')date_list = link.split('/')[-1].split('_')date = f'{date_list[0]}-{date_list[1]}-{date_list[2]}'return source, title, author, date, urlexcept AttributeError:return None, None, None, None, Nonedef get_content(self, html):bsobj = bs(html, 'lxml')try:title = bsobj.title.text.replace('\u200b','').replace('\u3000', '').replace('\xa0', ' ')  # 标题body = str(bsobj.find('div', class_="content all-txt")).replace('\u200b','').replace('\u3000', '').replace('\xa0', ' ').replace('\t', '').replace('\r', '') # 正文plist = bsobj.find('div', class_='content all-txt').find_all('p')  # 文本列表pre_content = ''for p in plist:clean_p = p.text.strip("\r\n\t")pre_content += f'{clean_p}\n'content = f'{title}\n{pre_content}'.replace('\u200b','').replace('\u3000', '').replace('\xa0', ' ').replace('\t', '').replace('\r', '')  # 文本结果return title, body, contentexcept AttributeError:return None, None, Nonedef news_info_save(self, source, title, date, author, url):'''存入sqlite数据库中的news_info表'''news_info = 'Insert Into news_info(source, title, date, author, url,Site) Values (?,?,?,?,?,"观察者网");'self.cursor.execute(news_info, (source, title, date, author, url))self.conn.commit()def news_content_save(self, info_ID, title, body, content):'''存入sqlite数据库中的news_content表'''news_content = 'Insert Into news_content(info_ID,title, body,content ) Values (?,?,?,?);'self.cursor.execute(news_content, (info_ID, title, body, content))self.conn.commit()def updated(self):DB_Name = 'datasource.db'conn1 = sqlite3.connect(DB_Name)cursor1 = conn1.cursor()cursor1.execute('Update news_info Set updated = "已更新" Where updated is null and Site = "观察者网"')conn1.commit()cursor1.close()conn1.close()def crawl_info(self):DB_Name = 'datasource.db'table_name = 'news_info'self.conn = sqlite3.connect(DB_Name)
#         print('Gc_Spider连接数据库%s成功' % (DB_Name))self.cursor = self.conn.cursor()self.conn.execute('Pragma foreign_keys = ON;')page_info = self.page_infonum = self.page_numpage_list = self.get_pagelist()count = 0print('观察者网--信息爬取开始')for each in page_list:html_code = self.get_html(each)  # 把每一个新闻版面的html代码拿到linklist = self.get_linklist(html_code)  # 拿到所有的链接for link in linklist:html_content = self.get_html(link)  # 拿到每一篇新闻的html代码news_source, news_title, news_date, news_author, news_url = self.get_info(html_content,link)  # 拿到写入文件的内容, 标题if news_source:count += 1self.news_info_save(news_source, news_title, news_date, news_author, news_url)print(f'{count}-{news_title}  信息爬取完成!'.ljust(100), end='\r')time.sleep(1)self.cursor.close()self.conn.close()print('\n结束')def crawl_content(self):DB_Name = 'datasource.db'self.conn = sqlite3.connect(DB_Name)
#         print('Gc_Spider连接数据库%s成功' % (DB_Name))self.cursor = self.conn.cursor()self.conn.execute('Pragma foreign_keys = ON;')count = 0print('观察者网--内容爬取开始')sql = 'Select url, Info_ID From news_info Where site = "观察者网" and updated is null'url_list = self.cursor.execute(sql).fetchall()for each in url_list:link = each[0]info_ID = each[1]html_content = self.get_html(link)news_title, news_body, news_content = self.get_content(html_content)if news_title:count += 1self.news_content_save(info_ID, news_title,news_body, news_content)print(f'{count}-{news_title}  内容爬取完成!'.ljust(100), end='\r')time.sleep(1)self.cursor.close()self.conn.close()print('\n结束')
#澎湃新闻虫
class Pp_Spider():def __init__(self, page_info, page_num):self.info = {'时事': '''/load_index.jsp?nodeids=25462,25488,25489,25490,25423,25426,25424,25463,25491,25428,68750,27604,25464,25425,25429,25481,25430,25678,25427,25422,25487,25634,25635,25600,&channelID=25950&topCids=,8173176,8173073,8172980,8173179,8173070,8173170,8173132'''}self.page_info = self.info[page_info]self.page_num = page_numdef get_pagelist(self):page_info = self.page_infonum = self.page_numpagelist = []for index in range(1, num + 1):page = f'https://www.thepaper.cn/{page_info}&pageidx={index}'pagelist.append(page)return pagelistdef get_html(self, url):response = requests.get(url)response.encoding = 'utf-8'if response.status_code == 200:return response.textelse:return Nonedef get_linklist(self, page_html):bsobj = bs(page_html, 'lxml')link_list = bsobj.find_all('div', class_="news_li")#     print(each.a.get('href'))linklist = []for each in link_list:tail = each.a.get('href')link = f'https://www.thepaper.cn/{tail}'if link not in linklist:linklist.append(link)return linklistdef get_info(self, html, link):bsobj = bs(html, 'lxml')date_pattern = re.compile(r'\d{4}-\d{2}-\d{2}')try:title = bsobj.title.text.replace('\u200b','').replace('\u3000', '').replace('\xa0', ' ').replace('\t', '').replace('\r', '')url = linksource = bsobj.find('div', class_="news_about").find_all('p')[0].text.replace('\u200b','').replace('\u3000', '').replace('\xa0', '').replace('\t', '').replace('\r', '')author = bsobj.find('div', class_="infor_item").text.strip('责任编辑:').replace('\u200b','').replace('\u3000', '').replace('\xa0', '').replace('\t', '').replace('\r', '')date = date_pattern.findall(bsobj.find('div', class_="news_about").find_all('p')[1].text)[0]return source, title, author, date, urlexcept AttributeError:return None, None, None, None, Nonedef get_content(self, html):def extract_imgtext(body):'''去除掉图片下面的文字的算法'''soup = bodyif soup('span'):for each in soup('span'):each.extract()if soup('p'):for each in soup('p'):each.extract()if soup('font'):for each in soup('font'):each.extract()if soup('div'):for each in soup('div'):each.extract()if soup('img'):for each in soup('img'):each.extract()return soupbsobj = bs(html, 'lxml')title = bsobj.title.text.replace('\u200b','').replace('\u3000', '').replace('\xa0', ' ').replace('\t', '').replace('\r', '')body = str(bsobj.find('div', class_="news_txt")).replace('\u200b','').replace('\u3000', '').replace('\xa0', ' ').replace('\t', '').replace('\r', '')body_soup = bsobj.find('div', class_="news_txt")soup = extract_imgtext(body_soup)#     try:# print(sou.contents)for index in range(len(soup.contents)):#         print(soup.contents[index])soup.contents[index] = str(soup.contents[index]).strip('<strong></strong>')#         print(soup.contents[index])if soup.contents[index] == 'b':soup.contents[index] = '\n'#         print(soup.contents[index])soup.contents[index].strip('<strong>')#     print(soup.contents)content_dirty = f'{title}\n'for each in soup.contents:content_dirty += eachcontent = content_dirty.replace('\u200b','').replace('\u3000', '').replace('\xa0', ' ').replace('\t', '').replace('\r', '')return title, body, contentdef crawl_info(self):DB_Name = 'datasource.db'table_name = 'news_info'self.conn = sqlite3.connect(DB_Name)
#         print('Pp_Spider连接数据库%s成功' % (DB_Name))self.cursor = self.conn.cursor()self.conn.execute('Pragma foreign_keys = ON;')page_info = self.page_infonum = self.page_numpage_list = self.get_pagelist()count = 0print('澎湃新闻--信息爬取开始')for each in page_list:html_code = self.get_html(each)  # 把每一个新闻版面的html代码拿到linklist = self.get_linklist(html_code)  # 拿到所有的链接for link in linklist:html_content = self.get_html(link)  # 拿到每一篇新闻的html代码news_source, news_title, news_date, news_author, news_url = self.get_info(html_content, link)if news_source:count += 1self.news_info_save(news_source, news_title, news_date, news_author, news_url)print(f'{count}-{news_title}  信息爬取完成!'.ljust(100), end='\r')time.sleep(1)self.cursor.close()self.conn.close()print('\n结束')def news_info_save(self, source, title, date, author, url):'''存入sqlite数据库中的news_info表'''news_info = 'Insert Into news_info(source, title, date, author, url,Site) Values (?,?,?,?,?,"澎湃新闻");'self.cursor.execute(news_info, (source, title, date, author, url))self.conn.commit()def news_content_save(self, info_ID, title, body, content):'''存入sqlite数据库中的news_content表'''news_content = 'Insert Into news_content(info_ID,title, body,content ) Values (?,?,?,?);'self.cursor.execute(news_content, (info_ID, title, body, content))self.conn.commit()def updated(self):DB_Name = 'datasource.db'conn1 = sqlite3.connect(DB_Name)cursor1 = conn1.cursor()cursor1.execute('Update news_info Set updated = "已更新" Where updated is null and Site = "澎湃新闻"')conn1.commit()cursor1.close()conn1.close()def crawl_content(self):DB_Name = 'datasource.db'self.conn = sqlite3.connect(DB_Name)
#         print('Pp_Spider连接数据库%s成功' % (DB_Name))self.cursor = self.conn.cursor()self.conn.execute('Pragma foreign_keys = ON;')count = 0print('澎湃新闻--内容爬取开始')sql = 'Select url, Info_ID From news_info Where site = "澎湃新闻" and updated is null'url_list = self.cursor.execute(sql).fetchall()for each in url_list:link = each[0]info_ID = each[1]html_content = self.get_html(link)news_title, news_body, news_content = self.get_content(html_content)if news_title:count += 1self.news_content_save(info_ID, news_title,news_body, news_content)print(f'{count}-{news_title}  内容爬取完成!'.ljust(100), end='\r')time.sleep(1)self.cursor.close()self.conn.close()print('\n结束')

创建一个表格

一个简单的表格是这么创建的:

项目 Value
电脑 $1600
手机 $12
导管 $1
查看全文
如若内容造成侵权/违法违规/事实不符,请联系编程学习网邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!

相关文章

  1. 测试面试重点题型

    1.软件测试的目的与原则是什么? 答 目的:通过测试工作可以发现并修复软件当中存在的缺陷, 2可以降低同产品开发遇到的风险, 3.记录软件运行过程中的一些数据,从而为决策者提供技术支持。 原则: 1.2/8定律,核心功能占20%,非核心占80%,我们会集中测试20%的核心功能,发…...

    2024/4/12 0:43:09
  2. 扪心自问!一百多道难搞的面试题,你能答对了多少?

    作者:YHGui来源:https://github.com/YHGui/easy-job/Java 面试中的重要话题除了你看到的惊人的问题数量,我也尽量保证质量。我不止一次分享各个重要主题中的问题,也确保包含所谓的高级话题,这些话题很多程序员不喜欢准备或者直接放弃,因为他们的工作不会涉及到这些。Java…...

    2024/4/24 12:20:22
  3. 前端MS题

    HTML&CSS:浏览器内核 盒模型、flex布局、两/三栏布局、水平/垂直居中; BFC、清除浮动; css3动画、H5新特性。JavaScript:继承、原型链、this指向、设计模式、call, apply, bind,; new实现、防抖节流、let, var, const 区别、暂时性死区、event、loop; promise使用及实…...

    2024/4/9 18:39:36
  4. VS2015安装(windows10+64)

    1.双击点开安装包,然后选中应用程序,右键,选择以管理员身份运行:2.安装程序初始化(需要等待一段时间):3.选择安装位置,可以默认安装在C盘,也可以自己更改安装位置,然后点击下方的安装:4.安装中(需要等待较长一段时间):5.安装已完成,直接点击启动:6.点击以后再说…...

    2024/4/9 18:39:34
  5. AOP进阶实战——双切面实现集中打印Feign日志

    文章目录1、背景2、单切:记录Controller日志2.1、切入点配置2.2、方法执行前2.3、方法执行后2.4、方法执行异常时3、双切:记录Feign日志3.1、切入点配置3.2、在调用FeignClient接口前3.3、在调用LoadBalancerFeignClient中的execute方法前3.4、在FeignClient接口响应完成后3.…...

    2024/4/9 18:39:33
  6. CV项目——遍历文件夹统计各属性图片张数和标签个数

    import ospath = "../data_labels/" # to change txt_files= os.listdir(path) #得到文件夹下的所有文件名称 txt_files = [x for x in txt_files if x.endswith(.txt)] label_image_count_dict = dict() # 每个 label 出现的图片个数 label_count_dict = dict() …...

    2024/4/29 5:46:34
  7. vuex--vuex安装使用state和mutations、vuex中的action、组件之间使用vuex传递数据、store文件拆分----获取加载数据demo

    vuex vuex是vue中的状态管理插件,可以实现全局统一的状态管理。在一个项目中只有一棵状态树,所有的数据都存储在上面 单向数据流 图片十分重要,要理解,可去官网查看详细解释数据是单向流动的,view视图通过dispatch派发一个action(行为),改变state(数据),数据改变之后视图…...

    2024/4/13 9:10:22
  8. 如何写出健壮的代码?

    简介:关于代码的健壮性,其重要性不言而喻。那么如何才能写出健壮的代码?阿里文娱技术专家长统将从防御式编程、如何正确使用异常和 DRY 原则等三个方面,并结合代码实例,分享自己的看法心得,希望对同学们有所启发。你不可能写出完美的软件。因为它不曾出现,也不会出现。每…...

    2024/4/15 13:28:13
  9. C++ 初识关联式容器和set

    C++ 初识关联式容器和set [本篇目录]C++ 初识关联式容器和set1. 关联式容器2.键值对3. 树形结构的关联式容器4.set4.1set的介绍4.2set的使用 1. 关联式容器 引言:在初阶阶段,我们已经接触过STL中的部分容器,比如:vector、list、deque、forward_list(C++11)等,这些容器统称…...

    2024/4/9 19:40:58
  10. SSM的学习(五)---spring的核心Aop与JdbcTemplate

    SSM的学习(五)—spring的核心Aop与JdbcTemplate Aop Aop(Aspect Oriented Programming),面向切面编程,是面向对象思想上的补充。 简单来说:就是在原来代码的基础之上,想要不改变源码,添加新的功能,运用场景非常之多如:打印日志 ,事务,等。 Aop的底层原理 aop基于动态代…...

    2024/4/11 12:47:19
  11. oracle分区、子分区、分区索引、分区索引数据查询sql

    --查询表对应的分区,子分区信息 SELECT * FROM USER_TAB_PARTITIONS t WHERE t.TABLE_NAME = XXX; SELECT * FROM USER_TAB_SUBPARTITIONS T WHERE T.TABLE_NAME = XXX;--查询分区,子分区对应的数据, SELECT * FROM XXX PARTITION(RESULT_PART_201411); SELECT * FROM XXX S…...

    2024/4/9 19:40:55
  12. 为什么redis是单线程的并且那么快

    因为redis是在内存上进行操作的数据库,而cpu处理速度非常的快,读取1mb的数据大概需要250us,多线程是cpu模拟的多线程,从a线程切换到b线程的上下文切换操作大概需要1500ns,假设读取1mb需要切换1000此线程,光是切换线程所用的时间就达到了1500us,还不算读取的时间,所以单…...

    2024/4/21 11:01:00
  13. linux--NFS资源共享实验

    文章目录linux--NFS资源共享一:实验环境二:实验步骤2.1添加一块磁盘用于作为共享目录(服务端)2.2永久挂载(服务端)2.3关闭防火墙2.4**安装NFS工具及服务(服务端)**2.5、修改配置文件(服务端)6、启动服务(服务端)2.7、安装httpd服务并关闭防火墙(客户端)**2.8、远程…...

    2024/4/28 2:24:25
  14. 医疗影像分割论文学习(一)

    医疗影像分割论文学习(一) 1.Recurrent Residual Convolutional Neural Network based on U-Net (R2U-Net) for Medical Image Segmentation论文时间:2018论文数据集 视网膜血管(DRIVE, STARE, and CHASH_DB1) 皮肤癌(Kaggle competition) 肺损伤分割(Lung Nodule Anal…...

    2024/4/9 19:40:52
  15. 【WEB搜索技术】课程学习大纲与学习感悟

    WEB搜索技术课程大纲总结与学习感悟1.导论(1)Web搜索的定义①Web搜索(2)Web搜索的发展背景①搜索引擎(3)Web搜索的挑战性(4)Web搜索的科学价值(5)1.5 Web搜索的研究状况①理论研究②语音搜索方面的研究③图像搜索的理论研究2.搜索引擎基础(1)搜索引擎体系结构(2)信息采集子系统…...

    2024/4/23 23:28:58
  16. 全行业全品类关键词及词性词频 运营完整更新版

    WORD TF IDF ATTR 全行业 14.04 10.88 zn 全品类 12.67 10.53 zn 商业分类 14.07 7.93 b 商品分类 11.25 13.44 b 母婴 14.24 6.18 n 玩具 13.58 8.88 n 乐器 14.40 5.65 n 童装 14.32 5.91 n 内衣 13.25 10.11 n 女装 14.43 5.53 n 男装 14.29 6.00 n 面料 14.39 5.68 n 辅料…...

    2024/4/21 11:49:48
  17. 北京林业大学2020软件工程/计算机技术/电子信息专硕初试经验

    北京林业大学2020软件工程/计算机技术/电子信息专硕初试经验 本人今年报考了北林信息学院的软件工程全日制专硕,初试成绩370+排在初试前十。在学习过程中受到了CSDN上不少前辈师兄写的博客的帮助,本着前人栽树后人乘凉的想法,分享一下我准备初试过程中的一些小经验。 政治 我…...

    2024/4/20 9:27:35
  18. 什么是 DDoS 攻击? 教你如何有效防止DDos攻击

    上周知名博主阮一峰的博客被DDOS攻击,导致网站无法访问而被迫迁移服务器的事情,引起了广大网友的关注及愤慨,包括小编的个人博客也曾接受过DDOS的“洗礼”,对此感同身受。所以,本文我们一起来了解下DDOS攻击并分享一些在一定程度范围内的应对方案。 关于DDOS攻击分布式拒绝…...

    2024/4/27 5:36:25
  19. element-tree 默认展示第一节点的值

    对树的数组获取第一节点的id进行展示 使用这个属性 :default-expanded-keys=“unfoldId” //<el-treeref="treeForm"style="margin-top:30px":data="organTreeData"show-checkboxcheck-strictlynode-key="id":default-expanded-k…...

    2024/4/27 12:52:44
  20. 告别刷抖音!30秒一个Python小例子,总有一款适合你!

    小编每天上班坐地铁,不是刷抖音就是煲电视剧,不是我不想学习,主要是短视频太好看了,30秒一个,刷刷刷的不停啊。如果Python也有30秒学习的小例子,我也一定会看呢。于是小编收录整理了一些30秒一个短小精悍的Python小例子,让你也在碎片时间,刷Python,提高功力。1.ascii展…...

    2024/4/21 23:34:23

最新文章

  1. c4d动画代渲染怎么报价?动画代渲染平台(含云渲染农场)

    在C4D动画代渲染的报价问题时&#xff0c;需要考虑多个因素&#xff0c;如动画复杂度、渲染时长、所需技术以及市场行情等。动画代渲染平台作为专门提供专业渲染服务的机构&#xff0c;其报价通常会根据客户的具体需求和项目特点来定制。下面一起来看看相关内容吧。 一、c4d动画…...

    2024/5/1 13:17:06
  2. 梯度消失和梯度爆炸的一些处理方法

    在这里是记录一下梯度消失或梯度爆炸的一些处理技巧。全当学习总结了如有错误还请留言&#xff0c;在此感激不尽。 权重和梯度的更新公式如下&#xff1a; w w − η ⋅ ∇ w w w - \eta \cdot \nabla w ww−η⋅∇w 个人通俗的理解梯度消失就是网络模型在反向求导的时候出…...

    2024/3/20 10:50:27
  3. SpringBoot入门(Hello World 项目)

    SpringBoot关键结构 1.2.1 Core Container The Core Container consists of the Core, Beans, Context, and Expression Language modules. The Core and Beans modules provide the fundamental parts of the framework, including the IoC and Dependency Injection featur…...

    2024/4/30 9:15:13
  4. GIS与数字孪生共舞,打造未来智慧场景

    作为一名数字孪生资深用户&#xff0c;近日我深刻理解到GIS&#xff08;地理信息系统&#xff09;在构建数字孪生体中的关键作用。 数字孪生技术旨在构建现实世界的虚拟镜像&#xff0c;而GIS则是这一镜像中不可或缺的空间维度框架和导航灯塔。数字孪生的核心是通过数字化方式…...

    2024/4/30 17:27:58
  5. jQuery(一)

    文章目录 1. 基本介绍2.原理示意图3.快速入门1.下载jQuery2.创建文件夹&#xff0c;放入jQuery3.引入jQuery4.代码实例 4.jQuery对象与DOM对象转换1.基本介绍2.dom对象转换JQuery对象3.JQuery对象转换dom对象4.jQuery对象获取数据获取value使用val&#xff08;&#xff09;获取…...

    2024/4/30 3:25:03
  6. 416. 分割等和子集问题(动态规划)

    题目 题解 class Solution:def canPartition(self, nums: List[int]) -> bool:# badcaseif not nums:return True# 不能被2整除if sum(nums) % 2 ! 0:return False# 状态定义&#xff1a;dp[i][j]表示当背包容量为j&#xff0c;用前i个物品是否正好可以将背包填满&#xff…...

    2024/5/1 10:25:26
  7. 【Java】ExcelWriter自适应宽度工具类(支持中文)

    工具类 import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.CellType; import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Sheet;/*** Excel工具类** author xiaoming* date 2023/11/17 10:40*/ public class ExcelUti…...

    2024/4/30 0:57:52
  8. Spring cloud负载均衡@LoadBalanced LoadBalancerClient

    LoadBalance vs Ribbon 由于Spring cloud2020之后移除了Ribbon&#xff0c;直接使用Spring Cloud LoadBalancer作为客户端负载均衡组件&#xff0c;我们讨论Spring负载均衡以Spring Cloud2020之后版本为主&#xff0c;学习Spring Cloud LoadBalance&#xff0c;暂不讨论Ribbon…...

    2024/4/29 18:43:42
  9. TSINGSEE青犀AI智能分析+视频监控工业园区周界安全防范方案

    一、背景需求分析 在工业产业园、化工园或生产制造园区中&#xff0c;周界防范意义重大&#xff0c;对园区的安全起到重要的作用。常规的安防方式是采用人员巡查&#xff0c;人力投入成本大而且效率低。周界一旦被破坏或入侵&#xff0c;会影响园区人员和资产安全&#xff0c;…...

    2024/5/1 4:07:45
  10. VB.net WebBrowser网页元素抓取分析方法

    在用WebBrowser编程实现网页操作自动化时&#xff0c;常要分析网页Html&#xff0c;例如网页在加载数据时&#xff0c;常会显示“系统处理中&#xff0c;请稍候..”&#xff0c;我们需要在数据加载完成后才能继续下一步操作&#xff0c;如何抓取这个信息的网页html元素变化&…...

    2024/4/30 23:32:22
  11. 【Objective-C】Objective-C汇总

    方法定义 参考&#xff1a;https://www.yiibai.com/objective_c/objective_c_functions.html Objective-C编程语言中方法定义的一般形式如下 - (return_type) method_name:( argumentType1 )argumentName1 joiningArgument2:( argumentType2 )argumentName2 ... joiningArgu…...

    2024/4/30 23:16:16
  12. 【洛谷算法题】P5713-洛谷团队系统【入门2分支结构】

    &#x1f468;‍&#x1f4bb;博客主页&#xff1a;花无缺 欢迎 点赞&#x1f44d; 收藏⭐ 留言&#x1f4dd; 加关注✅! 本文由 花无缺 原创 收录于专栏 【洛谷算法题】 文章目录 【洛谷算法题】P5713-洛谷团队系统【入门2分支结构】&#x1f30f;题目描述&#x1f30f;输入格…...

    2024/5/1 6:35:25
  13. 【ES6.0】- 扩展运算符(...)

    【ES6.0】- 扩展运算符... 文章目录 【ES6.0】- 扩展运算符...一、概述二、拷贝数组对象三、合并操作四、参数传递五、数组去重六、字符串转字符数组七、NodeList转数组八、解构变量九、打印日志十、总结 一、概述 **扩展运算符(...)**允许一个表达式在期望多个参数&#xff0…...

    2024/5/1 11:24:00
  14. 摩根看好的前智能硬件头部品牌双11交易数据极度异常!——是模式创新还是饮鸩止渴?

    文 | 螳螂观察 作者 | 李燃 双11狂欢已落下帷幕&#xff0c;各大品牌纷纷晒出优异的成绩单&#xff0c;摩根士丹利投资的智能硬件头部品牌凯迪仕也不例外。然而有爆料称&#xff0c;在自媒体平台发布霸榜各大榜单喜讯的凯迪仕智能锁&#xff0c;多个平台数据都表现出极度异常…...

    2024/5/1 4:35:02
  15. Go语言常用命令详解(二)

    文章目录 前言常用命令go bug示例参数说明 go doc示例参数说明 go env示例 go fix示例 go fmt示例 go generate示例 总结写在最后 前言 接着上一篇继续介绍Go语言的常用命令 常用命令 以下是一些常用的Go命令&#xff0c;这些命令可以帮助您在Go开发中进行编译、测试、运行和…...

    2024/4/30 14:53:47
  16. 用欧拉路径判断图同构推出reverse合法性:1116T4

    http://cplusoj.com/d/senior/p/SS231116D 假设我们要把 a a a 变成 b b b&#xff0c;我们在 a i a_i ai​ 和 a i 1 a_{i1} ai1​ 之间连边&#xff0c; b b b 同理&#xff0c;则 a a a 能变成 b b b 的充要条件是两图 A , B A,B A,B 同构。 必要性显然&#xff0…...

    2024/4/30 22:14:26
  17. 【NGINX--1】基础知识

    1、在 Debian/Ubuntu 上安装 NGINX 在 Debian 或 Ubuntu 机器上安装 NGINX 开源版。 更新已配置源的软件包信息&#xff0c;并安装一些有助于配置官方 NGINX 软件包仓库的软件包&#xff1a; apt-get update apt install -y curl gnupg2 ca-certificates lsb-release debian-…...

    2024/5/1 6:34:45
  18. Hive默认分割符、存储格式与数据压缩

    目录 1、Hive默认分割符2、Hive存储格式3、Hive数据压缩 1、Hive默认分割符 Hive创建表时指定的行受限&#xff08;ROW FORMAT&#xff09;配置标准HQL为&#xff1a; ... ROW FORMAT DELIMITED FIELDS TERMINATED BY \u0001 COLLECTION ITEMS TERMINATED BY , MAP KEYS TERMI…...

    2024/4/30 22:57:18
  19. 【论文阅读】MAG:一种用于航天器遥测数据中有效异常检测的新方法

    文章目录 摘要1 引言2 问题描述3 拟议框架4 所提出方法的细节A.数据预处理B.变量相关分析C.MAG模型D.异常分数 5 实验A.数据集和性能指标B.实验设置与平台C.结果和比较 6 结论 摘要 异常检测是保证航天器稳定性的关键。在航天器运行过程中&#xff0c;传感器和控制器产生大量周…...

    2024/4/30 20:39:53
  20. --max-old-space-size=8192报错

    vue项目运行时&#xff0c;如果经常运行慢&#xff0c;崩溃停止服务&#xff0c;报如下错误 FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory 因为在 Node 中&#xff0c;通过JavaScript使用内存时只能使用部分内存&#xff08;64位系统&…...

    2024/5/1 4:45:02
  21. 基于深度学习的恶意软件检测

    恶意软件是指恶意软件犯罪者用来感染个人计算机或整个组织的网络的软件。 它利用目标系统漏洞&#xff0c;例如可以被劫持的合法软件&#xff08;例如浏览器或 Web 应用程序插件&#xff09;中的错误。 恶意软件渗透可能会造成灾难性的后果&#xff0c;包括数据被盗、勒索或网…...

    2024/5/1 8:32:56
  22. JS原型对象prototype

    让我简单的为大家介绍一下原型对象prototype吧&#xff01; 使用原型实现方法共享 1.构造函数通过原型分配的函数是所有对象所 共享的。 2.JavaScript 规定&#xff0c;每一个构造函数都有一个 prototype 属性&#xff0c;指向另一个对象&#xff0c;所以我们也称为原型对象…...

    2024/4/29 3:42:58
  23. C++中只能有一个实例的单例类

    C中只能有一个实例的单例类 前面讨论的 President 类很不错&#xff0c;但存在一个缺陷&#xff1a;无法禁止通过实例化多个对象来创建多名总统&#xff1a; President One, Two, Three; 由于复制构造函数是私有的&#xff0c;其中每个对象都是不可复制的&#xff0c;但您的目…...

    2024/5/1 11:51:23
  24. python django 小程序图书借阅源码

    开发工具&#xff1a; PyCharm&#xff0c;mysql5.7&#xff0c;微信开发者工具 技术说明&#xff1a; python django html 小程序 功能介绍&#xff1a; 用户端&#xff1a; 登录注册&#xff08;含授权登录&#xff09; 首页显示搜索图书&#xff0c;轮播图&#xff0…...

    2024/5/1 5:23:20
  25. 电子学会C/C++编程等级考试2022年03月(一级)真题解析

    C/C++等级考试(1~8级)全部真题・点这里 第1题:双精度浮点数的输入输出 输入一个双精度浮点数,保留8位小数,输出这个浮点数。 时间限制:1000 内存限制:65536输入 只有一行,一个双精度浮点数。输出 一行,保留8位小数的浮点数。样例输入 3.1415926535798932样例输出 3.1…...

    2024/4/30 20:52:33
  26. 配置失败还原请勿关闭计算机,电脑开机屏幕上面显示,配置失败还原更改 请勿关闭计算机 开不了机 这个问题怎么办...

    解析如下&#xff1a;1、长按电脑电源键直至关机&#xff0c;然后再按一次电源健重启电脑&#xff0c;按F8健进入安全模式2、安全模式下进入Windows系统桌面后&#xff0c;按住“winR”打开运行窗口&#xff0c;输入“services.msc”打开服务设置3、在服务界面&#xff0c;选中…...

    2022/11/19 21:17:18
  27. 错误使用 reshape要执行 RESHAPE,请勿更改元素数目。

    %读入6幅图像&#xff08;每一幅图像的大小是564*564&#xff09; f1 imread(WashingtonDC_Band1_564.tif); subplot(3,2,1),imshow(f1); f2 imread(WashingtonDC_Band2_564.tif); subplot(3,2,2),imshow(f2); f3 imread(WashingtonDC_Band3_564.tif); subplot(3,2,3),imsho…...

    2022/11/19 21:17:16
  28. 配置 已完成 请勿关闭计算机,win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机...

    win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机”问题的解决方法在win7系统关机时如果有升级系统的或者其他需要会直接进入一个 等待界面&#xff0c;在等待界面中我们需要等待操作结束才能关机&#xff0c;虽然这比较麻烦&#xff0c;但是对系统进行配置和升级…...

    2022/11/19 21:17:15
  29. 台式电脑显示配置100%请勿关闭计算机,“准备配置windows 请勿关闭计算机”的解决方法...

    有不少用户在重装Win7系统或更新系统后会遇到“准备配置windows&#xff0c;请勿关闭计算机”的提示&#xff0c;要过很久才能进入系统&#xff0c;有的用户甚至几个小时也无法进入&#xff0c;下面就教大家这个问题的解决方法。第一种方法&#xff1a;我们首先在左下角的“开始…...

    2022/11/19 21:17:14
  30. win7 正在配置 请勿关闭计算机,怎么办Win7开机显示正在配置Windows Update请勿关机...

    置信有很多用户都跟小编一样遇到过这样的问题&#xff0c;电脑时发现开机屏幕显现“正在配置Windows Update&#xff0c;请勿关机”(如下图所示)&#xff0c;而且还需求等大约5分钟才干进入系统。这是怎样回事呢&#xff1f;一切都是正常操作的&#xff0c;为什么开时机呈现“正…...

    2022/11/19 21:17:13
  31. 准备配置windows 请勿关闭计算机 蓝屏,Win7开机总是出现提示“配置Windows请勿关机”...

    Win7系统开机启动时总是出现“配置Windows请勿关机”的提示&#xff0c;没过几秒后电脑自动重启&#xff0c;每次开机都这样无法进入系统&#xff0c;此时碰到这种现象的用户就可以使用以下5种方法解决问题。方法一&#xff1a;开机按下F8&#xff0c;在出现的Windows高级启动选…...

    2022/11/19 21:17:12
  32. 准备windows请勿关闭计算机要多久,windows10系统提示正在准备windows请勿关闭计算机怎么办...

    有不少windows10系统用户反映说碰到这样一个情况&#xff0c;就是电脑提示正在准备windows请勿关闭计算机&#xff0c;碰到这样的问题该怎么解决呢&#xff0c;现在小编就给大家分享一下windows10系统提示正在准备windows请勿关闭计算机的具体第一种方法&#xff1a;1、2、依次…...

    2022/11/19 21:17:11
  33. 配置 已完成 请勿关闭计算机,win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机”的解决方法...

    今天和大家分享一下win7系统重装了Win7旗舰版系统后&#xff0c;每次关机的时候桌面上都会显示一个“配置Windows Update的界面&#xff0c;提示请勿关闭计算机”&#xff0c;每次停留好几分钟才能正常关机&#xff0c;导致什么情况引起的呢&#xff1f;出现配置Windows Update…...

    2022/11/19 21:17:10
  34. 电脑桌面一直是清理请关闭计算机,windows7一直卡在清理 请勿关闭计算机-win7清理请勿关机,win7配置更新35%不动...

    只能是等着&#xff0c;别无他法。说是卡着如果你看硬盘灯应该在读写。如果从 Win 10 无法正常回滚&#xff0c;只能是考虑备份数据后重装系统了。解决来方案一&#xff1a;管理员运行cmd&#xff1a;net stop WuAuServcd %windir%ren SoftwareDistribution SDoldnet start WuA…...

    2022/11/19 21:17:09
  35. 计算机配置更新不起,电脑提示“配置Windows Update请勿关闭计算机”怎么办?

    原标题&#xff1a;电脑提示“配置Windows Update请勿关闭计算机”怎么办&#xff1f;win7系统中在开机与关闭的时候总是显示“配置windows update请勿关闭计算机”相信有不少朋友都曾遇到过一次两次还能忍但经常遇到就叫人感到心烦了遇到这种问题怎么办呢&#xff1f;一般的方…...

    2022/11/19 21:17:08
  36. 计算机正在配置无法关机,关机提示 windows7 正在配置windows 请勿关闭计算机 ,然后等了一晚上也没有关掉。现在电脑无法正常关机...

    关机提示 windows7 正在配置windows 请勿关闭计算机 &#xff0c;然后等了一晚上也没有关掉。现在电脑无法正常关机以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容&#xff0c;让我们赶快一起来看一下吧&#xff01;关机提示 windows7 正在配…...

    2022/11/19 21:17:05
  37. 钉钉提示请勿通过开发者调试模式_钉钉请勿通过开发者调试模式是真的吗好不好用...

    钉钉请勿通过开发者调试模式是真的吗好不好用 更新时间:2020-04-20 22:24:19 浏览次数:729次 区域: 南阳 > 卧龙 列举网提醒您:为保障您的权益,请不要提前支付任何费用! 虚拟位置外设器!!轨迹模拟&虚拟位置外设神器 专业用于:钉钉,外勤365,红圈通,企业微信和…...

    2022/11/19 21:17:05
  38. 配置失败还原请勿关闭计算机怎么办,win7系统出现“配置windows update失败 还原更改 请勿关闭计算机”,长时间没反应,无法进入系统的解决方案...

    前几天班里有位学生电脑(windows 7系统)出问题了&#xff0c;具体表现是开机时一直停留在“配置windows update失败 还原更改 请勿关闭计算机”这个界面&#xff0c;长时间没反应&#xff0c;无法进入系统。这个问题原来帮其他同学也解决过&#xff0c;网上搜了不少资料&#x…...

    2022/11/19 21:17:04
  39. 一个电脑无法关闭计算机你应该怎么办,电脑显示“清理请勿关闭计算机”怎么办?...

    本文为你提供了3个有效解决电脑显示“清理请勿关闭计算机”问题的方法&#xff0c;并在最后教给你1种保护系统安全的好方法&#xff0c;一起来看看&#xff01;电脑出现“清理请勿关闭计算机”在Windows 7(SP1)和Windows Server 2008 R2 SP1中&#xff0c;添加了1个新功能在“磁…...

    2022/11/19 21:17:03
  40. 请勿关闭计算机还原更改要多久,电脑显示:配置windows更新失败,正在还原更改,请勿关闭计算机怎么办...

    许多用户在长期不使用电脑的时候&#xff0c;开启电脑发现电脑显示&#xff1a;配置windows更新失败&#xff0c;正在还原更改&#xff0c;请勿关闭计算机。。.这要怎么办呢&#xff1f;下面小编就带着大家一起看看吧&#xff01;如果能够正常进入系统&#xff0c;建议您暂时移…...

    2022/11/19 21:17:02
  41. 还原更改请勿关闭计算机 要多久,配置windows update失败 还原更改 请勿关闭计算机,电脑开机后一直显示以...

    配置windows update失败 还原更改 请勿关闭计算机&#xff0c;电脑开机后一直显示以以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容&#xff0c;让我们赶快一起来看一下吧&#xff01;配置windows update失败 还原更改 请勿关闭计算机&#x…...

    2022/11/19 21:17:01
  42. 电脑配置中请勿关闭计算机怎么办,准备配置windows请勿关闭计算机一直显示怎么办【图解】...

    不知道大家有没有遇到过这样的一个问题&#xff0c;就是我们的win7系统在关机的时候&#xff0c;总是喜欢显示“准备配置windows&#xff0c;请勿关机”这样的一个页面&#xff0c;没有什么大碍&#xff0c;但是如果一直等着的话就要两个小时甚至更久都关不了机&#xff0c;非常…...

    2022/11/19 21:17:00
  43. 正在准备配置请勿关闭计算机,正在准备配置windows请勿关闭计算机时间长了解决教程...

    当电脑出现正在准备配置windows请勿关闭计算机时&#xff0c;一般是您正对windows进行升级&#xff0c;但是这个要是长时间没有反应&#xff0c;我们不能再傻等下去了。可能是电脑出了别的问题了&#xff0c;来看看教程的说法。正在准备配置windows请勿关闭计算机时间长了方法一…...

    2022/11/19 21:16:59
  44. 配置失败还原请勿关闭计算机,配置Windows Update失败,还原更改请勿关闭计算机...

    我们使用电脑的过程中有时会遇到这种情况&#xff0c;当我们打开电脑之后&#xff0c;发现一直停留在一个界面&#xff1a;“配置Windows Update失败&#xff0c;还原更改请勿关闭计算机”&#xff0c;等了许久还是无法进入系统。如果我们遇到此类问题应该如何解决呢&#xff0…...

    2022/11/19 21:16:58
  45. 如何在iPhone上关闭“请勿打扰”

    Apple’s “Do Not Disturb While Driving” is a potentially lifesaving iPhone feature, but it doesn’t always turn on automatically at the appropriate time. For example, you might be a passenger in a moving car, but your iPhone may think you’re the one dri…...

    2022/11/19 21:16:57