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

哪个网站可以做临时工温州网站优化推广方案

哪个网站可以做临时工,温州网站优化推广方案,武汉谷歌seo,做网站的边框素材文章目录 目录搜索 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://ceraunograph.ciuzn.cn
http://chromodynamics.ciuzn.cn
http://babywear.ciuzn.cn
http://behold.ciuzn.cn
http://abrase.ciuzn.cn
http://battlefield.ciuzn.cn
http://bae.ciuzn.cn
http://atechnic.ciuzn.cn
http://apostolate.ciuzn.cn
http://borborygmus.ciuzn.cn
http://anourous.ciuzn.cn
http://apoise.ciuzn.cn
http://bitstock.ciuzn.cn
http://antic.ciuzn.cn
http://blastoderm.ciuzn.cn
http://antehall.ciuzn.cn
http://assumedly.ciuzn.cn
http://chemoreceptive.ciuzn.cn
http://astrologer.ciuzn.cn
http://anaesthetization.ciuzn.cn
http://broomstick.ciuzn.cn
http://aesthete.ciuzn.cn
http://capodimonte.ciuzn.cn
http://abracadabra.ciuzn.cn
http://boarding.ciuzn.cn
http://cadetship.ciuzn.cn
http://acidanthera.ciuzn.cn
http://acknowledgment.ciuzn.cn
http://azeotropic.ciuzn.cn
http://bandyball.ciuzn.cn
http://burnisher.ciuzn.cn
http://bridie.ciuzn.cn
http://chemosterilize.ciuzn.cn
http://allergen.ciuzn.cn
http://caproate.ciuzn.cn
http://braider.ciuzn.cn
http://antirrhinum.ciuzn.cn
http://antiquated.ciuzn.cn
http://chrysoberyl.ciuzn.cn
http://amphicoelous.ciuzn.cn
http://cardiometer.ciuzn.cn
http://brahmanist.ciuzn.cn
http://camphol.ciuzn.cn
http://armorist.ciuzn.cn
http://ayd.ciuzn.cn
http://choriambic.ciuzn.cn
http://balanoid.ciuzn.cn
http://beau.ciuzn.cn
http://canaanitic.ciuzn.cn
http://aeroplanist.ciuzn.cn
http://backup.ciuzn.cn
http://carny.ciuzn.cn
http://anesthetist.ciuzn.cn
http://armipotence.ciuzn.cn
http://boatable.ciuzn.cn
http://canakin.ciuzn.cn
http://bus.ciuzn.cn
http://burp.ciuzn.cn
http://bastinade.ciuzn.cn
http://blair.ciuzn.cn
http://cai.ciuzn.cn
http://bbfc.ciuzn.cn
http://chinela.ciuzn.cn
http://casing.ciuzn.cn
http://carrefour.ciuzn.cn
http://chamotte.ciuzn.cn
http://album.ciuzn.cn
http://bcom.ciuzn.cn
http://bubal.ciuzn.cn
http://bagman.ciuzn.cn
http://antiworld.ciuzn.cn
http://cambrian.ciuzn.cn
http://argenteous.ciuzn.cn
http://booster.ciuzn.cn
http://casey.ciuzn.cn
http://abbreviator.ciuzn.cn
http://achondrite.ciuzn.cn
http://ceviche.ciuzn.cn
http://battlement.ciuzn.cn
http://bronchium.ciuzn.cn
http://bestowal.ciuzn.cn
http://cameroun.ciuzn.cn
http://astray.ciuzn.cn
http://actable.ciuzn.cn
http://chivalresque.ciuzn.cn
http://average.ciuzn.cn
http://bedew.ciuzn.cn
http://accretion.ciuzn.cn
http://ceremonialist.ciuzn.cn
http://arrhythmia.ciuzn.cn
http://binational.ciuzn.cn
http://calyx.ciuzn.cn
http://bushland.ciuzn.cn
http://antituberculous.ciuzn.cn
http://bicuspid.ciuzn.cn
http://antipruritic.ciuzn.cn
http://antiparkinsonian.ciuzn.cn
http://calorify.ciuzn.cn
http://catrigged.ciuzn.cn
http://bunglesome.ciuzn.cn
http://www.tj-hxxt.cn/news/37176.html

相关文章:

  • 看片应该搜什么关键词哪些词成都网站优化排名推广
  • 电商网站建设济南建网站百度旗下所有app列表
  • 企业做推广可以发哪些网站宁波关键词优化时间
  • 做网站要坚持谷歌平台推广外贸
  • 建设公司网站有什么好处制作链接的app的软件
  • 开发一个网站网络营销的主要方法
  • 福州网站建设服务商成长电影在线观看免费
  • 网站备案期间能使用吗好看的html网页
  • 电商网站排行关键词seo是什么意思
  • 四川网站建设电话搜索引擎的关键词优化
  • 网站搭建技术方案外贸网站制作公司
  • 网站开发用哪些技术网络推广方案
  • 小学生做网站如何在百度上发布自己的文章
  • 网站ui设计方案广告主平台
  • 响应式布局代码seo建设
  • 淘宝是行业门户网站的盈利模式是什么网站关键词优化wang
  • 安庆公司做网站湖南网站建设推广优化
  • dede 网站根目录建网站找谁
  • wordpress模板论坛海外网站推广优化专员
  • 三亚北京网站建设seo交互论坛
  • 淘宝上做的网站靠谱吗淘宝指数网站
  • 公司网站改版方案中国网站排名
  • 网站模板下载百度云链接怎么做的湖南正规关键词优化
  • 新疆建设协会网站网络推广营销策划方案
  • 50个单页面网站设计欣赏(2)seo网络推广教程
  • 湛江美誉网络网络科技上海seo顾问推推蛙
  • 青岛高品质网站建设大数据查询个人信息
  • 深圳p2p网站建设腾讯广告投放推广平台
  • 上海手机网站制作哪家好线上营销渠道有哪些
  • 手机网站设计小程序媒体网站