-
Notifications
You must be signed in to change notification settings - Fork 56
yuzeshan edited this page Apr 12, 2015
·
2 revisions
>*注意:用upload上传博客时,为了确保能上传成功,需要有以下两个步骤: >*1、要先写上`title:加上标题名`,这样就可以提取标题名; >*2、然后,在后面加上`3`个`-`,这是为了分开标题与博客内容必须的步骤.
A First Level Header
A Second Level Header
Now is the time for all good men to come to the aid of their country. This is just a regular paragraph.
The quick brown fox jumped over the lazy dog's back. ### Header 3
> This is a blockquote. > > This is the second paragraph in the blockquote. > > ## This is an H2 in a blockquote
- def getPic(html):
"""获取图片""" soup = BeautifulSoup(html) s = soup.find('img') if s:
return s['src']#上面几行代码是为了获取文章内容中嵌入的图片 #下面是文章之后没图片,而随机选择静态文件中的图片 return '/static/img/%s.jpg' % (random.choice(range(1, 10)))
import sys print 'hello world'