Requests+正则表达式爬取猫眼电影

目标

提取出猫眼电影TOP100的电影名称、时间、评分、图片等信息,提取站点的URL为http://maoyan.com/board/4,提取的结果以文本的形式保存下来。

准备工作

请安装好requests库

pip install requests

 requests库的基本用法可参数这篇文章:http://www.cnblogs.com/0bug/p/8899841.html

抓取分析

我们需要抓取的目标站点为http://maoyan.com/board/4 打开之后便可以看到榜单信息,如图所示。

排名第一的电影是霸王别姬,页面中显示的有效信息有影片名称、主演、上映时间、上映地区、评分、图片等信息。

将页面滚动到最下方,可以发现有分页的列表,直接点击第二页,观察页面的URL内容发生了怎样的变化,如图所示。

可以发现页面的URL变成http://maoyan.com/board/4?offset=10,比之前的URL多了一个参数,那就是offset=10,而且目前的排行结果是排行11~20名的电影,初步推断这是一个偏移量的参数,再点击下一页,发现页面的URL变成了http://maoyan.com/board/4?offset=20,参数offset变成了20,而且显示的结果是排行21~30的电影。

由此可以总结出规律,offset代表偏移量,如果偏移量为n,则显示电影序号就是n+1到n+10,每页显示10个,所以,如果想获取TOP100电影,只需要分开请求10次,而10次的offset参数分别设置为0、10、20......90即可,这样获取不同的页面之后,再用正则表达式提取出相关信息,就可以得到TOP100的所有电影信息了。

流程框架:

获取首页

import requests


def get_one_page(url):
    headers = {
        'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.117 Safari/537.36'
    }
    response = requests.get(url, headers=headers)
    if response.status_code == 200:
        return response.text
    return None


def main():
    url = 'http://maoyan.com/board/4'
    html = get_one_page(url)
    print(html)


main()

正则提取

回到页面,在开发者模式下的Network监听组建中查看源代码。

注意,这里不用在Elements选项卡中直接查看源代码,因为那里的源码可能经过JavaScript操作而与原始请求不同。

其中看到一个条木的源码如下:

可以看到,一部电影信息对应的源码是一个dd节点,我们用正则表达式提取出这里面的一些电影信息。

1.排名

排名信息在class为board-index的i节点内,这里利用非贪婪匹配来提取i节点内的信息,正则表达式写为:

<dd>.*?board-index.*?>(.*?)</i>

2.电影的图片

接下来,可以看到a节点内部有两个img节点,经过检查后发现,第二个img节点的data-src属性是图片链接,正则表达式改写为:

<dd>.*?board-index.*?>(.*?)</i>.*?data-src="(.*?)"

3.电影名称

再往后,提取电影名,它后面的p节点内,class为name,所以可以用name来做一个标志位,然后进一步提取到期内a节点的正文内容:

<dd>.*?board-index.*?>(.*?)</i>.*?data-src="(.*?)".*?name.*?a.*?>(.*?)</a>

4.再提取主演、时间、评分等内容,都是同样的原理,最后正则表达式写为:

<dd>.*?board-index.*?>(.*?)</i>.*?data-src="(.*?)".*?name.*?a.*?>(.*?)</a>.*?star.*?>(.*?)</p>.*?releasetime.*?>(.*?)</p>.*?integer.*?>(.*?)</i>.*?fraction.*?>(.*?)</i>.*?</dd>

这样一个正则表达式可以匹配一个电影的结果,里面匹配了7个嘻嘻你,接下来调用findall()方法提取所有的内容

 1 # -*- coding:utf-8 -*-
 2 import requests
 3 import re
 4 
 5 
 6 def get_one_page(url):
 7     headers = {
 8         'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.117 Safari/537.36'
 9     }
10     response = requests.get(url, headers=headers)
11     if response.status_code == 200:
12         return response.text
13     return None
14 
15 
16 def parse_one_page(html):
17     pattern = re.compile(
18         '<dd>.*?board-index.*?>(.*?)</i>.*?data-src="(.*?)".*?name.*?a.*?>(.*?)</a>.*?star.*?>(.*?)</p>.*?releasetime.*?>(.*?)</p>.*?integer.*?>(.*?)</i>.*?fraction.*?>(.*?)</i>.*?</dd>',
19         re.S)
20     item = re.findall(pattern, html)
21     print(item)
22 
23 
24 def main():
25     url = 'http://maoyan.com/board/4'
26     html = get_one_page(url)
27     parse_one_page(html)
28 
29 
30 main()
parse_one_page

这样就可以成功地将一页的10个电影信息提取出来,这是一个列表形式,输出结果如下:

[('1', 'http://p1.meituan.net/movie/20803f59291c47e1e116c11963ce019e68711.jpg@160w_220h_1e_1c', '霸王别姬', '\n                主演:张国荣,张丰毅,巩俐\n        ', '上映时间:1993-01-01(中国香港)', '9.', '6'), ('2', 'http://p0.meituan.net/movie/__40191813__4767047.jpg@160w_220h_1e_1c', '肖申克的救赎', '\n                主演:蒂姆·罗宾斯,摩根·弗里曼,鲍勃·冈顿\n        ', '上映时间:1994-10-14(美国)', '9.', '5'), ('3', 'http://p0.meituan.net/movie/23/6009725.jpg@160w_220h_1e_1c', '罗马假日', '\n                主演:格利高利·派克,奥黛丽·赫本,埃迪·艾伯特\n        ', '上映时间:1953-09-02(美国)', '9.', '1'), ('4', 'http://p0.meituan.net/movie/fc9d78dd2ce84d20e53b6d1ae2eea4fb1515304.jpg@160w_220h_1e_1c', '这个杀手不太冷', '\n                主演:让·雷诺,加里·奥德曼,娜塔莉·波特曼\n        ', '上映时间:1994-09-14(法国)', '9.', '5'), ('5', 'http://p0.meituan.net/movie/92/8212889.jpg@160w_220h_1e_1c', '教父', '\n                主演:马龙·白兰度,阿尔·帕西诺,詹姆斯·凯恩\n        ', '上映时间:1972-03-24(美国)', '9.', '3'), ('6', 'http://p0.meituan.net/movie/11/324629.jpg@160w_220h_1e_1c', '泰坦尼克号', '\n                主演:莱昂纳多·迪卡普里奥,凯特·温丝莱特,比利·赞恩\n        ', '上映时间:1998-04-03', '9.', '5'), ('7', 'http://p0.meituan.net/movie/c8f224ca9939cd9dd58f709c9c4deb0924422.jpg@160w_220h_1e_1c', '龙猫', '\n                主演:日高法子,坂本千夏,糸井重里\n        ', '上映时间:1988-04-16(日本)', '9.', '2'), ('8', 'http://p0.meituan.net/movie/62/109878.jpg@160w_220h_1e_1c', '唐伯虎点秋香', '\n                主演:周星驰,巩俐,郑佩佩\n        ', '上映时间:1993-07-01(中国香港)', '9.', '2'), ('9', 'http://p1.meituan.net/movie/94c3a84626fd7650d6891088c4b88e5c27012.jpg@160w_220h_1e_1c', '魂断蓝桥', '\n                主演:费雯·丽,罗伯特·泰勒,露塞尔·沃特森\n        ', '上映时间:1940-05-17(美国)', '9.', '2'), ('10', 'http://p0.meituan.net/movie/9bf7d7b81001a9cf8adbac5a7cf7d766132425.jpg@160w_220h_1e_1c', '千与千寻', '\n                主演:柊瑠美,入野自由,夏木真理\n        ', '上映时间:2001-07-20(日本)', '9.', '3')]
输出结果

但是这样还不够,数据比较杂乱,我们再将匹配结果处理一下,遍历提取结果并生成字典,此时方法改写如下:

# -*- coding:utf-8 -*-
import requests
import re


def get_one_page(url):
    headers = {
        'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.117 Safari/537.36'
    }
    response = requests.get(url, headers=headers)
    if response.status_code == 200:
        return response.text
    return None


def parse_one_page(html):
    pattern = re.compile(
        '<dd>.*?board-index.*?>(.*?)</i>.*?data-src="(.*?)".*?name.*?a.*?>(.*?)</a>.*?star.*?>(.*?)</p>.*?releasetime.*?>(.*?)</p>.*?integer.*?>(.*?)</i>.*?fraction.*?>(.*?)</i>.*?</dd>',
        re.S)
    items = re.findall(pattern, html)
    for item in items:
        yield {
            'index': item[0],
            'image': item[1],
            'title': item[2].strip(),
            'actor': item[3].strip()[3:] if len(item[3]) > 3 else '',
            'time': item[4].strip()[5:] if len(item[4]) > 5 else '',
            'score': item[5].strip() + item[6].strip()
        }


def main():
    url = 'http://maoyan.com/board/4'
    html = get_one_page(url)
    li = parse_one_page(html)
    for i in li:
        print(i)


main()
parse_one_page

输出结果为字典的结构化数据:

{'index': '1', 'image': 'http://p1.meituan.net/movie/20803f59291c47e1e116c11963ce019e68711.jpg@160w_220h_1e_1c', 'title': '霸王别姬', 'actor': '张国荣,张丰毅,巩俐', 'time': '1993-01-01(中国香港)', 'score': '9.6'}
{'index': '2', 'image': 'http://p0.meituan.net/movie/__40191813__4767047.jpg@160w_220h_1e_1c', 'title': '肖申克的救赎', 'actor': '蒂姆·罗宾斯,摩根·弗里曼,鲍勃·冈顿', 'time': '1994-10-14(美国)', 'score': '9.5'}
{'index': '3', 'image': 'http://p0.meituan.net/movie/23/6009725.jpg@160w_220h_1e_1c', 'title': '罗马假日', 'actor': '格利高利·派克,奥黛丽·赫本,埃迪·艾伯特', 'time': '1953-09-02(美国)', 'score': '9.1'}
{'index': '4', 'image': 'http://p0.meituan.net/movie/fc9d78dd2ce84d20e53b6d1ae2eea4fb1515304.jpg@160w_220h_1e_1c', 'title': '这个杀手不太冷', 'actor': '让·雷诺,加里·奥德曼,娜塔莉·波特曼', 'time': '1994-09-14(法国)', 'score': '9.5'}
{'index': '5', 'image': 'http://p0.meituan.net/movie/92/8212889.jpg@160w_220h_1e_1c', 'title': '教父', 'actor': '马龙·白兰度,阿尔·帕西诺,詹姆斯·凯恩', 'time': '1972-03-24(美国)', 'score': '9.3'}
{'index': '6', 'image': 'http://p0.meituan.net/movie/11/324629.jpg@160w_220h_1e_1c', 'title': '泰坦尼克号', 'actor': '莱昂纳多·迪卡普里奥,凯特·温丝莱特,比利·赞恩', 'time': '1998-04-03', 'score': '9.5'}
{'index': '7', 'image': 'http://p0.meituan.net/movie/c8f224ca9939cd9dd58f709c9c4deb0924422.jpg@160w_220h_1e_1c', 'title': '龙猫', 'actor': '日高法子,坂本千夏,糸井重里', 'time': '1988-04-16(日本)', 'score': '9.2'}
{'index': '8', 'image': 'http://p0.meituan.net/movie/62/109878.jpg@160w_220h_1e_1c', 'title': '唐伯虎点秋香', 'actor': '周星驰,巩俐,郑佩佩', 'time': '1993-07-01(中国香港)', 'score': '9.2'}
{'index': '9', 'image': 'http://p1.meituan.net/movie/94c3a84626fd7650d6891088c4b88e5c27012.jpg@160w_220h_1e_1c', 'title': '魂断蓝桥', 'actor': '费雯·丽,罗伯特·泰勒,露塞尔·沃特森', 'time': '1940-05-17(美国)', 'score': '9.2'}
{'index': '10', 'image': 'http://p0.meituan.net/movie/9bf7d7b81001a9cf8adbac5a7cf7d766132425.jpg@160w_220h_1e_1c', 'title': '千与千寻', 'actor': '柊瑠美,入野自由,夏木真理', 'time': '2001-07-20(日本)', 'score': '9.3'}
结果

写入文件

 随后,我们将提取的结果写入文件,这里直接写入到一个文本文件,这里通过JSON库的dumps()方法实现字典的序列化,并指定ensure_ascii的参数为Flase,这样保证输出结果是中文形式而是不Unicode编码,代码如下

def write_to_file(content):
    with open('result.txt', 'a', encoding='utf-8') as f:
        f.write(json.dumps(content, ensure_ascii=False) + '\n')

整合代码

最后,实现main()方法调用前面实现的方法,将单页面的电影写到文件:

# -*- coding:utf-8 -*-
import requests
import re
import json


def get_one_page(url):
    headers = {
        'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.117 Safari/537.36'
    }
    response = requests.get(url, headers=headers)
    if response.status_code == 200:
        return response.text
    return None


def parse_one_page(html):
    pattern = re.compile(
        '<dd>.*?board-index.*?>(.*?)</i>.*?data-src="(.*?)".*?name.*?a.*?>(.*?)</a>.*?star.*?>(.*?)</p>.*?releasetime.*?>(.*?)</p>.*?integer.*?>(.*?)</i>.*?fraction.*?>(.*?)</i>.*?</dd>',
        re.S)
    items = re.findall(pattern, html)
    for item in items:
        yield {
            'index': item[0],
            'image': item[1],
            'title': item[2].strip(),
            'actor': item[3].strip()[3:] if len(item[3]) > 3 else '',
            'time': item[4].strip()[5:] if len(item[4]) > 5 else '',
            'score': item[5].strip() + item[6].strip()
        }


def write_to_file(content):
    with open('result.txt', 'a', encoding='utf-8') as f:
        f.write(json.dumps(content, ensure_ascii=False) + '\n')


def main():
    url = 'http://maoyan.com/board/4'
    html = get_one_page(url)
    for item in parse_one_page(html):
        write_to_file(item)


main()
单页电影信息写入文件

分页爬取

爬取所有TOP100电影,完整代码如下

# -*- coding:utf-8 -*-
import requests
import re
import json


def get_one_page(url):
    headers = {
        'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.117 Safari/537.36'
    }
    response = requests.get(url, headers=headers)
    if response.status_code == 200:
        return response.text
    return None


def parse_one_page(html):
    pattern = re.compile(
        '<dd>.*?board-index.*?>(.*?)</i>.*?data-src="(.*?)".*?name.*?a.*?>(.*?)</a>.*?star.*?>(.*?)</p>.*?releasetime.*?>(.*?)</p>.*?integer.*?>(.*?)</i>.*?fraction.*?>(.*?)</i>.*?</dd>',
        re.S)
    items = re.findall(pattern, html)
    for item in items:
        yield {
            'index': item[0],
            'image': item[1],
            'title': item[2].strip(),
            'actor': item[3].strip()[3:] if len(item[3]) > 3 else '',
            'time': item[4].strip()[5:] if len(item[4]) > 5 else '',
            'score': item[5].strip() + item[6].strip()
        }


def write_to_file(content):
    with open('result.txt', 'a', encoding='utf-8') as f:
        f.write(json.dumps(content, ensure_ascii=False) + '\n')


def main(offset):
    url = 'http://maoyan.com/board/4?offset=' + str(offset)
    html = get_one_page(url)
    for item in parse_one_page(html):
        write_to_file(item)


if __name__ == '__main__':
    for i in range(10):
        main(offset=i * 10)
MaoyanTop100

爬取结果:

{"index": "1", "image": "http://p1.meituan.net/movie/20803f59291c47e1e116c11963ce019e68711.jpg@160w_220h_1e_1c", "title": "霸王别姬", "actor": "张国荣,张丰毅,巩俐", "time": "1993-01-01(中国香港)", "score": "9.6"}
{"index": "2", "image": "http://p0.meituan.net/movie/__40191813__4767047.jpg@160w_220h_1e_1c", "title": "肖申克的救赎", "actor": "蒂姆·罗宾斯,摩根·弗里曼,鲍勃·冈顿", "time": "1994-10-14(美国)", "score": "9.5"}
{"index": "3", "image": "http://p0.meituan.net/movie/23/6009725.jpg@160w_220h_1e_1c", "title": "罗马假日", "actor": "格利高利·派克,奥黛丽·赫本,埃迪·艾伯特", "time": "1953-09-02(美国)", "score": "9.1"}
{"index": "4", "image": "http://p0.meituan.net/movie/fc9d78dd2ce84d20e53b6d1ae2eea4fb1515304.jpg@160w_220h_1e_1c", "title": "这个杀手不太冷", "actor": "让·雷诺,加里·奥德曼,娜塔莉·波特曼", "time": "1994-09-14(法国)", "score": "9.5"}
{"index": "5", "image": "http://p0.meituan.net/movie/92/8212889.jpg@160w_220h_1e_1c", "title": "教父", "actor": "马龙·白兰度,阿尔·帕西诺,詹姆斯·凯恩", "time": "1972-03-24(美国)", "score": "9.3"}
{"index": "6", "image": "http://p0.meituan.net/movie/11/324629.jpg@160w_220h_1e_1c", "title": "泰坦尼克号", "actor": "莱昂纳多·迪卡普里奥,凯特·温丝莱特,比利·赞恩", "time": "1998-04-03", "score": "9.5"}
{"index": "7", "image": "http://p0.meituan.net/movie/c8f224ca9939cd9dd58f709c9c4deb0924422.jpg@160w_220h_1e_1c", "title": "龙猫", "actor": "日高法子,坂本千夏,糸井重里", "time": "1988-04-16(日本)", "score": "9.2"}
{"index": "8", "image": "http://p0.meituan.net/movie/62/109878.jpg@160w_220h_1e_1c", "title": "唐伯虎点秋香", "actor": "周星驰,巩俐,郑佩佩", "time": "1993-07-01(中国香港)", "score": "9.2"}
{"index": "9", "image": "http://p1.meituan.net/movie/94c3a84626fd7650d6891088c4b88e5c27012.jpg@160w_220h_1e_1c", "title": "魂断蓝桥", "actor": "费雯·丽,罗伯特·泰勒,露塞尔·沃特森", "time": "1940-05-17(美国)", "score": "9.2"}
{"index": "10", "image": "http://p0.meituan.net/movie/9bf7d7b81001a9cf8adbac5a7cf7d766132425.jpg@160w_220h_1e_1c", "title": "千与千寻", "actor": "柊瑠美,入野自由,夏木真理", "time": "2001-07-20(日本)", "score": "9.3"}
{"index": "11", "image": "http://p0.meituan.net/movie/13/6960141.jpg@160w_220h_1e_1c", "title": "乱世佳人", "actor": "费雯·丽,克拉克·盖博,奥利维娅·德哈维兰", "time": "1939-12-15(美国)", "score": "9.1"}
{"index": "12", "image": "http://p0.meituan.net/movie/59/2366463.jpg@160w_220h_1e_1c", "title": "喜剧之王", "actor": "周星驰,莫文蔚,张柏芝", "time": "1999-02-13(中国香港)", "score": "9.2"}
{"index": "13", "image": "http://p0.meituan.net/movie/24/4495986.jpg@160w_220h_1e_1c", "title": "天空之城", "actor": "寺田农,鹫尾真知子,龟山助清", "time": "1992", "score": "9.1"}
{"index": "14", "image": "http://p0.meituan.net/movie/d1de085b6899fd2e661fc17da8b72a1b17287.jpg@160w_220h_1e_1c", "title": "大闹天宫", "actor": "邱岳峰,毕克,富润生", "time": "1965-12-31", "score": "9.0"}
{"index": "15", "image": "http://p0.meituan.net/movie/88/6673874.jpg@160w_220h_1e_1c", "title": "辛德勒的名单", "actor": "连姆·尼森,拉尔夫·费因斯,本·金斯利", "time": "1993-12-15(美国)", "score": "9.2"}
{"index": "16", "image": "http://p0.meituan.net/movie/76/8189714.jpg@160w_220h_1e_1c", "title": "音乐之声", "actor": "朱丽·安德鲁斯,克里斯托弗·普卢默,埃琳诺·帕克", "time": "1965-03-02(美国)", "score": "9.0"}
{"index": "17", "image": "http://p0.meituan.net/movie/7bc241d4e59a6c55dfadb0528dc957ae27325.jpg@160w_220h_1e_1c", "title": "剪刀手爱德华", "actor": "约翰尼·德普,薇诺娜·瑞德,黛安娜·维斯特", "time": "1990-12-06(美国)", "score": "8.8"}
{"index": "18", "image": "http://p0.meituan.net/movie/18/6251213.jpg@160w_220h_1e_1c", "title": "春光乍泄", "actor": "张国荣,梁朝伟,张震", "time": "1997-05-30(中国香港)", "score": "9.2"}
{"index": "19", "image": "http://p0.meituan.net/movie/5bef87296178cc0c0946f9c352ca267a119592.jpg@160w_220h_1e_1c", "title": "美丽人生", "actor": "罗伯托·贝尼尼,尼可莱塔·布拉斯基,乔治·坎塔里尼", "time": "1997-12-20(意大利)", "score": "9.3"}
{"index": "20", "image": "http://p1.meituan.net/movie/47d5736e5637d4e0f4941984879c669f32113.jpg@160w_220h_1e_1c", "title": "黑客帝国", "actor": "基努·里维斯,凯瑞-安·莫斯,劳伦斯·菲什伯恩", "time": "2000-01-14", "score": "9.0"}
{"index": "21", "image": "http://p1.meituan.net/movie/4f0849a927728fa5215187a3ef57d43d22038.jpg@160w_220h_1e_1c", "title": "海上钢琴师", "actor": "蒂姆·罗斯,普路特·泰勒·文斯,比尔·努恩", "time": "1998-10-28(意大利)", "score": "9.2"}
{"index": "22", "image": "http://p0.meituan.net/movie/5ab34fd790f2970512ee7668cf73f04f110032.jpg@160w_220h_1e_1c", "title": "指环王3:王者无敌", "actor": "伊利亚·伍德,伊恩·麦克莱恩,丽芙·泰勒", "time": "2004-03-15", "score": "9.2"}
{"index": "23", "image": "http://p0.meituan.net/movie/88/3864695.jpg@160w_220h_1e_1c", "title": "加勒比海盗", "actor": "约翰尼·德普,凯拉·奈特莉,奥兰多·布鲁姆", "time": "2003-11-21", "score": "8.9"}
{"index": "24", "image": "http://p1.meituan.net/movie/aacb9ed2a6601bfe515ef0970add1715623792.jpg@160w_220h_1e_1c", "title": "哈利·波特与魔法石", "actor": "丹尼尔·雷德克里夫,鲁伯特·格林特,艾玛·沃森", "time": "2002-01-26", "score": "9.1"}
{"index": "25", "image": "http://p1.meituan.net/movie/53b6f0b66882a53b08896c92076515a8236400.jpg@160w_220h_1e_1c", "title": "射雕英雄传之东成西就", "actor": "张国荣,林青霞,梁朝伟", "time": "1993-02-05(中国香港)", "score": "8.9"}
{"index": "26", "image": "http://p1.meituan.net/movie/__42975419__9836378.jpg@160w_220h_1e_1c", "title": "无间道", "actor": "刘德华,梁朝伟,黄秋生", "time": "2003-09-05", "score": "9.1"}
{"index": "27", "image": "http://p0.meituan.net/movie/84/3686822.jpg@160w_220h_1e_1c", "title": "楚门的世界", "actor": "金·凯瑞,劳拉·琳妮,诺亚·艾默里奇", "time": "1998-06-01(美国)", "score": "8.9"}
{"index": "28", "image": "http://p0.meituan.net/movie/e3285cf6ed5395777433e8be5fd0078087787.jpg@160w_220h_1e_1c", "title": "指环王2:双塔奇兵", "actor": "伊利亚·伍德,伊恩·麦克莱恩,丽芙·泰勒", "time": "2003-04-25", "score": "9.1"}
{"index": "29", "image": "http://p1.meituan.net/movie/75bd869f7224871c5ebf781720cf456e117189.jpg@160w_220h_1e_1c", "title": "蝙蝠侠:黑暗骑士", "actor": "克里斯蒂安·贝尔,希斯·莱杰,艾伦·艾克哈特", "time": "2008-07-18(美国)", "score": "9.3"}
{"index": "30", "image": "http://p0.meituan.net/movie/4/9978669.jpg@160w_220h_1e_1c", "title": "教父2", "actor": "阿尔·帕西诺,罗伯特·德尼罗,黛安·基顿", "time": "1974-12-12(美国)", "score": "9.0"}
{"index": "31", "image": "http://p0.meituan.net/movie/c50ae3601e5564dbaabf9247270bf50d31981.jpg@160w_220h_1e_1c", "title": "阿飞正传", "actor": "张国荣,张曼玉,刘德华", "time": "1990-12-15(中国香港)", "score": "8.8"}
{"index": "32", "image": "http://p0.meituan.net/movie/53/930936.jpg@160w_220h_1e_1c", "title": "机器人总动员", "actor": "本·贝尔特,艾丽莎·奈特,杰夫·格尔林", "time": "2008-06-27(美国)", "score": "9.3"}
{"index": "33", "image": "http://p0.meituan.net/movie/11/295014.jpg@160w_220h_1e_1c", "title": "天堂电影院", "actor": "菲利浦·诺瓦雷,塞吉·卡斯特里图,蒂兹亚娜·罗达托", "time": "1988-11-17(意大利)", "score": "9.2"}
{"index": "34", "image": "http://p0.meituan.net/movie/53/1819401.jpg@160w_220h_1e_1c", "title": "活着", "actor": "葛优,巩俐,牛犇", "time": "1994-05-18(法国)", "score": "9.0"}
{"index": "35", "image": "http://p0.meituan.net/movie/32/595031.jpg@160w_220h_1e_1c", "title": "拯救大兵瑞恩", "actor": "汤姆·汉克斯,马特·达蒙,汤姆·塞兹摩尔", "time": "1998-07-24(美国)", "score": "8.9"}
{"index": "36", "image": "http://p1.meituan.net/movie/6b2dd1a9094b76e5f6d905d3687c0dce27162.jpg@160w_220h_1e_1c", "title": "忠犬八公的故事", "actor": "Forest,理查·基尔,琼·艾伦", "time": "2010-03-12(英国)", "score": "9.3"}
{"index": "37", "image": "http://p1.meituan.net/movie/0dcbfdac2178043fa1a701269c10535738603.jpg@160w_220h_1e_1c", "title": "哈尔的移动城堡", "actor": "倍赏千惠子,木村拓哉,美轮明宏", "time": "2004-11-20(日本)", "score": "9.0"}
{"index": "38", "image": "http://p0.meituan.net/movie/d08f5d2b7ba006a6e4058e62f916736725217.jpg@160w_220h_1e_1c", "title": "东邪西毒", "actor": "张国荣,林青霞,梁朝伟", "time": "1994-09-17", "score": "8.9"}
{"index": "39", "image": "http://p1.meituan.net/movie/4faf9749d2014b7cc94331a38d848f99132123.jpg@160w_220h_1e_1c", "title": "盗梦空间", "actor": "莱昂纳多·迪卡普里奥,渡边谦,约瑟夫·高登-莱维特", "time": "2010-09-01", "score": "9.2"}
{"index": "40", "image": "http://p0.meituan.net/movie/903bfc516218d7a2db2c2ce63a8c5c84147205.jpg@160w_220h_1e_1c", "title": "疯狂原始人", "actor": "尼古拉斯·凯奇,艾玛·斯通,瑞安·雷诺兹", "time": "2013-04-20", "score": "9.5"}
{"index": "41", "image": "http://p1.meituan.net/movie/c5e76795bf7a78b12a2ffabb4a0c5c11112921.jpg@160w_220h_1e_1c", "title": "搏击俱乐部", "actor": "爱德华·诺顿,布拉德·皮特,海伦娜·伯翰·卡特", "time": "1999-10-15(美国)", "score": "8.8"}
{"index": "42", "image": "http://p0.meituan.net/movie/9/1476994.jpg@160w_220h_1e_1c", "title": "幽灵公主", "actor": "松田洋治,石田百合子,田中裕子", "time": "1997-07-12(日本)", "score": "8.9"}
{"index": "43", "image": "http://p0.meituan.net/movie/54/868271.jpg@160w_220h_1e_1c", "title": "阿凡达", "actor": "萨姆·沃辛顿,佐伊·索尔达娜,米歇尔·罗德里格兹", "time": "2010-01-04", "score": "9.0"}
{"index": "44", "image": "http://p0.meituan.net/movie/57/5832292.jpg@160w_220h_1e_1c", "title": "V字仇杀队", "actor": "娜塔莉·波特曼,雨果·维文,斯蒂芬·瑞", "time": "2006-03-17(美国)", "score": "8.8"}
{"index": "45", "image": "http://p0.meituan.net/movie/77/5392065.jpg@160w_220h_1e_1c", "title": "风之谷", "actor": "岛本须美,永井一郎,坂本千夏", "time": "1992", "score": "8.9"}
{"index": "46", "image": "http://p0.meituan.net/movie/__38288284__4749195.jpg@160w_220h_1e_1c", "title": "放牛班的春天", "actor": "杰拉尔·朱诺,尚-巴堤·莫里耶,玛丽·布奈尔", "time": "2004-10-16", "score": "8.9"}
{"index": "47", "image": "http://p0.meituan.net/movie/50/821132.jpg@160w_220h_1e_1c", "title": "当幸福来敲门", "actor": "威尔·史密斯,贾登·史密斯,桑迪·牛顿", "time": "2008-01-17", "score": "8.9"}
{"index": "48", "image": "http://p0.meituan.net/movie/86/2992612.jpg@160w_220h_1e_1c", "title": "十二怒汉", "actor": "亨利·方达,李·科布,马丁·鲍尔萨姆", "time": "1957-04-13(美国)", "score": "9.1"}
{"index": "49", "image": "http://p0.meituan.net/movie/017ac8fd875ee488be7d3d21165ac98d20778.jpg@160w_220h_1e_1c", "title": "黑客帝国3:矩阵革命", "actor": "基努·里维斯,雨果·维文,凯瑞-安·莫斯", "time": "2003-11-05", "score": "8.8"}
{"index": "50", "image": "http://p0.meituan.net/movie/e953fb81e4066fa519a66227141fd81f23283.jpg@160w_220h_1e_1c", "title": "勇敢的心", "actor": "梅尔·吉布森,苏菲·玛索,帕特里克·麦高汉", "time": "1995-05-24(美国)", "score": "8.8"}
{"index": "51", "image": "http://p0.meituan.net/movie/44/43.jpg@160w_220h_1e_1c", "title": "三傻大闹宝莱坞", "actor": "阿米尔·汗,黄渤,卡琳娜·卡普", "time": "2011-12-08", "score": "9.1"}
{"index": "52", "image": "http://p0.meituan.net/movie/19/9277847.jpg@160w_220h_1e_1c", "title": "断背山", "actor": "希斯·莱杰,杰克·吉伦哈尔,米歇尔·威廉姆斯", "time": "2006-01-13(美国)", "score": "9.0"}
{"index": "53", "image": "http://p0.meituan.net/movie/44/637726.jpg@160w_220h_1e_1c", "title": "驯龙高手", "actor": "杰伊·巴鲁切尔,杰拉德·巴特勒,亚美莉卡·费雷拉", "time": "2010-05-14", "score": "9.0"}
{"index": "54", "image": "http://p1.meituan.net/movie/01db9c3365a825ccd612aa14a12a36f528278.jpg@160w_220h_1e_1c", "title": "神偷奶爸", "actor": "史蒂夫·卡瑞尔,杰森·席格尔,拉塞尔·布兰德", "time": "2010-07-09(美国)", "score": "9.0"}
{"index": "55", "image": "http://p0.meituan.net/movie/62/499239.jpg@160w_220h_1e_1c", "title": "飞屋环游记", "actor": "爱德华·阿斯纳,乔丹·长井,鲍勃·彼德森", "time": "2009-08-04", "score": "8.9"}
{"index": "56", "image": "http://p0.meituan.net/movie/30/380718.jpg@160w_220h_1e_1c", "title": "速度与激情5", "actor": "范·迪塞尔,保罗·沃克,道恩·强森", "time": "2011-05-12", "score": "9.2"}
{"index": "57", "image": "http://p0.meituan.net/movie/95/985283.jpg@160w_220h_1e_1c", "title": "少年派的奇幻漂流", "actor": "苏拉·沙玛,伊尔凡·可汗,塔布", "time": "2012-11-22", "score": "9.1"}
{"index": "58", "image": "http://p0.meituan.net/movie/67/8094010.jpg@160w_220h_1e_1c", "title": "闻香识女人", "actor": "阿尔·帕西诺,克里斯·奥唐纳,加布里埃尔·安瓦尔", "time": "1992-12-23(美国)", "score": "8.8"}
{"index": "59", "image": "http://p0.meituan.net/movie/55/9750194.jpg@160w_220h_1e_1c", "title": "飞越疯人院", "actor": "杰克·尼科尔森,路易丝·弗莱彻,威尔·萨姆森", "time": "1975-11-19(美国)", "score": "8.8"}
{"index": "60", "image": "http://p0.meituan.net/movie/12/2130469.jpg@160w_220h_1e_1c", "title": "致命魔术", "actor": "休·杰克曼,克里斯蒂安·贝尔,迈克尔·凯恩", "time": "2006-10-20(美国)", "score": "8.8"}
{"index": "61", "image": "http://p0.meituan.net/movie/17/6995038.jpg@160w_220h_1e_1c", "title": "怦然心动", "actor": "玛德琳·卡罗尔,卡兰·麦克奥利菲,艾丹·奎因", "time": "2010-08-06(美国)", "score": "8.9"}
{"index": "62", "image": "http://p0.meituan.net/movie/afb0e3c7e3d80fb5da3892eb6da4e56825971.jpg@160w_220h_1e_1c", "title": "美国往事", "actor": "罗伯特·德尼罗,詹姆斯·伍兹,伊丽莎白·麦戈文", "time": "1984-02-17(美国)", "score": "9.1"}
{"index": "63", "image": "http://p0.meituan.net/movie/91/5305842.jpg@160w_220h_1e_1c", "title": "美丽心灵", "actor": "罗素·克劳,詹妮弗·康纳利,艾德·哈里斯", "time": "2001-12-21(美国)", "score": "8.8"}
{"index": "64", "image": "http://p0.meituan.net/movie/d81e2aeecebce01472434b09b46bc56c136075.jpg@160w_220h_1e_1c", "title": "鬼子来了", "actor": "姜文,姜宏波,陈强", "time": "2000-05-12(法国戛纳)", "score": "8.9"}
{"index": "65", "image": "http://p0.meituan.net/movie/7/2144189.jpg@160w_220h_1e_1c", "title": "大话西游之月光宝盒", "actor": "周星驰,莫文蔚,吴孟达", "time": "2014-10-24", "score": "9.6"}
{"index": "66", "image": "http://p0.meituan.net/movie/36/6065251.jpg@160w_220h_1e_1c", "title": "夜访吸血鬼", "actor": "汤姆·克鲁斯,布拉德·皮特,克尔斯滕·邓斯特", "time": "1994-11-11(美国)", "score": "8.8"}
{"index": "67", "image": "http://p1.meituan.net/movie/3fd701f5bfa9f8acddfe407949fd9104143897.jpg@160w_220h_1e_1c", "title": "蝙蝠侠:黑暗骑士崛起", "actor": "克里斯蒂安·贝尔,迈克尔·凯恩,加里·奥德曼", "time": "2012-08-27", "score": "8.9"}
{"index": "68", "image": "http://p0.meituan.net/movie/65/249948.jpg@160w_220h_1e_1c", "title": "无敌破坏王", "actor": "约翰·C·赖利,萨拉·丝沃曼,简·林奇", "time": "2012-11-06", "score": "9.0"}
{"index": "69", "image": "http://p0.meituan.net/movie/36/7289043.jpg@160w_220h_1e_1c", "title": "钢琴家", "actor": "阿德里安·布洛迪,艾米丽雅·福克斯,米乔·赞布罗斯基", "time": "2002-09-25(法国)", "score": "8.8"}
{"index": "70", "image": "http://p0.meituan.net/movie/76/612928.jpg@160w_220h_1e_1c", "title": "哈利·波特与死亡圣器(下)", "actor": "丹尼尔·雷德克里夫,鲁伯特·格林特,艾玛·沃森", "time": "2011-08-04", "score": "9.0"}
{"index": "71", "image": "http://p0.meituan.net/movie/48/2207789.jpg@160w_220h_1e_1c", "title": "本杰明·巴顿奇事", "actor": "布拉德·皮特,凯特·布兰切特,塔拉吉·P·汉森", "time": "2008-12-25(美国)", "score": "8.8"}
{"index": "72", "image": "http://p0.meituan.net/movie/94/94.jpg@160w_220h_1e_1c", "title": "新龙门客栈", "actor": "张曼玉,林青霞,梁家辉", "time": "2012-02-24", "score": "8.8"}
{"index": "73", "image": "http://p1.meituan.net/movie/1a8cde299375b74d0b8b3ad35b071480111623.jpg@160w_220h_1e_1c", "title": "甜蜜蜜", "actor": "黎明,张曼玉,曾志伟", "time": "2015-02-13", "score": "9.2"}
{"index": "74", "image": "http://p0.meituan.net/movie/85/3966083.jpg@160w_220h_1e_1c", "title": "倩女幽魂", "actor": "张国荣,王祖贤,午马", "time": "2011-04-30", "score": "9.1"}
{"index": "75", "image": "http://p0.meituan.net/movie/40/9791315.jpg@160w_220h_1e_1c", "title": "熔炉", "actor": "孔刘,郑有美,金智英", "time": "2011-09-22(韩国)", "score": "8.8"}
{"index": "76", "image": "http://p0.meituan.net/movie/49/7621489.jpg@160w_220h_1e_1c", "title": "触不可及", "actor": "弗朗索瓦·克鲁塞,奥马·希,安乐妮", "time": "2011-11-02(法国)", "score": "9.1"}
{"index": "77", "image": "http://p0.meituan.net/movie/23/912567.jpg@160w_220h_1e_1c", "title": "初恋这件小事", "actor": "马里奥·毛瑞尔,平采娜·乐维瑟派布恩,阿查拉那·阿瑞亚卫考", "time": "2012-06-05", "score": "8.8"}
{"index": "78", "image": "http://p1.meituan.net/movie/28c727b5a79b8bdffe7d98e54a4d512f61385.jpg@160w_220h_1e_1c", "title": "大话西游之大圣娶亲", "actor": "周星驰,朱茵,莫文蔚", "time": "2014-10-24", "score": "8.8"}
{"index": "79", "image": "http://p1.meituan.net/movie/__28022955__8810277.jpg@160w_220h_1e_1c", "title": "素媛", "actor": "李甄,薛景求,严智媛", "time": "2013-10-02(韩国)", "score": "9.1"}
{"index": "80", "image": "http://p0.meituan.net/movie/74/8352133.jpg@160w_220h_1e_1c", "title": "小鞋子", "actor": "默罕默德·阿米尔·纳吉,Kamal Mirkarimi,Behzad Rafi", "time": "1999-01-22(美国)", "score": "9.1"}
{"index": "81", "image": "http://p0.meituan.net/movie/51/8002255.jpg@160w_220h_1e_1c", "title": "萤火之森", "actor": "内山昂辉,佐仓绫音,Hiroki Gotô", "time": "2011-09-17(日本)", "score": "9.0"}
{"index": "82", "image": "http://p0.meituan.net/movie/__18433373__7708791.jpg@160w_220h_1e_1c", "title": "时空恋旅人", "actor": "瑞秋·麦克亚当斯,多姆纳尔·格里森,比尔·奈伊", "time": "2013-09-04(英国)", "score": "8.9"}
{"index": "83", "image": "http://p0.meituan.net/movie/7b3ec4254145fa618acfe02ba5090f4229614.jpg@160w_220h_1e_1c", "title": "穿条纹睡衣的男孩", "actor": "阿沙·巴特菲尔德,维拉·法梅加,大卫·休里斯", "time": "2008-09-12(英国)", "score": "9.0"}
{"index": "84", "image": "http://p0.meituan.net/movie/9200962015fab182a516abf15629868d19268.jpg@160w_220h_1e_1c", "title": "窃听风暴", "actor": "乌尔里希·穆埃,赛巴斯汀‧柯赫,马蒂娜·戈黛特", "time": "2006-03-23(德国)", "score": "9.0"}
{"index": "85", "image": "http://p1.meituan.net/movie/cf09a7f134015c6429b2329e929d7611150403.jpg@160w_220h_1e_1c", "title": "7号房的礼物", "actor": "柳承龙,郑进永,朴信惠", "time": "2013-01-23(韩国)", "score": "8.9"}
{"index": "86", "image": "http://p0.meituan.net/movie/49/4069944.jpg@160w_220h_1e_1c", "title": "借东西的小人阿莉埃蒂", "actor": "志田未来,神木隆之介,大竹忍", "time": "2010-07-17(日本)", "score": "8.8"}
{"index": "87", "image": "http://p0.meituan.net/movie/90/1810122.jpg@160w_220h_1e_1c", "title": "海豚湾", "actor": "里克·奥巴瑞,路易·西霍尤斯,哈迪·琼斯", "time": "2009-07-31(美国)", "score": "8.9"}
{"index": "88", "image": "http://p1.meituan.net/movie/729f8c8d8a5e4036e286a018de70d4ab119653.jpg@160w_220h_1e_1c", "title": "恐怖直播", "actor": "河正宇,李璟荣,权慧贞", "time": "2013-07-31(韩国)", "score": "8.8"}
{"index": "89", "image": "http://p0.meituan.net/movie/15/9810061.jpg@160w_220h_1e_1c", "title": "忠犬八公物语", "actor": "仲代达矢,春川真澄,井川比佐志", "time": "1987-08-01(日本)", "score": "9.0"}
{"index": "90", "image": "http://p0.meituan.net/movie/81/7736439.jpg@160w_220h_1e_1c", "title": "上帝之城", "actor": "亚历桑德雷·罗德里格斯,艾莉丝·布拉加,莱昂德罗·弗米诺", "time": "2002-08-30(巴西)", "score": "8.9"}
{"index": "91", "image": "http://p0.meituan.net/movie/f31af5ac93e3d59dc07cbf1a993484c5126335.jpg@160w_220h_1e_1c", "title": "辩护人", "actor": "宋康昊,宋英昌,柳秀荣", "time": "2013-12-18(韩国)", "score": "8.8"}
{"index": "92", "image": "http://p1.meituan.net/movie/ad8db7c018cdf82c4b754b34bd80b09044965.jpg@160w_220h_1e_1c", "title": "七武士", "actor": "三船敏郎,志村乔,千秋实", "time": "1954-04-26(日本)", "score": "9.1"}
{"index": "93", "image": "http://p0.meituan.net/movie/27/8877229.jpg@160w_220h_1e_1c", "title": "一一", "actor": "吴念真,金燕玲,李凯莉", "time": "2000-09-20(法国)", "score": "8.9"}
{"index": "94", "image": "http://p0.meituan.net/movie/86/3880567.jpg@160w_220h_1e_1c", "title": "完美的世界", "actor": "凯文·科斯特纳,克林特·伊斯特伍德,T.J.劳瑟", "time": "1993-11-24(美国)", "score": "8.9"}
{"index": "95", "image": "http://p0.meituan.net/movie/11/391659.jpg@160w_220h_1e_1c", "title": "海洋", "actor": "雅克·贝汉,姜文,兰斯洛特·贝汉", "time": "2011-08-12", "score": "9.0"}
{"index": "96", "image": "http://p1.meituan.net/movie/36a893c53a13f9bb934071b86ae3b5c492427.jpg@160w_220h_1e_1c", "title": "爱·回家", "actor": "俞承豪,金艺芬,童孝熙", "time": "2002-04-05(韩国)", "score": "9.0"}
{"index": "97", "image": "http://p0.meituan.net/movie/f95f056d08fdd3a6ce7a01cb81a0a6f725771.jpg@160w_220h_1e_1c", "title": "黄金三镖客", "actor": "克林特·伊斯特伍德,李·范·克里夫,伊莱·瓦拉赫", "time": "1966-12-23(意大利)", "score": "8.9"}
{"index": "98", "image": "http://p0.meituan.net/movie/52/3420293.jpg@160w_220h_1e_1c", "title": "我爱你", "actor": "宋在河,李顺才,尹秀晶", "time": "2011-02-17(韩国)", "score": "9.0"}
{"index": "99", "image": "http://p1.meituan.net/movie/__44335138__8470779.jpg@160w_220h_1e_1c", "title": "迁徙的鸟", "actor": "雅克·贝汉,菲利普·拉波洛", "time": "2001-12-12(法国)", "score": "9.1"}
{"index": "100", "image": "http://p0.meituan.net/movie/5102b3f7261caa09c1c9b1212f09cc1f461902.png@160w_220h_1e_1c", "title": "英雄本色", "actor": "狄龙,张国荣,周润发", "time": "2017-11-17", "score": "9.2"}
result.txt

大功告成!

posted @ 2018-04-22 12:28  0bug  阅读(1397)  评论(1编辑  收藏  举报