OMG that's another blog!

1.Beginning
we'v learnt how to ask file from our own computer and tried to built a new wordcloud.
#1.读取文件内容
import jieba
import wordcloud
from imageio import imread
with open(r'C:\Users\Jinyy\Desktop\新建文件夹\第十二期上课笔记\day5\1.txt','r',encoding='utf8')as f:
data=f.read()
#2.使用结巴模块对文件内容切割
jieba.add_word('诺森德的守望')#让回家的诱惑成为单词
# jieba.del_word('先生')#删除
data_list=jieba.lcut(data)
data=''.join(data_list)
print(data)
#3.找到这招图片
img=imread(r'C:\Users\Jinyy\Desktop\新建文件夹\第十二期上课笔记\day4\fill.png')
#3.使用词云模块生成词云
w=wordcloud.WordCloud(font_path='C:\Windows\Fonts\simsun.ttc',background_color='white',mask=img)
w.generate(data)
w.to_file('诺森德的守望.png')
2.then
Nick was gone and Mr.tank are cuming(coming) to show us how to use network crawler to steal files from internet,that was really a cool trick now I can download porn video for freeeeeeeee!
'''
requests请求库
pip3 install requests
'''
import requests
# 1.发送请求
#get 发送请求
response=requests.get(
url='http://pic16_2.qiyeku.com/qiyeku_pic/2016/6/27/zsliying/product/product_pic/image/2016_07_11/20160711085044523.jpg'
)
#接受二进制流
# print(response.content)
#保存数据
with open('porn1.jpg','wb')as f:
f.write(response.content)
print('图片下载成功!')
response2=requests.get(
url='https://media.st.dl.bscstorage.net/steam/apps/256738414/movie_max.webm'
)
# print(response2.content)
#把二进制报仇呢本地
#凡是二进制流数据,不需要指定字符编码
with open('1.webm','wb')as f2:
f2.write(response2.content)
print('视频下载成功')
import requests
import re
#fasongqingqiu
response=requests.get(
url='http://www.xbiquge.la/15/15428/'
)
response.encoding = 'utf-8'
print(response.text)
'''
1电影名称
2电影详情页连接
3评分
4评价人数
'''
#解析并提取数据
#查找所有
# re.S:全局查找
# re.findall('正则匹配规则','解析文本',re.S)
#.*?是贪婪匹配
moviename=re.findall('.*?<div id="list">(.*?)</div>','response.text',re.S)
print(moviename)
the top was stealing picture and video ,the button was stealing text file
this won't be the last time we met/
OMG that's another blog!的更多相关文章
- http://blog.csdn.net/zgl07/article/details/43491399
转载申明:本文转载自http://www.brendangregg.com/perf.html 请大家看了之后如果要转载一定要注上这个地址!!! ========================= ...
- 日向blog开发记录
一点历史关于,Sonne Blog 2016.03.25springmvc + hibernate框架搭建.2016.04.21日向blog首页.2016.04.24分页实现.2016.04.30登录 ...
- blog (后续更新)
设计Model(设计数据库) from django.db import models # Create your models here. class BlogsPost(models.Model) ...
- tensorflow 一些好的blog链接和tensorflow gpu版本安装
pading :SAME,VALID 区别 http://blog.csdn.net/mao_xiao_feng/article/details/53444333 tensorflow实现的各种算法 ...
- http://blog.csdn.net/java2000_wl/article/details/8627874
http://blog.csdn.net/java2000_wl/article/details/8627874
- [Android Pro] http://blog.csdn.net/wuyinlei/article/category/5773375
http://blog.csdn.net/wuyinlei/article/category/5773375
- android 蓝牙 http://blog.csdn.net/u012843100/article/details/52384219
http://blog.csdn.net/u012843100/article/details/52384219
- 【三】用Markdown写blog的常用操作
本系列有五篇:分别是 [一]Ubuntu14.04+Jekyll+Github Pages搭建静态博客:主要是安装方面 [二]jekyll 的使用 :主要是jekyll的配置 [三]Markdown+ ...
- django开发个人简易Blog—nginx+uwsgin+django1.6+mysql 部署到CentOS6.5
前面说完了此项目的创建及数据模型设计的过程.如果未看过,可以到这里查看,并且项目源码已经放大到github上,可以去这里下载. 代码也已经部署到sina sea上,地址为http://fengzhen ...
随机推荐
- 力扣算法题—148sort-list
Sort a linked list in O(n log n) time using constant space complexity. Example 1: Input: 4->2-> ...
- Apache 2.4.12 64位+Tomcat-8.0.32-windows-x64负载集群方案
上次搞了Apache 2.2的集群方案,但是现在自己的机器和客户的服务器一般都是64位的,而且tomcat已经到8了.重新做Apache 2.4.12 64位+Tomcat-8.0.32-window ...
- TP5截取部分字符串
TP5截取超出的字符串,使用...显示 在公共文件common.php中 视图模板中调用
- 【牛客网-剑指offer】变态跳台阶
题目: 一只青蛙一次可以跳上1级台阶,也可以跳上2级--它也可以跳上n级.求该青蛙跳上一个n级的台阶总共有多少种跳法. 考点: 递归和循环 分析: 台阶数 跳法 1 1 2 2 3 4 4 8 5 1 ...
- Vue之自建管理后台(一)准备工作
完成最基础的Vue环境及新建一个vue项目. 一般来说,我们拿到一个项目需求或者得到一个需求的时候,第一件应该做的事情不是立马坐在电脑前面去写代码,如果你这么做的,好吧...我只能暂时认定你为一个刚上 ...
- flex布局(弹性布局)
1. 传统布局与 flex 布局比较 传统布局 兼容性好 布局繁琐 局限性,不能在移动端很好的布局 flex 弹性布局 操作方便,布局极为简单,移动端应用很广泛 PC端浏览器支持较差 IE 11 或 ...
- CXF异常:No operation was found with the name
https://blog.csdn.net/qq_18675693/article/details/52134805 不同包下面,别忘了namespace最后要加“/”
- Vulhub-漏洞环境的搭建
安装Docker #安装pip curl -s https://bootstrap.pypa.io/get-pip.py | python3 #安装最新版docker curl -s https:// ...
- 【leetcode】133. Clone Graph
题目如下: Given the head of a graph, return a deep copy (clone) of the graph. Each node in the graph con ...
- webapp兼容问题解决
1. IOS移动端click事件300ms的延迟响应 移动设备上的web网页是有300ms延迟的,玩玩会造成按钮点击延迟甚至是点击失效.这是由于区分单击事件和双击屏幕缩放的历史原因造成的, 2007年 ...