py打包exe

# 运行命令:pyinstaller -F .\pack_exe.py -i  .\day.ico  -F打包所有,-i 设置图标
## pip install pyinstaller
### #豆瓣源:-i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

————————————

#pack_exe.py


import requests
import re

#.表示 任意,+表示一个或多个字符
r = requests.get("https://www.cnblogs.com/yanhuidj/")
res = re.findall(r'class="postTitle2 vertical-middle" href="(.+)"', r.text)
for i in res:
    print("blog:", i)

input ("press anything") #用于启动exe 一闪而过
 
 
——————————————
 

 

 

 

 

posted @ 2024-04-09 17:28  yanhuidj  阅读(1)  评论(0编辑  收藏  举报