This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
python3批量删除豆瓣分组下的好友 | |
2016年6月7日 03:43:42 codegay | |
我两年前一时冲动在豆瓣关注了很多豆瓣的员工,好多,有四百个。 | |
我现在一时冲动想取消关注...,写这么一个脚本可以用来加快删除的速度。 | |
cookies还是直接从chrome读取出来, | |
参考我之前刚写的代码 python3从chrome浏览器读取cookie, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
::=================这是注释 | |
::批处理与python程序的混合编程.bat | |
::2016年5月18日 14:26:03 codegay | |
::下面写批处理代码 | |
@echo off&cls | |
echo batch echo | |
python.exe %0&pause | |
::=================这是注释 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
python3使用requests登录人人影视网站.py | |
2016年5月11日 07:33:59 codegay | |
参考资料requests文档: | |
http://cn.python-requests.org/zh_CN/latest/ | |
四种常见的 POST 提交数据方式 | |
https://imququ.com/post/four-ways-to-post-data-in-http.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
python3使用requests删除闪存.py | |
2016年5月9日 22:27:30 codegay | |
闪存ing.cnblogs.com是一个类似饭否的功能 | |
本程序功能是删除非幸运闪的闪存 | |
参考资料requests文档: | |
http://cn.python-requests.org/zh_CN/latest/ | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
python3使用requests发闪存.py | |
2016年5月9日 12:50:40 codegay | |
参考资料requests文档: | |
http://cn.python-requests.org/zh_CN/latest/ | |
""" | |
import requests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
python抓取性感尤物美女图.py | |
2016年5月4日 00:51:00 codegay | |
参考资料: Python3学习笔记(urllib模块的使用) | |
http://www.cnblogs.com/Lands-ljk/p/5447127.html | |
以下例子是python2的代码,并且用到lxml,requests 库 | |
我用python3标准库和正则写一个下载全站美女图的程序 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
python采集55188.com论坛URL.py | |
http://bbs.bathome.net/thread-40289-1-1.html | |
2016年5月2日 17:28:47 codegay | |
参考资料: Python3学习笔记(urllib模块的使用) | |
http://www.cnblogs.com/Lands-ljk/p/5447127.html | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
python文本内容居中显示.py | |
http://bbs.bathome.net/thread-1289-1-1.html | |
2016年5月2日 04:51:33 codegay | |
""" | |
with open("a.txt") as f: | |
txt=[r.strip() for r in f] | |
w=max([len(r) for r in txt])+10 | |
[print(r.center(w)) for r in txt] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
python统计文本字符数量.py | |
2016年5月2日 04:21:44 codegay | |
http://bbs.bathome.net/thread-40285-1-1.html | |
""" | |
import sys | |
import os | |
if sys.argv.__len__()<2: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
python3找出字符数最多的行 | |
http://bbs.bathome.net/thread-1249-1-1.html | |
2016年5月2日 03:56:13 codegay | |
""" | |
with open("a.txt") as f: | |
kv={''.join(r.split()).__len__():r for r in f} | |
print(kv[max(kv)]) | |