diff --git a/Proj1_maoyan/ou-files/maoyan.txt b/Proj1_maoyan/ou-files/maoyan.txt new file mode 100644 index 0000000..98d1f89 --- /dev/null +++ b/Proj1_maoyan/ou-files/maoyan.txt @@ -0,0 +1,87 @@ +{"index": "1", "image": "https://p0.pipi.cn/mmdb/d2dad59253751bd236338fa5bd5a27c710413.jpg?imageView2/1/w/160/h/220", "title": "我不是药神", "actor": "徐峥,周一围,王传君", "time": "2018-07-05", "score": "9.6"} +score": "9.2"} +4(英国)", "score": "8.9"} +{"index": "72", "image": "https://p0.pipi.cn/mmdb/d2dad592c7e7e1d2360faf1b1b4653c2449f2.jpg?imageView2/1/w/160/h/220", "title": "爱在日落黄昏时", "actor": "伊桑·霍克,朱莉·德尔佩,弗农·多布切夫", "time": "2015-04-20", "score": "8.7"} +0"} +{"index": "2", "image": "https://p0.pipi.cn/mmdb/fb7386020fa51b0fafcf3e2e3a0bbe694d17d.jpg?imageView2/1/w/160/h/220", "title": "肖申克的救赎", "actor": "蒂姆·罗宾斯,摩根·弗里曼,鲍勃·冈顿", "time": "1994-09-10(加拿大)", "score": "9.5"} +{"index": "33", "image": "https://p0.pipi.cn/mmdb/d2dad592c7e7e1d236395b7bdd569bf8bb083.jpg?imageView2/1/w/160/h/220", "title": "活着", "actor": "葛优,巩俐,牛犇", "time": "1994-05-17(法国)", "score": "9.0"} +{"index": "13", "image": "https://p0.pipi.cn/mmdb/fb73869af2a51b339e537c802afb40db7a7fe.jpg?imageView2/1/w/160/h/220", "title": "泰坦尼克号", "actor": "莱昂纳多·迪卡普里奥,凯特·温丝莱特,比利·赞恩", "time": "1998-04-03", "score": "9.6"} +{"index": "73", "image": "https://p0.pipi.cn/mmdb/d2dad592c7e7e1cbaec6966bffa7868726081.jpg?imageView2/1/w/160/h/220", "title": "春光乍泄", "actor": "张国荣,梁朝伟,张震", "time": "1997-05-30(中国香港)", "score": "9.2"} +{"index": "3", "image": "https://p0.pipi.cn/mmdb/d2dad592c7e7e1d2365bf1b63cd25951b722b.jpg?imageView2/1/w/160/h/220", "title": "海上钢琴师", "actor": "蒂姆·罗斯,比尔·努恩 ,克兰伦斯·威廉姆斯三世", "time": "2019-11-15", "score": "9.3"} +{"index": "34", "image": "https://p0.pipi.cn/mmdb/25bfd692f2ab12c9fd8d3354cc37282ed38e9.png?imageView2/1/w/160/h/220", "title": "教父", "actor": "马龙·白兰度,阿尔·帕西诺,詹姆斯·凯恩", "time": "1972-03-14(美国)", "score": "9.3"} +{"index": "74", "image": "https://p0.pipi.cn/mmdb/d2dad592c7e7e1cbaec7edffce881840adcbb.jpg?imageView2/1/w/160/h/220", "title": "心灵捕手", "actor": "罗宾·威廉姆斯,马特·达蒙,明妮·德里弗", "time": "1997-12-05(美国)", "score": "8.4"} +{"index": "4", "image": "https://p0.pipi.cn/mmdb/d2dad59253751b230f21f0818a5bfd4d8679c.jpg?imageView2/1/w/160/h/220", "title": "绿皮书", "actor": "维果·莫腾森,马赫沙拉·阿里,琳达·卡德里尼", "time": "2019-03-01", "score": "9.5"} +{"index": "15", "image": "https://p0.pipi.cn/mmdb/d2dad592c7e7e1d236b535e993774e3bc0268.jpg?imageView2/1/w/160/h/220", "title": "楚门的世界", "actor": "金·凯瑞,劳拉·琳妮,诺亚·艾默里奇", "time": "1998(罗马尼亚)", "score": "8.9"} +)", "score": "9.0"} +{"index": "35", "image": "https://p0.pipi.cn/mmdb/d2dad592c7e7e1d236339e301cab7bb7be389.jpg?imageView2/1/w/160/h/220", "title": "死亡诗社", "actor": "罗宾·威廉姆斯,伊桑·霍克,罗伯特·肖恩·莱纳德", "time": "1989-06-02(加拿大)", "score": "8.7"} +{"index": "6", "image": "https://p0.pipi.cn/mmdb/d2dad592c7e7e1d2367a3507befaed31a5903.jpg?imageView2/1/w/160/h/220", "title": "美丽人生", "actor": "罗伯托·贝尼尼,朱斯蒂诺·杜拉诺,赛尔乔·比尼·布斯特里克", "time": "2020-01-03", "score": "9.3"} +{"index": "36", "image": "https://p0.pipi.cn/mmdb/d2dad5927e10fa51bad7c3896f4dc879a0c22.jpg?imageView2/1/w/160/h/220", "title": "头号玩家", "actor": "泰伊·谢里丹,奥利维亚·库克,本·门德尔松", "time": "2018-03-30", "score": "9.0"} +{"index": "77", "image": "https://p0.pipi.cn/mmdb/d2dad52fe7a87a5015395b24814d7a88727c1.jpg?imageView2/1/w/160/h/220", "title": "控方证人", "actor": "泰隆·鲍华,玛琳·黛德丽,查尔斯·劳顿", "time": "1957-12-17(美国)", "score": "8.5"} +"9.4"} +{"index": "37", "image": "https://p0.pipi.cn/mmdb/d2dad592c7e7e17a3557e2d019edaa30f2b78.jpg?imageView2/1/w/160/h/220", "title": "龙猫", "actor": "秦岚,糸井重里,岛本须美", "time": "2018-12-14", "score": "9.2"} +{"index": "38", "image": "https://p0.pipi.cn/mmdb/d2dad592b1251be7aa2ff7e422a7f6c827754.jpg?imageView2/1/w/160/h/220", "title": "被嫌弃的松子的一生", "actor": "中谷美纪,永山瑛太,伊势谷友介", "time": "2006-05-27(日本)", "score": "8.5"} +{"index": "9", "image": "https://p0.pipi.cn/mmdb/d2dad592537923f0ee07acada3ac59b9f3ffb.jpg?imageView2/1/w/160/h/220", "title": "哪吒之魔童降世", "actor": "吕艳婷,囧森瑟夫,瀚墨", "time": "2019-07-26", "score": "9.6"} +"8.8"} +{"index": "19", "image": "https://p0.pipi.cn/mmdb/d2dad5927e10fa5bf1c6965cde0f9caa906e5.jpg?imageView2/1/w/160/h/220", "title": "寻梦环游记", "actor": "安东尼·冈萨雷斯,本杰明·布拉特,盖尔·加西亚·贝纳尔", "time": "2017-11-24", "score": "9.6"} +{"index": "39", "image": "https://p0.pipi.cn/mmdb/d2dad592c7e7e1cf3e339ef30f12d5ee7b26d.jpg?imageView2/1/w/160/h/220", "title": "闻香识女人", "actor": "阿尔·帕西诺,克里斯·奥唐纳,加布里埃尔·安瓦尔", "time": "1992-12-23(美国)", "score": "8.8"} +{"index": "10", "image": "https://p0.pipi.cn/mmdb/d2dad592b122ff8d3387a93ccab6036f616c1.jpg?imageView2/1/w/160/h/220", "title": "怦然心动", "actor": "玛德琳·卡罗尔,卡兰·麦克奥利菲,艾丹·奎因", "time": "2010-07-26({"index": "20", "image": "https://p0.pipi.cn/mmdb/d2dad592c7e7e1d23611e5b36d845b560a81c.jpg?imageView2/1/w/160/h/220", "title": "情书", "actor": "中山美穗,丰川悦司,酒井美纪", "time": "1999-03-01", "score": "8.9"} +{"index": "40", "image": "https://p0.pipi.cn/mmdb/d2dad592b12f2a7e120faf4954319ee560065.webp?imageView2/1/w/160/h/220", "title": "疯狂动物城", "actor": "金妮弗·古德温,杰森·贝特曼,伊德瑞斯·艾尔巴", "time": "2016-03-04", "score": "9.5"} +{"index": "81", "image": "https://p0.pipi.cn/mmdb/d2dad592c7e7e131392ff792cc928c7e6ba8a.jpg?imageView2/1/w/160/h/220", "title": "猫鼠游戏", "actor": "莱昂纳多·迪卡普里奥,汤姆·汉克斯,克里斯托弗·沃肯", "time": "2003-04-11", "score": "8.6"} +{"index": "82", "image": "https://p0.pipi.cn/mmdb/d2dad592b12f2a80775bf190d8476379b0d3e.jpg?imageView2/1/w/160/h/220", "title": "辩护人", "actor": "宋康昊,郭度沅,吴达洙", "time": "2013-12-18(韩国)", "score": "8.8"} +{"index": "83", "image": "https://p0.pipi.cn/mmdb/d2dad592b12923be128077d11fa70c904fed8.png?imageView2/1/w/160/h/220", "title": "入殓师", "actor": "本木雅弘,广末凉子,山崎努", "time": "2021-10-29", "score": "8.6"} +{"index": "84", "image": "https://p0.pipi.cn/mmdb/25bfd6bec7e7e1030cb12da89b6f158d2d3ce.jpg?imageView2/1/w/160/h/220", "title": "花束般的恋爱", "actor": "有村架纯,菅田将晖,细田佳央太", "time": "2022-02-22", "score": "8.9"} +{"index": "85", "image": "https://p0.pipi.cn/mmdb/d2dad592c7e7e18ea33ba335b04bdcbc9765a.jpg?imageView2/1/w/160/h/220", "title": "剪刀手爱德华", "actor": "约翰尼·德普,薇诺娜·瑞德,黛安娜·维斯特", "time": "1990-12-06(美国)", "score": "8.8"} +{"index": "86", "image": "https://p0.pipi.cn/mmdb/d2dad592c7e7e11789281e4bbb81fe2362062.jpg?imageView2/1/w/160/h/220", "title": "钢琴家", "actor": "阿德里安·布劳迪,艾米莉娅·福克斯,米乔·赞布罗斯基", "time": "2002-05-24(法国)", "score": "8.9"} +{"index": "87", "image": "https://p0.pipi.cn/mmdb/d2dad592b125bf230f8d3384ef8b5b7ad3de5.jpg?imageView2/1/w/160/h/220", "title": "素媛", "actor": "李甄,薛景求,严智苑", "time": "2013-10-02(韩国)", "score": "9.1"} +{"index": "88", "image": "https://p0.pipi.cn/mmdb/d2dad592b1251b2ff7c7ed6774758856693d1.jpg?imageView2/1/w/160/h/220", "title": "断背山", "actor": "希斯·莱杰,杰克·吉伦哈尔,米歇尔·威廉姆斯", "time": "2005-09-02(意大利)", "score": "8.9"} +{"index": "89", "image": "https://p0.pipi.cn/mmdb/d2dad592c7e7e1d2360e1365017be55c04ba1.jpg?imageView2/1/w/160/h/220", "title": "饮食男女", "actor": "郎雄,吴倩莲,杨贵媚", "time": "1994-08-03(美国)", "score": "8.8"} +{"index": "90", "image": "https://p0.pipi.cn/mmdb/d2dad592c7e7e157e257e2f58c70592a633f8.jpg?imageView2/1/w/160/h/220", "title": "十二怒汉", "actor": "亨利·方达,李·科布,马丁·鲍尔萨姆", "time": "1957-04-13(美国)", "score": "9.1"} +{"index": "41", "image": "https://p0.pipi.cn/mmdb/d2dad5927e10fac7edf0ee42a9d44a4e0fc97.jpg?imageView2/1/w/160/h/220", "title": "三块广告牌", "actor": "弗兰西斯·麦克多蒙德,伍迪·哈里森,山姆·洛克威尔", "time": "2018-03-02", "score": "8.6"} +{"index": "42", "image": "https://p0.pipi.cn/mmdb/d2dad592c7e7e157e2395b12a043e8aba9dd4.jpg?imageView2/1/w/160/h/220", "title": "末代皇帝", "actor": "尊龙,陈冲,彼得·奥图尔", "time": "1987-10-04(日本)", "score": "8.8"} +{"index": "43", "image": "https://p0.pipi.cn/mmdb/d2dad59206dc69e19b7e12d3d395c0b36f1a9.jpg?imageView2/1/w/160/h/220", "title": "心灵奇旅", "actor": "杰米·福克斯,蒂娜·菲,菲利西亚·拉斯海德", "time": "2020-12-25", "score": "9.2"} +{"index": "44", "image": "https://p0.pipi.cn/mmdb/d2dad592c7e7e18ea367cbf41b1c2d9ec19bf.jpg?imageView2/1/w/160/h/220", "title": "机器人总动员", "actor": "本·贝尔特,艾丽莎·奈特,杰夫·格尔林", "time": "2008-06-27(美国)", "score": "9.3"} +{"index": "45", "image": "https://p0.pipi.cn/mmdb/d2dad592b122ff030cecd8d73ffdbf3dd00a6.jpg?imageView2/1/w/160/h/220", "title": "超脱", "actor": "阿德里安·布劳迪,马西娅·盖伊·哈登,詹姆斯·凯恩", "time": "2011-04-25(美国)", "score": "8.7"} +{"index": "46", "image": "https://p0.pipi.cn/mmdb/d2dad592537c6950157e123dfde51c81b8c2d.jpg?imageView2/1/w/160/h/220", "title": "西西里的美丽传说", "actor": "莫妮卡·安娜·玛丽亚·贝鲁奇,朱塞佩·苏尔法罗,玛蒂尔德·皮亚纳", "time": "2000-10-26 00:00:00(意大利)", "score": "8.2"} +{"index": "47", "image": "https://p0.pipi.cn/mmdb/d2dad5927e10fabe1207ac9a7ae044e219c42.jpg?imageView2/1/w/160/h/220", "title": "海蒂和爷爷", "actor": "阿努克·斯特芬 ,布鲁诺·甘茨,昆林·艾格匹", "time": "2019-05-16", "score": "9.5"} +{"index": "48", "image": "https://p0.pipi.cn/mmdb/d2dad592b1251b7e12cbae29eea203381bfed.jpg?imageView2/1/w/160/h/220", "title": "本杰明·巴顿奇事", "actor": "布拉德·皮特,凯特·布兰切特,塔拉吉·P·汉森", "time": "2008-12-25(美国)", "score": "8.8"} +{"index": "49", "image": "https://p0.pipi.cn/mmdb/d2dad592c7e7e17a357df52dda71848f04ce1.jpg?imageView2/1/w/160/h/220", "title": "让子弹飞", "actor": "姜文,周润发,葛优", "time": "2010-12-16", "score": "8.5"} +{"index": "50", "image": "https://p0.pipi.cn/mmdb/d2dad592c7e7e1d236cf3e01b1fe245508691.jpg?imageView2/1/w/160/h/220", "title": "一一", "actor": "吴念真,金燕玲,李凯莉", "time": "2017-07-28(中国台湾)", "score": "8.9"} +{"index": "91", "image": "https://p0.pipi.cn/mmdb/d2dad592c7e7e111e55bf165a69f4403a0815.jpg?imageView2/1/w/160/h/220", "title": "蝙蝠侠:黑暗骑士", "actor": "克里斯蒂安·贝尔,希斯·莱杰,阿伦·伊克哈特", "time": "2008-07-14(阿根廷)", "score": "9.3"} +{"index": "21", "image": "https://p0.pipi.cn/mmdb/d2dad592c7e7e1ecd8b5352321a661031cdb4.jpg?imageView2/1/w/160/h/220", "title": "少年派的奇幻漂流", "actor": "苏拉·沙玛,伊尔凡·可汗,塔布", "time": "2012-11-22", "score": "9.0"} +{"index": "92", "image": "https://p0.pipi.cn/mmdb/d2dad592c7e7e167cb338fb55ddbf0d717c02.jpg?imageView2/1/w/160/h/220", "title": "两杆大烟枪", "actor": "杰森·弗莱明,德克斯特·弗莱彻,杰森·斯坦森", "time": "1998-08-28(英国)", "score": "8.7"} +{"index": "93", "image": "https://p0.pipi.cn/mmdb/d2dad5920307e1ddd2cbae05128c66c6920a3.jpg?imageView2/1/w/160/h/220", "title": "波西米亚狂想曲", "actor": "拉米·马雷克,本·哈迪,约瑟夫•梅泽罗", "time": "2019-03-22", "score": "9.4"} +9-04-29", "score": "9.3"} +{"index": "23", "image": "https://p0.pipi.cn/mmdb/d2dad592e7a0e1537c3139c28ec3b5def86ae.jpg?imageView2/1/w/160/h/220", "title": "摔跤吧!爸爸", "actor": "阿米尔·汗,沙克希·坦沃,法缇玛·萨那·纱卡", "time": "2017-05-05", "score": "9.8"} +{"index": "24", "image": "https://p0.pipi.cn/mmdb/d2dad592b1292339dd3ba33d59455219d179e.jpg?imageView2/1/w/160/h/220", "title": "忠犬八公的故事", "actor": "Forest,理查·基尔,琼·艾伦", "time": "2009-06-13(美国)", "score": "9.3"} +ore": "8.6"} +{"index": "95", "image": "https://p0.pipi.cn/mmdb/d2dad592c7e7e1d23616bd136d7b8bd905e71.jpg?imageView2/1/w/160/h/220", "title": "真爱至上", "actor": "休·格兰特,比尔·奈伊,连姆·尼森", "time": "2003-11-21(英国)", "score": "8.6"} +{"index": "25", "image": "https://p0.pipi.cn/mmdb/25bfd6927a37e1d23c92359b8bc611a4cd8a2.jpg?imageView2/1/w/160/h/220", "title": "放牛班的春天", "actor": "热拉尔·朱诺,弗朗西斯·贝尔兰德,凯德·麦拉德", "time": "2004-10-16", "score": "9.5"} +{"index": "96", "image": "https://p0.pipi.cn/mmdb/d2dad592b1251b2ff7be12b77068890525bd4.jpg?imageView2/1/w/160/h/220", "title": "傲慢与偏见", "actor": "马修·麦克费登,吉娜·马隆,妲露拉·莱莉", "time": "2008-02-10", "score": "8.4"} +{"index": "26", "image": "https://p0.pipi.cn/mmdb/d2dad592537923d23c030cd4e3674a1227733.jpg?imageView2/1/w/160/h/220", "title": "小丑", "actor": "杰昆·菲尼克斯,罗伯特·德尼罗,亚历克·鲍德温", "time": "2019-10-04(美国)", "score": "8.6"} +{"index": "97", "image": "https://p0.pipi.cn/mmdb/d2dad592b125bf313906d638156e7821539c4.jpg?imageView2/1/w/160/h/220", "title": "模仿游戏", "actor": "本尼迪克特·康伯巴奇,凯拉·奈特莉,马修·古迪", "time": "2015-07-21", "score": "9.3"} +{"index": "27", "image": "https://p0.pipi.cn/mmdb/d2dad592c7e7e111e51789a5566c623326832.jpg?imageView2/1/w/160/h/220", "title": "当幸福来敲门", "actor": "威尔·史密斯,贾登·史密斯,坦迪·牛顿", "time": "2008-01-17", "score": "9.3"} +{"index": "98", "image": "https://p0.pipi.cn/mmdb/d2dad5927e10fa87a93ba337d56c4789668c1.jpg?imageView2/1/w/160/h/220", "title": "血战钢锯岭", "actor": "安德鲁·加菲尔德,雨果·维文,卢克·布雷西", "time": "2016-12-08", "score": "9.3"} +{"index": "99", "image": "https://p0.pipi.cn/mmdb/d2dad592b1251b06d6395bef1abdc4f5361f4.jpg?imageView2/1/w/160/h/220", "title": "致命魔术", "actor": "休·杰克曼,克里斯蒂安·贝尔,迈克尔·凯恩", "time": "2006-10-17(意大利)", "score": "8.8"} +{"index": "100", "image": "https://p0.pipi.cn/mmdb/d2dad592c7e7e1d2367e121e1af566d697702.jpg?imageView2/1/w/160/h/220", "title": "鬼子来了", "actor": "姜文,姜宏波,陈强", "time": "2000-05-13(法国)", "score": "8.9"} +{"index": "29", "image": "https://p0.pipi.cn/mmdb/d2dad592c7e7e1537c21f0af64bd3585038d7.jpg?imageView2/1/w/160/h/220", "title": "三傻大闹宝莱坞", "actor": "阿米尔·汗,卡琳娜·卡普,马德哈万", "time": "2011-12-08", "score": "9.1"} +{"index": "30", "image": "https://p0.pipi.cn/mmdb/d2dad592b122ff7a357df5d2476a1d41663e0.jpg?imageView2/1/w/160/h/220", "title": "熔炉", "actor": "孔刘,郑裕美,金智英", "time": "2011-09-22(韩国)", "score": "8.8"} +{"index": "51", "image": "https://p0.pipi.cn/mmdb/d2dad5927e10fa71f78d33470ecb88087bd4a.jpg?imageView2/1/w/160/h/220", "title": "海边的曼彻斯特", "actor": "卡西·阿弗莱克,卢卡斯·赫奇斯,米歇尔·威廉姆斯", "time": "2017-08-25", "score": "8.8"} +{"index": "52", "image": "https://p0.pipi.cn/mmdb/d2dad592b125bf21f0af338935c91623abaad.jpg?imageView2/1/w/160/h/220", "title": "布达佩斯大饭店", "actor": "拉尔夫·费因斯,托尼·雷沃罗利,西尔莎·罗南", "time": "2014-02-06(德国)", "score": "8.7"} +{"index": "53", "image": "https://p0.pipi.cn/mmdb/25bfd62f92306d71f7ddd23a13b6ae6af4674.jpg?imageView2/1/w/160/h/220", "title": "阿凡达", "actor": "萨姆·沃辛顿,佐伊·索尔达娜,米歇尔·罗德里格兹", "time": "2010-01-04", "score": "9.4"} +{"index": "54", "image": "https://p0.pipi.cn/mmdb/d2dad592c7e7e1d23657e268fd60af640538a.jpg?imageView2/1/w/160/h/220", "title": "美国往事", "actor": "罗伯特·德尼罗,詹姆斯·伍兹,伊丽莎白·麦戈文", "time": "2015-04-23", "score": "9.1"} +{"index": "55", "image": "https://p0.pipi.cn/mmdb/d2dad592c7e7e13139230f3433fa2b4881172.jpg?imageView2/1/w/160/h/220", "title": "美丽心灵", "actor": "罗素·克劳,詹妮弗·康纳利,艾德·哈里斯", "time": "2001-12-13(美国)", "score": "8.8"} +{"index": "56", "image": "https://p0.pipi.cn/mmdb/d2dad592c7e7e1be2a0e13a446fd05d3d1738.jpg?imageView2/1/w/160/h/220", "title": "乱世佳人", "actor": "费雯·丽,克拉克·盖博,奥利维娅·德哈维兰", "time": "1939-12-15(美国)", "score": "9.1"} +{"index": "57", "image": "https://p0.pipi.cn/mmdb/d2dad592c7e7e1d2365bf147f36df9fbe38e7.jpg?imageView2/1/w/160/h/220", "title": "搏击俱乐部", "actor": "爱德华·哈里森·诺顿,布拉德·皮特,海伦娜·伯翰·卡特", "time": "1999-09-10(意大利)", "score": "8.7"} +{"index": "58", "image": "https://p0.pipi.cn/mmdb/d2dad592b125bf9257281e7e0dca86c26545a.jpg?imageView2/1/w/160/h/220", "title": "消失的爱人", "actor": "本·阿弗莱克,裴淳华,尼尔·帕特里克·哈里斯", "time": "2014-09-26(美国)", "score": "8.7"} +{"index": "59", "image": "https://p0.pipi.cn/mmdb/fb7386022ff3381789b860604cfd53eacf04c.jpg?imageView2/1/w/160/h/220", "title": "复仇者联盟4:终局之战", "actor": "小罗伯特·唐尼,克里斯·埃文斯,马克·鲁法洛", "time": "2019-04-24", "score": "9.1"} +{"index": "60", "image": "https://p0.pipi.cn/mmdb/d2dad592c7e7e1178951ba6bfd443eca4a899.jpg?imageView2/1/w/160/h/220", "title": "爱在黎明破晓前", "actor": "伊桑·霍克,朱莉·德尔佩,安德莉亚·埃克特", "time": "1995-01-27(美国)", "score": "8.7"} +{"index": "61", "image": "https://p0.pipi.cn/mmdb/d2dad592b1251b8ea302ff06b2bdab3ee19ea.jpg?imageView2/1/w/160/h/220", "title": "窃听风暴", "actor": "乌尔里希·穆埃,塞巴斯蒂安·科赫,马蒂娜·格德克", "time": "2006-03-23(德国)", "score": "9.0"} +{"index": "62", "image": "https://p0.pipi.cn/mmdb/d2dad592c7e7e12c95c696019ac91afe43bbe.jpg?imageView2/1/w/160/h/220", "title": "飞屋环游记", "actor": "爱德华·阿斯纳,克里斯托弗·普卢默,乔丹·长井", "time": "2009-08-04", "score": "8.9"} +{"index": "63", "image": "https://p0.pipi.cn/mmdb/d2dad592c7e7e1d2369ab433b0d2718a3e2ae.jpg?imageView2/1/w/160/h/220", "title": "低俗小说", "actor": "约翰·特拉沃尔塔,乌玛·瑟曼,塞缪尔·杰克逊", "time": "1994-05-21(法国)", "score": "8.7"} +{"index": "64", "image": "https://p0.pipi.cn/mmdb/d2dad592c7e7e1d236ecd834d112a6039efd5.jpg?imageView2/1/w/160/h/220", "title": "飞越疯人院", "actor": "杰克·尼科尔森,路易丝·弗莱彻,威尔·萨姆森", "time": "1975-11-19(美国)", "score": "8.8"} +{"index": "65", "image": "https://p0.pipi.cn/mmdb/d2dad592c7e7e1d2362c95cf3f5318319ded9.jpg?imageView2/1/w/160/h/220", "title": "天使爱美丽", "actor": "奥黛丽·塔图,马修·卡索维茨,吕菲斯", "time": "2001-04-25(比利时)", "score": "8.4"} +{"index": "66", "image": "https://p0.pipi.cn/mmdb/d2dad592c7e7e1d2361789abe36bef1670991.jpg?imageView2/1/w/160/h/220", "title": "蝴蝶效应", "actor": "约翰·帕特里克·阿梅多利,罗根·勒曼,卡梅隆·布莱特", "time": "2004-01-23(美国)", "score": "8.7"} +{"index": "67", "image": "https://p0.pipi.cn/mmdb/fb73867187ac7e313939dd8c6733a49ab9767.jpg?imageView2/1/w/160/h/220", "title": "大话西游之大圣娶亲", "actor": "周星驰,朱茵,莫文蔚", "time": "2014-10-24", "score": "8.8"} +{"index": "68", "image": "https://p0.pipi.cn/mmdb/fb738671be10fab860281ec0afaeb3403530a.jpg?imageView2/1/w/160/h/220", "title": "天空之城", "actor": "田中真弓,横泽启子,初井言荣", "time": "2023-06-01", "score": "9.5"} +{"index": "69", "image": "https://p0.pipi.cn/mmdb/25bfd65151bc690e13537c2009444a0c511b2.jpg?imageView2/1/w/160/h/220", "title": "无间道", "actor": "刘德华,梁朝伟,黄秋生", "time": "2003-09-05", "score": "9.1"} +{"index": "70", "image": "https://p0.pipi.cn/mmdb/25bfd6923383383ba30faf44c3c24cd3ceb46.png?imageView2/1/w/160/h/220", "title": "罗马假日", "actor": "格利高里·派克,奥黛丽·赫本,埃迪·艾伯特", "time": "1953-08-20(意大利)", "score": "9.0"} diff --git a/Proj1_maoyan/spider.py b/Proj1_maoyan/spider.py new file mode 100644 index 0000000..b7c967a --- /dev/null +++ b/Proj1_maoyan/spider.py @@ -0,0 +1,58 @@ +import requests +from requests.exceptions import RequestException +import re +import json +import os +from multiprocessing import Pool + +def get_one_page(url): + try: + response = requests.get(url) + if response.status_code == 200: + # print(response.encoding) 查看网页编码格式 + response.encoding = 'UTF-8' # 改变编码格式 + return response.text + return None + except RequestException: + return None + + +def parse_one_page(html): + pattern = re.compile( + '
(.*?)
.*?>(' + '.*?).*?(.*?).*?fraction">(.*?)', + re.S) + + items = re.findall(pattern, html) + for item in items: + yield { + 'index': item[0], + 'image': item[1], + 'title': item[2], + 'actor': item[3].strip()[3:], + 'time': item[4].strip()[5:], + 'score': item[5] + item[6] + } + + +def write_to_file(content): + with open('ou-files/maoyan.txt', 'a', encoding='utf-8') as f: + f.write(json.dumps(content, ensure_ascii=False) + '\n') + + +def main(offset): + url = 'https://www.maoyan.com/board/4?offset='+str(offset) + html = get_one_page(url) + for item in parse_one_page(html): + print(item) + write_to_file(item) + + +if __name__ == '__main__': + if os.path.exists('ou-files/maoyan.txt'): + os.remove('ou-files/maoyan.txt') + elif not os.path.exists('ou-files'): + os.mkdir('ou-files') + + pool = Pool() + pool.map(main, [i*10 for i in range(10)]) diff --git a/task3_taobao.py b/task3_taobao.py new file mode 100644 index 0000000..869ae9a --- /dev/null +++ b/task3_taobao.py @@ -0,0 +1,164 @@ +""" +实现登录淘宝网站,并输入搜索关键词查找商品,然后完成商品信息爬取,存储数据库 +数据库使用MONGO DB +""" +import json +import time + +from selenium import webdriver +from selenium.webdriver.common.by import By +from selenium.webdriver.support.ui import WebDriverWait as WDW +from selenium.webdriver.support import expected_conditions as EC + +from pyquery import PyQuery as PQ + +from dbConfig import * +import pymongo + +""" +配置数据库信息 +""" +client = pymongo.MongoClient(MONGO_CONN) +db = client[MONGO_DB] + +# options = webdriver.FirefoxOptions() +# options.add_argument('disable-blink-features=AutomationControlled') +browser = webdriver.Firefox() + +def test_login(): + # 淘宝登录 + browser.get('https://www.taobao.com') # 刚才网站输入错误 + # 等待页面加载,需要搜索按钮出现即可,等到时间设置为10秒钟 + e_search = WDW(browser, 10).until(EC.element_to_be_clickable((By.CSS_SELECTOR, '.btn-search'))) + + # 点击搜索按钮: 出现登录框 + e_search.click() + + # 如果初次登录,则在登录框中用手机扫码登录,并将cookie保存到本地,下次直接读取cookie登录 + time.sleep(30) # 留给扫码的时间 + + + # 获取cookies + log_cookies = browser.get_cookies() + + # cookies保存到本地 + with open('cookies/taobao_log_cookies', 'w') as f: + f.write(json.dumps(log_cookies)) + print('TaoBao cookies have been saved successfully') + + browser.close() + +def search(): + # 登录并搜索 + browser.get('https://taobao.com') + with open('cookies/taobao_log_cookies', 'r') as f: + log_cookies = json.loads(f.read()) + # 加载cookies + for cookie in log_cookies: + dict_cookies = { + 'domain': '.taobao.com', + 'name': cookie.get('name'), + 'value': cookie.get('value'), + 'path': '/', + 'expires': '', + 'sameSite': 'None', + 'secure': cookie.get('secure') + } + + browser.add_cookie(dict_cookies) # 这里注意缩进 + + try: + browser.get('https://taobao.com') # 这里需要再登录一下 + # 找到搜索框 + e_input = WDW(browser, 10).until( + EC.presence_of_element_located((By.CSS_SELECTOR, '#q')) + ) + + # 找到提交按钮 + e_submit = WDW(browser, 10).until( + EC.presence_of_element_located((By.CSS_SELECTOR, '.btn-search')) + ) + + # 加入停顿 + time.sleep(2) + e_input.send_keys('GPU') + time.sleep(2) + e_submit.click() + + # 当下一页按钮出现时,返回页面内容 + tot_page = WDW(browser, 10).until( + EC.presence_of_element_located((By.CSS_SELECTOR, 'button.next-btn:nth-child(11)')) + ) + return tot_page.text + + except TimeoutError: + print('Time Out') + return search() + + +# 翻页逻辑 +def next_page(page_number): + # 定位下一页输入栏 + e_input = WDW(browser, 10).until( + EC.presence_of_element_located((By.CSS_SELECTOR, 'span.next-input:nth-child(6) > input:nth-child(1)')) + ) + + # 下一页确定按钮 + e_submit = WDW(browser, 10).until( + EC.presence_of_element_located((By.CSS_SELECTOR, '.next-pagination-jump-go')) + ) + + time.sleep(2) + e_input.clear() + e_input.send_keys(page_number) + e_submit.click() + + +# 获取商品详细信息 +def get_product(): + WDW(browser, 10).until( + EC.presence_of_element_located((By.CSS_SELECTOR, 'li.next-tabs-tab:nth-child(1) > div:nth-child(1)')) + ) + + time.sleep(2) + + html = browser.page_source # 获取网页源代码 + doc = PQ(html) + items = doc('div[class^="Card--doubleCard"]').items() + + for item in items: + product = { + 'name': item.find('div[class^="Title--title"] span').text(), + 'image': item.find('img').attr('src'), + 'price': item.find('div[class^="Price--priceWrapper"] span[class^="Price--priceInt"]').text() + item.find( + 'div[class^="Price--priceWrapper"] span[class^="Price--priceFloat"]').text(), + 'deal': item.find('div[class^="Price--priceWrapper"] span[class^="Price--realSales"]').text()[:-3], + 'source': item.find('span[class^="Price--procity"]').text() + } + print(product) # 输出商品详情 + save_in_mongo(product) + + +# 数据保存到MongoDB数据库中:数据库配置文件 dbConfig.py +def save_in_mongo(res): + try: + if db[MONGO_TABLE].insert_one(res): + print('Insert to Mongo DB successfully') + except Exception as err: + print('Store Error') + print(err) + + +def main(): + tot_page = int(search()) + if tot_page >=2: + for i in range(1, min(tot_page, 11)): + print('Get page: ', i) + get_product() + next_page(i) + + browser.close() + + +if __name__ == '__main__': + main() \ No newline at end of file