- 安装vim和vimwiki插件。
- 首先安装vim。
- 安装vimwiki插件。修改vimrc配置文件。
{{{ set nocompatible filetype plugin on
syntax on }}}
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
# -*- coding: utf-8 -*- | |
import re #正则表达式库 | |
import urllib.request | |
import urllib | |
import os | |
import pdb | |
def getHtml(url): | |
#req = urllib.request.Request(url) | |
page = urllib.request.urlopen(url) | |
html = page.read() |
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
# -*- coding utf-8 -*- | |
# 获取天气预报信息 | |
import urllib.request as request | |
import re | |
import pdb | |
def gethtml(url): | |
html = request.urlopen(url).read().decode() | |
return html | |
def getweather(html): | |
try: |