- 博客(12)
- 收藏
- 关注
原创 日常代码分享
网址='http://roll.news.sina.com.cn/news/gnxw/gdxw1/index_{页名}.shtml。分辨率=('标题'+new_dict[标题]+'\r\n'+"时间"+new_dict[时间]+'\r\n'+'作者'+new_dict[作者]+'\r\n'+"来源"+new_dict[来源]+'\r\n'+打印("本页共有{0}条新闻连接{1}".格式(伦(url_list),url_list))打印("--------抓取并保存结束----------")
2023-05-05 00:11:55 49
原创 日常代码分享
通过循环调用getInfo() 获取多页数据。#用于存储所有的信息,书籍以字典的形式保存。#将列表book_list中的数据存入文件。#将字典存入book_list。#(2)调用getInfo()#提取待定信息,并封装成字典。
2023-05-01 19:36:11 70
原创 日常代码分享
print("维度词汇是:",docwords)docs=["新型互联网大数据技术研究""计算机系统的分析与设计技术""大数据采集技术与应用方法""一种互联网技术研究方法"
2023-05-01 19:36:09 128
原创 python代码分享
print("书名:",name,"评分次数:",cishu,"作者名:",zuozhe,"出版日期:",chubanriqi,"出版社:",chubanshe,"价格:",jiage)
2023-05-01 19:34:56 48
原创 日常代码分享
res += (str(i+1)+'.'+'书名:'+books_dict['title'][i]+'\r\n'+#'评论数量:'+books_dict['comment'][i]+'\r\n'+'出版日期:'+books_dict['data'][i]+'\r\n'+'价格:'+books_dict['price'][i]+'\r\n'+print('------出版社:%s抓取完毕------'%press_name)print('-----开始抓取%s-----'%press_name)
2023-04-29 15:26:55 46
原创 日常代码分享
res=('标题'+new_dict['title']+'\r\n'+"时间"+new_dict['time']+'\r\n'+'作者'+new_dict['author']+'\r\n'+"来源"+new_dict['source']+'\r\n'+print("本页共有{0}条新闻连接{1}".format(len(url_list),url_list))print("--------抓取并保存结束----------")print("-------连接获取结束--------")
2023-04-29 15:24:28 103
原创 Python日常代码
res=('标题'+new_dict['title']+'\r\n'+"时间"+new_dict['time']+'\r\n'+'作者'+new_dict['author']+'\r\n'+"来源"+new_dict['source']+'\r\n'+print("本页共有{0}条新闻连接{1}".format(len(url_list),url_list))print("--------抓取并保存结束----------")print("-------连接获取结束--------")
2023-04-27 18:01:47 32 1
原创 python日常代码
nt=datetime.strptime(soup.select('span.date')[0].text.strip(),'%Y年%m月%d日 %H:%M')'新闻正文:' + news_dict['article'] + '\r\n')res=('标题:' + news_dict['title'] + '\r\n' +print('------目录爬取完毕-------')print('------链接获取结束------')print('------抓取结束------')print('保存出错')
2023-04-27 10:08:29 39 1
原创 日常代码分享
res=('标题'+new_dict['title']+'\r\n'+"时间"+new_dict['time']+'\r\n'+'作者'+new_dict['author']+'\r\n'+"来源"+new_dict['source']+'\r\n'+print("本页共有{0}条新闻连接{1}".format(len(url_list),url_list))print("--------抓取并保存结束----------")print("-------连接获取结束--------")
2023-04-27 10:05:14 58 1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人