代码地址如下:
http://www.demodashi.com/demo/14313.html

python一键电影搜索与下载

概述

使用python搜索并爬取豆瓣电影信息,包括评分,主演,导演,类型,上映时间,电影简介等信息,然后再从电影天堂搜索并爬取电影下载链接.

准备工作

安装python3.6

安装requests库(用于请求静态页面)

  1. pip install requests -i https://mirrors.ustc.edu.cn/pypi/web/simple

安装lxml库(用于解析html文件)

  1. pip install lxml -i https://mirrors.ustc.edu.cn/pypi/web/simple

本教程爬取的电影信息来自豆瓣电影,下载链接来自电影天堂

  1. https://movie.douban.com/j/subject_suggest?q=电影名称
  2. http://s.ygdy8.com/plus/so.php?keytype=0&pagesize=10&searchtype=title&keyword=电影名称

页面分析

豆瓣电影搜索

豆瓣电影搜索的链接如下:

  1. https://movie.douban.com/j/subject_suggest?q=电影名称

只需要一个参数q,它的值是utf-8编码的电影名称,比如我们要搜索 星际穿越 相关信息, 其中 %e6%98%9f%e9%99%85%e7%a9%bf%e8%b6%8a星际穿越 的url格式的utf-8编码.:

  1. https://movie.douban.com/j/subject_suggest?q=%e6%98%9f%e9%99%85%e7%a9%bf%e8%b6%8a

服务器返回的搜索结果是一个json文件 subject_suggest.json ,如下:

  1. [
  2. {
  3. "episode" : "",
  4. "id" : "1889243",
  5. "img" : "https://img3.doubanio.com/view/photo/s_ratio_poster/public/p2206088801.jpg",
  6. "sub_title" : "Interstellar",
  7. "title" : "星际穿越",
  8. "type" : "movie",
  9. "url" : "https://movie.douban.com/subject/1889243/?suggest=%E6%98%9F%E9%99%85%E7%A9%BF%E8%B6%8A",
  10. "year" : "2014"
  11. },
  12. {
  13. "episode" : "",
  14. "id" : "26263467",
  15. "img" : "https://img3.doubanio.com/view/photo/s_ratio_poster/public/p2445481443.jpg",
  16. "sub_title" : "The Science of Interstellar",
  17. "title" : "《星际穿越》中的科学",
  18. "type" : "movie",
  19. "url" : "https://movie.douban.com/subject/26263467/?suggest=%E6%98%9F%E9%99%85%E7%A9%BF%E8%B6%8A",
  20. "year" : "2014"
  21. },
  22. {
  23. "episode" : "",
  24. "id" : "26255844",
  25. "img" : "https://img3.doubanio.com/view/photo/s_ratio_poster/public/p2519643575.jpg",
  26. "sub_title" : "Interstellar: Nolan's Odyssey",
  27. "title" : "星际穿越:诺兰的奥德赛",
  28. "type" : "movie",
  29. "url" : "https://movie.douban.com/subject/26255844/?suggest=%E6%98%9F%E9%99%85%E7%A9%BF%E8%B6%8A",
  30. "year" : "2014"
  31. }
  32. ]

共搜索到了3个与 星际穿越 相关的结果,其中我们需要关注的有:

key 含义
title 标题
sub_title 子标题(英文标题)
url 详情链接

我们需要再次打开搜索结果中对应的电影详情链接,获取电影的评分,导演,主演,类型,上映时间,简介,影评等信息.

比如我们打开搜索结果的第一项,结果如下:

我们打开它的源码看看(按F12打开调试):

可以看到其head中的一个标签 *** /html/head/script[@type="application/ld+json"] *** 中存放的是一个json文件,这个json中就包含了我们需要的所有电影信息,提取出来如下:

  1. {
  2. "@context": "http://schema.org",
  3. "name": "星际穿越 Interstellar",
  4. "url": "/subject/1889243/",
  5. "image": "https://img3.doubanio.com/view/photo/s_ratio_poster/public/p2206088801.jpg",
  6. "director":
  7. [
  8. {
  9. "@type": "Person",
  10. "url": "/celebrity/1054524/",
  11. "name": "克里斯托弗·诺兰 Christopher Nolan"
  12. }
  13. ]
  14. ,
  15. "author":
  16. [
  17. {
  18. "@type": "Person",
  19. "url": "/celebrity/1275104/",
  20. "name": "乔纳森·诺兰 Jonathan Nolan"
  21. }
  22. ,
  23. {
  24. "@type": "Person",
  25. "url": "/celebrity/1054524/",
  26. "name": "克里斯托弗·诺兰 Christopher Nolan"
  27. }
  28. ,
  29. {
  30. "@type": "Person",
  31. "url": "/celebrity/1018568/",
  32. "name": "基普·索恩 Kip Thorne"
  33. }
  34. ]
  35. ,
  36. "actor":
  37. [
  38. {
  39. "@type": "Person",
  40. "url": "/celebrity/1040511/",
  41. "name": "马修·麦康纳 Matthew McConaughey"
  42. }
  43. ,
  44. {
  45. "@type": "Person",
  46. "url": "/celebrity/1048027/",
  47. "name": "安妮·海瑟薇 Anne Hathaway"
  48. }
  49. ,
  50. {
  51. "@type": "Person",
  52. "url": "/celebrity/1000225/",
  53. "name": "杰西卡·查斯坦 Jessica Chastain"
  54. }
  55. ,
  56. {
  57. "@type": "Person",
  58. "url": "/celebrity/1022593/",
  59. "name": "卡西·阿弗莱克 Casey Affleck"
  60. }
  61. ,
  62. {
  63. "@type": "Person",
  64. "url": "/celebrity/1054509/",
  65. "name": "迈克尔·凯恩 Michael Caine"
  66. }
  67. ,
  68. {
  69. "@type": "Person",
  70. "url": "/celebrity/1054443/",
  71. "name": "马特·达蒙 Matt Damon"
  72. }
  73. ,
  74. {
  75. "@type": "Person",
  76. "url": "/celebrity/1267954/",
  77. "name": "麦肯吉·弗依 Mackenzie Foy"
  78. }
  79. ,
  80. {
  81. "@type": "Person",
  82. "url": "/celebrity/1325862/",
  83. "name": "蒂莫西·柴勒梅德 Timothée Chalamet"
  84. }
  85. ,
  86. {
  87. "@type": "Person",
  88. "url": "/celebrity/1036407/",
  89. "name": "艾伦·伯斯汀 Ellen Burstyn"
  90. }
  91. ,
  92. {
  93. "@type": "Person",
  94. "url": "/celebrity/1027824/",
  95. "name": "约翰·利思戈 John Lithgow"
  96. }
  97. ,
  98. {
  99. "@type": "Person",
  100. "url": "/celebrity/1049518/",
  101. "name": "韦斯·本特利 Wes Bentley"
  102. }
  103. ,
  104. {
  105. "@type": "Person",
  106. "url": "/celebrity/1201851/",
  107. "name": "大卫·吉雅西 David Gyasi"
  108. }
  109. ,
  110. {
  111. "@type": "Person",
  112. "url": "/celebrity/1113911/",
  113. "name": "比尔·欧文 Bill Irwin"
  114. }
  115. ,
  116. {
  117. "@type": "Person",
  118. "url": "/celebrity/1010536/",
  119. "name": "托弗·戈瑞斯 Topher Grace"
  120. }
  121. ,
  122. {
  123. "@type": "Person",
  124. "url": "/celebrity/1313709/",
  125. "name": "科莱特·沃夫 Collette Wolfe"
  126. }
  127. ,
  128. {
  129. "@type": "Person",
  130. "url": "/celebrity/1330971/",
  131. "name": "弗朗西斯·X·麦卡蒂 Francis X. McCarthy"
  132. }
  133. ,
  134. {
  135. "@type": "Person",
  136. "url": "/celebrity/1344601/",
  137. "name": "安德鲁·博尔巴 Andrew Borba"
  138. }
  139. ,
  140. {
  141. "@type": "Person",
  142. "url": "/celebrity/1004844/",
  143. "name": "乔什·斯图沃特 Josh Stewart"
  144. }
  145. ,
  146. {
  147. "@type": "Person",
  148. "url": "/celebrity/1202795/",
  149. "name": "莱雅·卡里恩斯 Leah Cairns"
  150. }
  151. ,
  152. {
  153. "@type": "Person",
  154. "url": "/celebrity/1338863/",
  155. "name": "利亚姆·迪金森 Liam Dickinson"
  156. }
  157. ,
  158. {
  159. "@type": "Person",
  160. "url": "/celebrity/1274631/",
  161. "name": "杰夫·赫普内尔 Jeff Hephner"
  162. }
  163. ,
  164. {
  165. "@type": "Person",
  166. "url": "/celebrity/1045604/",
  167. "name": "伊莱耶斯·加贝尔 Elyes Gabel"
  168. }
  169. ,
  170. {
  171. "@type": "Person",
  172. "url": "/celebrity/1018020/",
  173. "name": "布鲁克·史密斯 Brooke Smith"
  174. }
  175. ,
  176. {
  177. "@type": "Person",
  178. "url": "/celebrity/1000231/",
  179. "name": "大卫·奥伊罗 David Oyelowo"
  180. }
  181. ,
  182. {
  183. "@type": "Person",
  184. "url": "/celebrity/1055380/",
  185. "name": "威廉姆·德瓦内 William Devane"
  186. }
  187. ,
  188. {
  189. "@type": "Person",
  190. "url": "/celebrity/1366207/",
  191. "name": "拉什·费加 Russ Fega"
  192. }
  193. ,
  194. {
  195. "@type": "Person",
  196. "url": "/celebrity/1344602/",
  197. "name": "格里芬·弗雷泽 Griffen Fraser"
  198. }
  199. ,
  200. {
  201. "@type": "Person",
  202. "url": "/celebrity/1344603/",
  203. "name": "弗洛拉·诺兰 Flora Nolan"
  204. }
  205. ]
  206. ,
  207. "datePublished": "2014-11-07",
  208. "genre": ["\u5267\u60c5", "\u79d1\u5e7b", "\u5192\u9669"],
  209. "duration": "PT2H49M",
  210. "description": "近未来的地球黄沙遍野,小麦、秋葵等基础农作物相继因枯萎病灭绝,人类不再像从前那样仰望星空,放纵想象力和灵感的迸发,而是每日在沙尘暴的肆虐下倒数着所剩不多的光景。在家务农的前NASA宇航员库珀(马修·麦...",
  211. "@type": "Movie",
  212. "aggregateRating": {
  213. "@type": "AggregateRating",
  214. "ratingCount": "638995",
  215. "bestRating": "10",
  216. "worstRating": "2",
  217. "ratingValue": "9.2"
  218. }
  219. }
key 含义
name 电影名称
director 电影导演
author 主要演员
datePublished 上映时间
genre 电影类型
description 电影简介
aggregateRating[ratingValue] 电影评分

电影天堂搜索

豆瓣电影搜索的链接如下:

  1. http://s.ygdy8.com/plus/so.php?keytype=0&pagesize=10&searchtype=title&keyword=电影名称

只需要一个参数q,它的值是utf-8编码的电影名称,比如我们要搜索 星际穿越 相关信息. 其中 %D0%C7%BC%CA%B4%A9%D4%BD星际穿越 的url格式的gb2312编码::

  1. http://s.ygdy8.com/plus/so.php?keytype=0&keyword=%D0%C7%BC%CA%B4%A9%D4%BD

服务器返回的搜索结果是一个html页面其中只有第一项是我们想要的结果,如下:

按F12打开调试可以看到,搜索结果列表包含在一个 class="co_content8" 的div标签中.搜索结果的标题对应的链接就是电影详情页面,其中无用的广告页面的链接中包含 game ,我们可以据此过滤掉不想要的结果.

打开电影详情页面,可以看到下载链接包含在一个 bgcolor="#fdfddf" 的table中:

源码详解

使用requests下载静态html页面

该函数用于下载图集列表页面,这个页面是静态的,可以直接通过 requests.get(url) 函数抓取。但是有一点需要注意,为了把我们的爬虫伪装成正常的浏览器请求,避免我们的爬虫被服务器禁止,我们需要给 requests 添加http请求头,其中包含伪造的 User-Agent 浏览器标识

  1. def download_page_html(url, sel=0):
  2. phtml = None
  3. page = None
  4. try:
  5. requests_header["Host"] = host_cookie[sel][0]
  6. requests_header["Cookie"] = host_cookie[sel][1]
  7. # 选择一个随机的User-Agent
  8. requests_header["User-Agent"] = random.choice(user_agent_list)
  9. # print(requests_header["User-Agent"])
  10. # print(requests_header)
  11. page = requests.get(url=url, headers=requests_header, timeout=15) # 请求指定的页面
  12. # print(page.encoding)
  13. if page.encoding == "ISO-8859-1":
  14. page.encoding = "gb2312" # 转换页面的编码为gb2312(避免中文乱码)
  15. phtml = page.text # 提取请求结果中包含的html文本
  16. # print("requests success")
  17. except requests.exceptions.RequestException as e:
  18. print("requests error:", e)
  19. phtml = None
  20. finally:
  21. if page != None:
  22. page.close()
  23. return phtml

从豆瓣电影上搜索并下载电影信息

该函数用于根据指定的电影名称,从豆瓣电影服务器上搜索电影,解析搜索结果并显示,然后根据输入显示指定搜索结果的详情.

  1. def movie_douban(mvsearch_name):
  2. DOUBANMV_SEARCH_URL = "https://movie.douban.com/j/subject_suggest"
  3. DOUBANMV_SEARCH_PAR = {"q": ""}
  4. # mvsearch_name = "星际迷航"
  5. if mvsearch_name == None:
  6. return -1
  7. DOUBANMV_SEARCH_PAR["q"] = mvsearch_name
  8. # url参数编码
  9. mvsearch_par = parse.urlencode(DOUBANMV_SEARCH_PAR, encoding="utf-8")
  10. # print(mvsearch_par)
  11. mvsearch_url = "{0}?{1}".format(DOUBANMV_SEARCH_URL, mvsearch_par)
  12. # print(mvsearch_url)
  13. # 下载指定url
  14. mvsearch_html = download_page_html(mvsearch_url, 2)
  15. if mvsearch_html == None:
  16. print("下载出错,可能IP被服务器封禁,可稍后再试!")
  17. return -1
  18. # 解析下载的结果(json格式)
  19. try:
  20. mvsearch_json = json.loads(mvsearch_html)
  21. except json.JSONDecodeError as e:
  22. print("出现错误:", e)
  23. return -1
  24. if mvsearch_json == None or len(mvsearch_json) == 0:
  25. print("解析出错!")
  26. return -1
  27. # print(mvsearch_json)
  28. # 输出解析结果
  29. print("共找到", len(mvsearch_json), "个关于", mvname, "的结果: ")
  30. for i in range(len(mvsearch_json)):
  31. print("\t", i+1, mvsearch_json[i]["title"],
  32. "/", mvsearch_json[i]["sub_title"])
  33. # 选择需要查看的项
  34. search_sel = input("请选择需要查看的项:")
  35. if search_sel.isdigit() != True:
  36. print("输入有误!")
  37. return -1
  38. search_sel = int(search_sel)
  39. if search_sel > len(mvsearch_json) or search_sel < 1:
  40. print("输入有误!")
  41. return -1
  42. search_sel = search_sel - 1
  43. # 获取需要查看的项的url,下载需要查看的项
  44. mvcontent_url = mvsearch_json[search_sel]["url"]
  45. mvcontent_html = download_page_html(mvcontent_url, 2)
  46. # 解析需要查看的项
  47. doubanmv_etree_html = lxml.html.fromstring(mvcontent_html)
  48. mvcontent_xpath = '/html/head//script[@type="application/ld+json"]/text()'
  49. mvcontent_text = doubanmv_etree_html.xpath(mvcontent_xpath)
  50. if mvcontent_text == None or len(mvcontent_text) == 0:
  51. print("解析出错")
  52. return -1
  53. mvcontent_text[0] = mvcontent_text[0].replace("\n", "") # 替换掉json字符串中的\n
  54. try:
  55. mvcontent_json = json.loads(mvcontent_text[0])
  56. except json.JSONDecodeError as e:
  57. print("解析出错:", e)
  58. return -1
  59. if mvcontent_json == None or len(mvcontent_json) == 0:
  60. print("解析出错")
  61. return -1
  62. # 输出电影详情
  63. print("\t电影名称", mvcontent_json["name"])
  64. # 合并显示电影类型
  65. mvcontent_genre = mvcontent_json["genre"]
  66. mvcontent_genre_str = ""
  67. for lst in mvcontent_genre:
  68. mvcontent_genre_str += (lst + "/")
  69. print("\t电影类型", mvcontent_genre_str)
  70. print("\t上映时间", mvcontent_json["datePublished"])
  71. print("\t豆瓣评分", mvcontent_json["aggregateRating"]["ratingValue"],
  72. "(", mvcontent_json["aggregateRating"]["ratingCount"], ")")
  73. print("\t电影导演", mvcontent_json["director"][0]["name"])
  74. # 合并显示电影主演(只显示前5个)
  75. mvcontent_actor = mvcontent_json["actor"]
  76. mvcontent_actor_str = ""
  77. mvcontent_actor_len = 0
  78. for lst in mvcontent_actor:
  79. mvcontent_actor_str += (lst["name"] + "/")
  80. mvcontent_actor_len += 1
  81. if mvcontent_actor_len > 5:
  82. mvcontent_actor_str += "..."
  83. break
  84. print("\t电影主演", mvcontent_actor_str)
  85. print("\t电影简述", mvcontent_json["description"])
  86. return 0

从电影天堂上搜索并提取电影下载链接

该函数用于根据指定的电影名称,从电影天堂服务器上搜索电影,解析搜索结果并显示,然后根据输入显示指定搜索结果的下载链接.

  1. def movie_tiantang(mvsearch_name):
  2. MVSEARCH_URL = "http://s.ygdy8.com/plus/so.php"
  3. MVSEARCH_PAR = {"kwtype": "0", "searchtype": "title",
  4. "pagesize": "100", "keyword": ""}
  5. MOVIE_URL = "http://www.ygdy8.com"
  6. # mvsearch_name = "星球大战"
  7. # mvsearch_name = input("请输入电影名称(输入\"exit\"退出):")
  8. if mvsearch_name == None:
  9. print("输入有误!")
  10. return -1
  11. # print("你输入的电影名称为:", mvsearch_name)
  12. # 搜索电影
  13. MVSEARCH_PAR["keyword"] = mvsearch_name
  14. mvsearch_par = parse.urlencode(MVSEARCH_PAR, encoding="gb2312")
  15. # print(mvsearch_par)
  16. mvsearch_url = "{0}?{1}".format(MVSEARCH_URL, mvsearch_par)
  17. # print(mvsearch_url)
  18. mvsearch_html = download_page_html(mvsearch_url, 0)
  19. if mvsearch_html == None:
  20. print("下载出错,可能IP被服务器封禁,可稍后再试!")
  21. return -1
  22. # print(mvsearch_html)
  23. # 获取搜索结果列表
  24. etree_html = lxml.html.fromstring(mvsearch_html)
  25. mvsearch_xpath = '//div[@class="co_content8"]/ul/tr/td/table[@width="100%"]'
  26. mvsearch_list = etree_html.xpath(mvsearch_xpath)
  27. # print(mvsearch_list)
  28. if len(mvsearch_list) == 0:
  29. print("未搜索到任何内容")
  30. return -1
  31. # print("共找到", len(mvsearch_list), "个关于", mvsearch_name, "的结果:")
  32. mvcontent_url = []
  33. mvcontent_title = []
  34. # 提取搜索结果中的电影链接
  35. mvsearch_list_len = len(mvsearch_list)
  36. for idx in range(1, mvsearch_list_len+1):
  37. # 提取链接
  38. mv_title_url = etree_html.xpath(
  39. mvsearch_xpath + '[{0}]//a[@href]/@href'.format(idx))
  40. # print(mv_title_url)
  41. if mv_title_url == None:
  42. print("解析出错!")
  43. return -1
  44. # 过滤掉游戏
  45. if mv_title_url[0].find("/html/game/") < 0:
  46. mv_title_url = "{0}{1}".format(MOVIE_URL, mv_title_url[0])
  47. mvcontent_url.insert(idx-1, mv_title_url)
  48. # 提取标题
  49. mv_title_str_lst = etree_html.xpath(
  50. mvsearch_xpath + '[{0}]//a[@href]//text()'.format(idx))
  51. if mv_title_str_lst == None:
  52. print("解析出错!")
  53. return -1
  54. mv_title_str = "".join(mv_title_str_lst)
  55. mvcontent_title.insert(idx-1, mv_title_str)
  56. # print("\t{0}, {1}, {2}".format(idx, mv_title_str, mv_title_url))
  57. mvcontent_len = len(mvcontent_url)
  58. if mvcontent_len == 0:
  59. print("未搜索到有效结果!")
  60. return -1
  61. # print("其中", mvcontent_len, "个有效结果:")
  62. print("共找到", mvcontent_len, "个关于", mvsearch_name, "的下载:")
  63. for idx in range(mvcontent_len):
  64. print("\t", idx+1, ", ",
  65. mvcontent_title[idx], ", ", mvcontent_url[idx])
  66. # 打开电影详情页面
  67. mvcontent_sel = input("请选择需要下载的项:")
  68. if mvcontent_sel.isdigit() != True:
  69. print("输入有误!")
  70. return -1
  71. mvcontent_sel = int(mvcontent_sel)
  72. if mvcontent_sel > mvcontent_len or mvcontent_sel < 1:
  73. print("输入有误!")
  74. return -1
  75. mvcontent_sel = mvcontent_sel - 1
  76. # 下载电影详情页面
  77. # print("即将下载: ", mvcontent_title[mvcontent_sel],
  78. # ", " + mvcontent_url[mvcontent_sel])
  79. mvcontent_html = download_page_html(mvcontent_url[mvcontent_sel], 1)
  80. # print(mvcontent_html)
  81. if mvcontent_html == None:
  82. print("下载出错,可能IP被服务器封禁,可稍后再试!")
  83. return -1
  84. # 提取电影下载链接
  85. mvcontent_etree_html = lxml.html.fromstring(mvcontent_html)
  86. # '//div[@id="Zoom"]/table/tr/td/table'
  87. mvcontent_xpath = '//td[@bgcolor="#fdfddf"]'
  88. mvcontent_dwurl_lst = []
  89. mvcontent_urllst = mvcontent_etree_html.xpath(
  90. mvcontent_xpath + "//a[@href]/text()")
  91. if mvcontent_urllst == None:
  92. print("解析出错!")
  93. return -1
  94. for url in mvcontent_urllst:
  95. mvcontent_dwurl_lst.append(url)
  96. if mvcontent_dwurl_lst == None:
  97. print("未找到下载链接!")
  98. return -1
  99. # print("共找到", len(mvcontent_dwurl_lst), "个下载链接:")
  100. for dwurl in mvcontent_dwurl_lst:
  101. print("\t", dwurl)
  102. return 0

程序运行方法

打开命令行,定位到源码所在目录,然后输入 python py_movie.py ,回车运行

程序运行截图

项目文件截图

python一键电影搜索与下载

代码地址如下:
http://www.demodashi.com/demo/14313.html

注:本文著作权归作者,由demo大师代发,拒绝转载,转载需要作者授权

python一键电影搜索与下载的更多相关文章

  1. Python爬虫全网搜索并下载音乐

    现在写一篇博客总是喜欢先谈需求或者本内容的应用场景,是的,如果写出来的东西没有任何应用价值,确实也没有实际意义.今天的最早的需求是来自于如何免费[白嫖]下载全网优质音乐,我去b站上面搜索到了一个大牛做 ...

  2. 一篇文章教会你利用Python网络爬虫获取电影天堂视频下载链接

    [一.项目背景] 相信大家都有一种头疼的体验,要下载电影特别费劲,对吧?要一部一部的下载,而且不能直观的知道最近电影更新的状态. 今天小编以电影天堂为例,带大家更直观的去看自己喜欢的电影,并且下载下来 ...

  3. python根据搜索词下载百度图片

    # coding=utf-8 """根据搜索词下载百度图片""" import re import urllib import os def ...

  4. Python实战:美女图片下载器,海量图片任你下载

    Python应用现在如火如荼,应用范围很广.因其效率高开发迅速的优势,快速进入编程语言排行榜前几名.本系列文章致力于可以全面系统的介绍Python语言开发知识和相关知识总结.希望大家能够快速入门并学习 ...

  5. Python及其常用模块库下载及安装

    一.Python下载:https://www.python.org/downloads/ 二.Python模块下载:http://www.lfd.uci.edu/~gohlke/pythonlibs/ ...

  6. 用Python一键搭建Http服务器的方法

    用Python一键搭建Http服务器的方法 Python3请看 python -m http.server 8000 & Python2请看 python -m SimpleHTTPServe ...

  7. 初学Python:Python的发展历史及下载安装

    Python作为一种计算机程序设计语言,自20世纪90年代初诞生至如今被人们逐渐悉知,经过版本更新以及功能添加,已广泛应用于各种独立的.大型项目的开发.Python 已经成为最受欢迎的程序设计语言之一 ...

  8. EasyIcon:免费图标搜索和下载平台

    EasyIcon是一个为设计师提供免费图标搜索和下载服务的网站. 步骤如下: 第一步,打开EasyIcon网站主页: http://www.easyicon.net/ 第二步,在EasyIcon网站的 ...

  9. python爬虫之小说网站--下载小说(正则表达式)

    python爬虫之小说网站--下载小说(正则表达式) 思路: 1.找到要下载的小说首页,打开网页源代码进行分析(例:https://www.kanunu8.com/files/old/2011/244 ...

随机推荐

  1. android 管理手机短信

    为了看代码方便,一边在网上google资料,一边看Android java 源代码. 偶然发现了一个类MmsSmsDatabaseHelper.java,原来android将所有的短信信息都存入了mm ...

  2. CSDN积分规则具体解释--【叶子】

    前记:在CSDN的社区支持板块,常常看到有人提问,为什么有积分却不能下载,此类问题层出不穷,而论坛的各种积分制度说明又非常分散,不便于寻找,为了方便新注冊用户高速了解论坛的积分规则,也为了降低社区支持 ...

  3. python urlopen SSL: CERTIFICATE_VERIFY_FAILED

    1.使用ssl创建未经验证的上下文,在urlopen中传入上下文参数 import sslimport urllib2 context = ssl._create_unverified_context ...

  4. 《JavaScript启示录》

    <JavaScript启示录> 基本信息 作者: (美)Cody Lindley 译者: 徐涛 出版社:人民邮电出版社 ISBN:9787115334947 上架时间:2014-2-21 ...

  5. 500 OOPS: vsftpd: cannot locate user specified in 'chown_username':whoever

    错误:500 OOPS: vsftpd: cannot locate user specified in 'chown_username':whoever解决方案:在vsftpd.conf中修改如下两 ...

  6. Ubuntu Linux自动发邮件配置及邮件发送脚本

    测试环境:Ubuntu 11.10 1. 安装mutt及msmtp软件 sudo apt-get install mutt sudo apt-get install msmtp 2. 编辑配置文件vi ...

  7. Search in Rotated Sorted Array II leetcode java

    题目: Follow up for "Search in Rotated Sorted Array": What if duplicates are allowed? Would ...

  8. java 切图 判断图片是否是纯色/彩色图片

    首先上切图的代码 /** * 图片剪裁 * @param x 距离左上角的x轴距离 * @param y 距离左上角的y轴距离 * @param width 宽度 * @param height 高度 ...

  9. 如何利用Framework模型生成IQD文件

    很多Cognos的新手在接触Transform建模的时候对于iqd文件都有一种朦胧的感觉,当然也不必去死记硬别它的格式,下面我们就来说一下如何用Framework工具来生成iqd文件. 1:打开fra ...

  10. 2015 -&gt; 2016

    2015年. 2015年前几个月,一直住在三亚,每天过着老年人般的生活. 每天吃饭睡觉看电视遛弯游泳.生活倒也满意. 4月份開始,从三亚一路开车回到上海,开开停停,最后享受了一次沿路的风景和满意. 5 ...