先来看个生活中的实际需求:在网上看到美图,想保存下来,你是怎么做的呢?
这还不简单?选中图片-图片另存为-选择文件夹保存不就行了么!
其实大部分人都是这么做的,那有没有更好的办法呢?
| #!/usr/bin/ruby | |
| # encoding: utf-8 | |
| # | |
| # Grab iTunes Icon - Brett Terpstra 2014 <http://brettterpstra.com> | |
| # | |
| # Retrieve an iOS app icon at the highest available resolution | |
| # All arguments are combined to create an iTunes search | |
| # The icon for the first result, if found, is written to a filename based on search terms | |
| # | |
| # example: |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| ''' | |
| File: xiami.py | |
| Author: Luigi Fan | |
| Description: Auto check-in script for xiami. | |
| ''' | |
| import requests | |
| import re |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # 此脚本不再更新, 毕竟要依赖第三方pycurl库. | |
| # 重写的脚本不再依赖非标准库, 感兴趣的见: https://github.com/isayme/v2ex | |
| import sys | |
| import string | |
| try: | |
| import pycurl2 as pycurl |
| function refreshData() | |
| { | |
| x = 5; // 5 Seconds | |
| // Do your thing here | |
| setTimeout(refreshData, x*1000); | |
| } | |