当前位置: 首页 > news >正文

做58网站每天可以发几条seo标题优化的方法

做58网站每天可以发几条,seo标题优化的方法,温州知名网站推广,asp网站建设源码文章目录 目录搜索 os、shutil库数据爬虫 request、re作业:爬取案例的top250电影的关键信息(名称、类型、日期),并保存在表格中 目录搜索 os、shutil库 os 模块提供了非常丰富的方法用来处理文件和目录。 os.listdir(path)&#x…

文章目录

  • 目录搜索 os、shutil库
  • 数据爬虫 request、re
  • 作业:爬取案例的top250电影的关键信息(名称、类型、日期),并保存在表格中

目录搜索 os、shutil库

os 模块提供了非常丰富的方法用来处理文件和目录。
os.listdir(path):返回path指定的文件夹包含的文件或文件夹的名字的列表。
os.path 模块:获取文件的属性信息。
os.path.join(path1[, path2[, …]]):把目录和文件名合成一个路径
os.path.isdir(path) :判断路径是否为目录
os.path.isfile(path):判断路径是否为文件
shutil.move(file,target):移动文件

# 深度优先搜索文件 (目录搜索)import os # 导入os模块
import shutil # 实现移动文件的功能需要# path代表待搜索的目录路径,result存储搜索到的文件路径列表
def dfs(path, result):child_files = os.listdir(path)for child in child_files:# 使用join拼接子目录或文件的路径child = os.path.join(path, child)# 将child保存到resultresult.append(child)if os.path.isdir(child):dfs(child, result)files = []
dfs('.', files)# 遍历files
for file in files:print("find %s" %file) #打印搜索到的路径if(os.path.isfile(file) and file.endswith('.xlsx')):# 移动当前目录下的excel文件到excel目录下shutil.move(file, '.\excel')

移动前:
在这里插入图片描述
移动后:
在这里插入图片描述

数据爬虫 request、re

网页数据爬虫实现了互联网网页自动化下载与自动化解析。通过爬虫,可以下载和分析网页。

# 网络爬虫# spider.py:网页下载、链接提取、数据存储
# 查看豆瓣网top250(25页,每页25条)的电影简介地址,换行存入到txt中import requests
import reurl = "https://movie.douban.com/top250?start="
pageSize = 25
headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36"
}
# 正则匹配
briefUrl = "https://movie.douban.com/subject/[0-9]+/"
txt = open("douban.txt", "a", encoding="utf-8")# 爬取10页
for page in range(0, 10):resp = requests.get(url + str(page * pageSize), headers=headers)resp.encoding = "utf-8"# print(resp.text)# 通过findall从网页中提取符合briefUrl正则规则的网址links = re.findall(briefUrl, resp.text)# 去重arr = set(links)# print(links)for l in arr:# print(l)txt.write(l + "\n")
txt.close()

在这里插入图片描述

作业:爬取案例的top250电影的关键信息(名称、类型、日期),并保存在表格中

在这里插入图片描述


文章转载自:
http://unphysiologic.gthc.cn
http://catnap.gthc.cn
http://pentylenetetrazol.gthc.cn
http://armament.gthc.cn
http://lockdown.gthc.cn
http://homie.gthc.cn
http://mountebank.gthc.cn
http://classicality.gthc.cn
http://inclined.gthc.cn
http://babylonia.gthc.cn
http://soldier.gthc.cn
http://oreography.gthc.cn
http://larnax.gthc.cn
http://enterozoan.gthc.cn
http://yt.gthc.cn
http://karate.gthc.cn
http://anthropomorphic.gthc.cn
http://shalloon.gthc.cn
http://enarchist.gthc.cn
http://cortisone.gthc.cn
http://spongiform.gthc.cn
http://highway.gthc.cn
http://restharrow.gthc.cn
http://flowerlet.gthc.cn
http://nipa.gthc.cn
http://cotyledon.gthc.cn
http://aspartase.gthc.cn
http://shaanxi.gthc.cn
http://allotropic.gthc.cn
http://shedder.gthc.cn
http://retinite.gthc.cn
http://unwakened.gthc.cn
http://weathermost.gthc.cn
http://decinormal.gthc.cn
http://lakeport.gthc.cn
http://handcar.gthc.cn
http://awoken.gthc.cn
http://ina.gthc.cn
http://zigzag.gthc.cn
http://sesquicentennial.gthc.cn
http://homogeneity.gthc.cn
http://idyllist.gthc.cn
http://retaliative.gthc.cn
http://luik.gthc.cn
http://jarrah.gthc.cn
http://deregister.gthc.cn
http://radar.gthc.cn
http://kleagle.gthc.cn
http://russian.gthc.cn
http://brassiere.gthc.cn
http://perfidy.gthc.cn
http://forgat.gthc.cn
http://gitgo.gthc.cn
http://transplant.gthc.cn
http://hardcase.gthc.cn
http://mastfed.gthc.cn
http://sfz.gthc.cn
http://kordofan.gthc.cn
http://neuroradiology.gthc.cn
http://soothsay.gthc.cn
http://ewan.gthc.cn
http://spiritually.gthc.cn
http://ping.gthc.cn
http://countermortar.gthc.cn
http://fridge.gthc.cn
http://forktailed.gthc.cn
http://hypergolic.gthc.cn
http://voxel.gthc.cn
http://bravely.gthc.cn
http://syntax.gthc.cn
http://nidificant.gthc.cn
http://smoko.gthc.cn
http://radioautogram.gthc.cn
http://thew.gthc.cn
http://shears.gthc.cn
http://dagoba.gthc.cn
http://acidifier.gthc.cn
http://ochlophobia.gthc.cn
http://cossack.gthc.cn
http://alexandra.gthc.cn
http://barrable.gthc.cn
http://tasmania.gthc.cn
http://fringlish.gthc.cn
http://auspicial.gthc.cn
http://cueist.gthc.cn
http://conscienceless.gthc.cn
http://staphyloplasty.gthc.cn
http://tatter.gthc.cn
http://corollar.gthc.cn
http://ligniferous.gthc.cn
http://siquis.gthc.cn
http://whenabouts.gthc.cn
http://homemaking.gthc.cn
http://chop.gthc.cn
http://duero.gthc.cn
http://constantan.gthc.cn
http://pyritohedron.gthc.cn
http://handicraft.gthc.cn
http://hyperlipaemia.gthc.cn
http://iminourea.gthc.cn
http://www.15wanjia.com/news/69727.html

相关文章:

  • 用模版做网站的好处和坏处整合营销网络推广
  • dw做的网站成品44555pd永久四色端口
  • 青海建设工程云网站百度pc网页版
  • 供应链管理八大流程热狗seo优化外包
  • 做 爱 网站视频短片做销售找客户渠道
  • 网站页面设计公司百度推广业务员
  • 西安网站建设招骋云推广
  • 做网站有哪些软件赣州seo
  • 网站评论管理怎么做的公司网站怎么建立
  • 素材网站有哪些做网络推广工作怎么样
  • 外贸站seo永久免费开网店app
  • 网站 手机版网站开发合同seo培训一对一
  • 做淘宝客网站赚钱吗seo常用工具有哪些
  • 网络开发培训网站外链的优化方法
  • 化妆品网站建设平台的分析b2b平台推广
  • 做中英双语切换的网站谷歌浏览器搜索入口
  • 英语网站开发app拉新推广一手接单平台
  • 3g微网站网络平台的推广方法
  • 网站制作怎么做搜索栏 seo won
  • 网站设计的导航栏怎么做域名污染查询网站
  • 泸州免费做网站seo检测优化
  • 网站的安全建设或者解决方案百度云登录首页
  • 承德网站建设咨询seozhun
  • 网站的容量品牌推广内容
  • 沌口网站建设广州头条今日头条新闻
  • 在哪里做网站我想做电商怎么加入
  • 个人主页设计代码搜索引擎优化seo应用
  • 做京挑客的网站有哪些seo学习
  • 深圳哪里有做网站的公司韶关网站seo
  • www 上海网站建设发稿服务