当前位置: 编程技术>python
python获取豆瓣电影简介代码分享
来源: 互联网 发布时间:2014-09-04
本文导语: 代码如下:#!/usr/bin/env python#coding:utf-8import re,sysimport urllibfrom bs4 import BeautifulSoupglobal r_url def hq_url(): so_url = "http://movie.douban.com/subject_search?search_text=" data = urllib.urlopen(so_url+gjz).read() r = re.findall(r'
代码如下:
#!/usr/bin/env python
#coding:utf-8
import re,sys
import urllib
from bs4 import BeautifulSoup
global r_url
def hq_url():
so_url = "http://movie.douban.com/subject_search?search_text="
data = urllib.urlopen(so_url+gjz).read()
r = re.findall(r'