爬取学习强国视频小示例

  • 因为需要爬取的视频数量并不是很大,总共需要将131个视频下载下来,所以就直接去手动找找视频的地址和名称保存下来的。
  • 由于页面是动态加载的,所以我们无法在网站源码中直接找到视频的超链接。设想是可以用Selenium模拟浏览器点击进行动态加载获取视频链接和标题的,不过很久没有用Selenium了,就图简单偷点懒啦。
  • 所以以下代码就是用requests去直接请求mp4地址得到批量下载的结果的。
    在这里插入图片描述
    参考:https://zhuanlan.zhihu.com/p/132703833
# https://article.xuexi.cn/articles/video/index.html?art_id=294702920556063797
import requests
import osdef download_mp4_by_url(url, name, n):"""通过链接下载视频链接下载相应的mp4视频。:param url: mp4视频超链接。:param name: 视频保存的主题名:param n: 视频的顺序编号:return:"""headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 Edg/123.0.0.0"}video_data = requests.get(url, headers=headers).contentif not os.path.exists("./视频"):os.mkdir("./视频")with open(f"./视频/{n}.{name}.mp4", "wb") as f:f.write(video_data)print(f"正在下载第{n}个视频:{name}")def main():urlstr = """https://boot-video.xuexi.cn/video/1006/p/5fd0919e562a1eedd1a8f740849f491a-72ee9dcf0fa440d7b8974dbea2538d39-2.mp4,https://boot-video.xuexi.cn/video/1006/p/29057017b697b69ba089b141ffa7155b-72dba5794ada485fa36916ca6c4bb276-2.mp4,https://boot-video.xuexi.cn/video/1006/p/7556c7043e88186b0bfb60a1abe27481-610517fe75974eef92edaf44fd579853-2.mp4,https://boot-video.xuexi.cn/video/1006/p/6cf3b6826f95653511f5dd8ea42b95c9-ff6425a5b1db4fc9b406c42480ebaae4-2.mp4,https://boot-video.xuexi.cn/video/1006/p/dca2b2122efa84ef43c0cf3c05b728d4-60f0576258944bea936d0aea6d9e9e50-2.mp4,https://boot-video.xuexi.cn/video/1006/p/e7c7db360b47191742ef7266aa509573-11044cf3d6d643619924122f2374bf2b-2.mp4,https://boot-video.xuexi.cn/video/1006/p/ae79b9d0c3391a1380a866a9ce2c781a-e5b2e7be528e4d59802175f2d74af5a9-2.mp4,https://boot-video.xuexi.cn/video/1006/p/d3e06265dadc66fd354649793d8aa75e-da7788f2a0984b87b67ff1d6f3e6d6a7-2.mp4,https://boot-video.xuexi.cn/video/1006/p/5613cceb7b31f3eefb8d3c1d1279be47-b9f0d1d881474f16a057c049056daa3b-2.mp4,https://boot-video.xuexi.cn/video/1006/p/0a3767c3924b2d0dc29b8e9c802a81da-46e9198132224d58a79abaf184b39c39-2.mp4,https://boot-video.xuexi.cn/video/1006/p/f5337dcf1029d1755d15b39e1bb34733-2a696096f6614b1780858c64ce8a29c5-2.mp4,https://boot-video.xuexi.cn/video/1006/p/fa1beb92f52913d5d0502e3fa5f096d5-1e0f65c5f8c8406eb34b6210670033c9-2.mp4,https://boot-video.xuexi.cn/video/1006/p/38566457defcadd3b6d9132a38d6ab29-0b349aaffb9c496287f4e1ef64876e86-2.mp4,https://boot-video.xuexi.cn/video/1006/p/5f8b2eb6b9dea34354d05d67f1882ada-b8ec6f074f064290a1182c6ccdae7eba-2.mp4,https://boot-video.xuexi.cn/video/1006/p/731132a6d4d87f7b9e0b9a94a65a5a06-dcf3f148b0c04724b320c7956caedf86-2.mp4,https://boot-video.xuexi.cn/video/1006/p/03a8ba3d09d1c4753546f5b3550a9251-8cec7ba4c26f4bc2bc7a6540cfb0fc7b-2.mp4,https://boot-video.xuexi.cn/video/1006/p/77cdb7969c3fef76cb1615f3c0718a46-5b6cccd988bb40a9a4fdc271061a336f-2.mp4,https://boot-video.xuexi.cn/video/1006/p/527970e4c8030524654803d3d159dbc8-6286fef291be46d5af41900f6988d1d4-2.mp4,https://boot-video.xuexi.cn/video/1006/p/1d6d6e6abd84ceb6368f039aa086a01c-a37df97a4cdf4212ab1982ce7dae1ab7-2.mp4,https://boot-video.xuexi.cn/video/1006/p/af756c8900e9c9b6b54412abb39be9ab-e37dd2b6537846b3a916e35d5dd99b52-2.mp4,https://boot-video.xuexi.cn/video/1006/p/271c0ec735a04cc00b9d13986d7cd65b-83c9c880f0bb4f07a103693f34aa9a95-2.mp4,https://boot-video.xuexi.cn/video/1006/p/29beed2e15abfbe3ba457a6a8d1d1c9c-660da4a738354dd09325aecfab268a43-2.mp4,https://boot-video.xuexi.cn/video/1006/p/a421df188b71340d3d0fee3a1e19fe14-d12daf58c6b24a14b46e6c7e5dc191ea-2.mp4,https://boot-video.xuexi.cn/video/1006/p/2771da94f2ce433a17ff61f8b870bb56-7fe1239fec054348ab1a281616bc146c-2.mp4,https://boot-video.xuexi.cn/video/1006/p/0fde550a85cca3c08a8c1356e21b760b-6be5b3e2d1a34fbd84f69dc955ace72d-2.mp4,https://boot-video.xuexi.cn/video/1006/p/418eb399a3e67bce6ef6748e848107a2-24b9382f5fa94b23ba09477508ba574f-2.mp4,https://boot-video.xuexi.cn/video/1006/p/f82578fa00d98c2d5369661b4a833d70-ef9baf0d218f4bebb25d7ed57db15451-2.mp4,https://boot-video.xuexi.cn/video/1006/p/42466a20053129df040b6dc39af56318-376df6c52bd940229b22aeab66273800-2.mp4,https://boot-video.xuexi.cn/video/1006/p/a153916e82b6c2b0c839dffbba49dec8-721d3890f73c404996508806848fd353-2.mp4,https://boot-video.xuexi.cn/video/1006/p/6d992bc4a29759ca59c0271ef82c95a8-8c120ce367e34ef799868ba1d0446180-2.mp4,https://boot-video.xuexi.cn/video/1006/p/a1a44024fd503a83381f7d8d617f7a5b-79d8b33098b4415db91cfd1ccfdad1f0-2.mp4,https://boot-video.xuexi.cn/video/1006/p/bc811f4dca003b28fd650b1d49c5ba0e-6e443a4230014feb954822a7d68e0c85-2.mp4,https://boot-video.xuexi.cn/video/1006/p/af274d40ddaa2f92d813d5cb6929e4ce-0f11ba22431c49b18701bbc69c300058-2.mp4,https://boot-video.xuexi.cn/video/1006/p/41ff8cabc43fb9bc03ce7fcc0b00eab3-eddc63b4e0e54c2bbede9ed5f02f73be-2.mp4,https://boot-video.xuexi.cn/video/1006/p/8fa92f5e955de50dad8f5e6cd6d9f7ef-30147986d805487f897295f5f13cd13b-2.mp4,https://boot-video.xuexi.cn/video/1006/p/e643da5bde09e6cd536b19ba755063cc-c54a968d54b7401484d85c2c78920e8f-2.mp4,https://boot-video.xuexi.cn/video/1006/p/0a2edf04db75c690a612e5447ee5a070-f907ddf5c87e4456b1a9dc84d79ea3dd-2.mp4,https://boot-video.xuexi.cn/video/1006/p/5e0d7314991de52da8d5b1567813512d-3398307fc32f42cc977f8133f803b76f-2.mp4,https://boot-video.xuexi.cn/video/1006/p/89dd21b2a52faa3c0b75ac1fca03b7cf-745f01a55bc544c4a62464b6e99903d8-2.mp4,https://boot-video.xuexi.cn/video/1006/p/bb9d200a5ed90d19a34265d0f74fe6cf-e6bd05f32ba143e8a40d71d9667e740b-2.mp4,https://boot-video.xuexi.cn/video/1006/p/957e47de4370b3c73c065bd802c52c01-c9d90b11e50f43bf9de79fa56679784c-2.mp4,https://boot-video.xuexi.cn/video/1006/p/cfaf1576ba3b1df2fb8d1b4cfab5d26f-b2e0841da56940a7ad56340633fc6471-2.mp4,https://boot-video.xuexi.cn/video/1006/p/dba15bb80b59fbe6ab95f7360d67bc11-804eb20577ab4877bd7cda30d119ac3e-2.mp4,https://boot-video.xuexi.cn/video/1006/p/8f6d37ca8d45421b468617407df5c95f-37ee2e67fbec4a47844ec3e1ad6f6040-2.mp4,https://boot-video.xuexi.cn/video/1006/p/31176f17aeb61a6d32f960f4bd4a0686-8429f54b53f04a00b24c0bbe2817a686-2.mp4,https://boot-video.xuexi.cn/video/1006/p/5eddff452cad6fe4297e89057799e6bb-3a20a92776334dd08b7b12b5befeaf42-2.mp4,https://boot-video.xuexi.cn/video/1006/p/4aa35925803a1693b35f33736f90dd25-a29d01ca9e7440778fe1b40d78734415-2.mp4,https://boot-video.xuexi.cn/video/1006/p/d29e527934c0556141964732ff3220a1-0ec288d0ddbd44d09cd216678d791933-2.mp4,https://boot-video.xuexi.cn/video/1006/p/0b46fda6f873b0623dd981e157f7e014-acb282c7a3cd477fb72b062227815890-2.mp4,https://boot-video.xuexi.cn/video/1006/p/9f6164c2950b2d37e816fbd7c8c49347-716d290572d84d98ad301c07c17de5cb-2.mp4,https://boot-video.xuexi.cn/video/1006/p/986491bd130e85fddc048eb759cec2fd-56620b7bd08d4ee491db3aa5e7b283e2-2.mp4,https://boot-video.xuexi.cn/video/1006/p/56054bf540fa797e71e3f866c24a09ce-8e9cbf1476ef4dca9b6a7d3bdbfaaf90-2.mp4,https://boot-video.xuexi.cn/video/1006/p/2c7adba23f684e661a7a72766c8a9c17-d734f23b6cbb4ac58dc65ed0cfb42568-2.mp4,https://boot-video.xuexi.cn/video/1006/p/631cb0e564b1944c9ecd957c34a57e88-7c10d4b506d84a8eb03e65b18375ef38-2.mp4,https://boot-video.xuexi.cn/video/1006/p/43ea00ebb945581bf72cde9ca89f2da6-08b1848464374392841074537a34b02d-2.mp4,https://boot-video.xuexi.cn/video/1006/p/46bfe422e70f5d28e248f9ab0d121c38-3e07163b3488418d9ac47fc1798b6bf6-2.mp4,https://boot-video.xuexi.cn/video/1006/p/83f771f0bd7369059b77c3b56ccf7664-9fc2cb92c367485887ea27da8aca904e-2.mp4,https://boot-video.xuexi.cn/video/1006/p/2ee715f21f61106f83e4f901426f136c-1e928dd5f7894ec98cf01123cecd0cab-2.mp4,https://boot-video.xuexi.cn/video/1006/p/a21341b0f5365a32fb8ae2313ae4fc7f-70ec698a68504d74ac87ef4d85f2dec9-2.mp4,https://boot-video.xuexi.cn/video/1006/p/6d3df788e997368bf7163d0dea38acae-0a23ca135101497f931409eed598b5b1-2.mp4,https://boot-video.xuexi.cn/video/1006/p/83ff2a8a6450a5983469c043dfd2ab9b-a03cf7420bf14e809c3501c9cba48cc6-2.mp4,https://boot-video.xuexi.cn/video/1006/p/52c48538b7008cdd480567dea643fa1d-5067f428d79d4758adf6931011a243ec-2.mp4,https://boot-video.xuexi.cn/video/1006/p/6f79a0cd7731e53de00aef3f77b6ba75-1b9f9f0f3318445c8714db7177c75eed-2.mp4,https://boot-video.xuexi.cn/video/1006/p/502ca838457f46985e7d339c9dd94d84-7b79ac473f62441fbc6191ad1c0ed4ef-2.mp4,https://boot-video.xuexi.cn/video/1006/p/f2dfec5d09fd5c3d7b06d65be1afbf44-5124232c0efd41a2b28dd1a5fd991ff9-2.mp4,https://boot-video.xuexi.cn/video/1006/p/29a6bdcbda1d9360fa4c97add1b21258-a6b68866bc8748398a2ac6ff8f1340ad-2.mp4,https://boot-video.xuexi.cn/video/1006/p/1f57dd2a0cf5b7e97e63c6e884087a90-a0a325f1bb2849f5a467bb997bf21878-2.mp4,https://boot-video.xuexi.cn/video/1006/p/70f2c3fb09c7c798c18ea2e64e64252b-40629663598848f6a5ea55ae7fc95732-2.mp4,https://boot-video.xuexi.cn/video/1006/p/ce6daa2b530771a5f69b207e011e82cb-57309ee44bf944e48a79b9b09c84c758-2.mp4,https://boot-video.xuexi.cn/video/1006/p/4961b8cd99003f6f41382e4ebb89fcef-51bd8225f3b149239c18f6b300b48f0f-2.mp4,https://boot-video.xuexi.cn/video/1006/p/73f29350eb985704089b7b61a6eaf3e4-c7f4b173d8dd4195b61242f14ef15c46-2.mp4,https://boot-video.xuexi.cn/video/1006/p/a219b07be0bc35ff41ad5ebf068dc34f-e6736b582b2b4591aa4f100f8b94b7ab-2.mp4,https://boot-video.xuexi.cn/video/1006/p/410a9f2f0b6192bdbdaa39396221f52c-6852abed973d42349d4c9bedbc550f6b-2.mp4,https://boot-video.xuexi.cn/video/1006/p/2ab710a6ce7ddaf96aa1b28e0cf4f6c3-abcb2769e33347559f5e8d2b286b3dd3-2.mp4,https://boot-video.xuexi.cn/video/1006/p/15f6c34100bf876c7dcc0049592d683e-734f90bde3904afa98580647fdbe398b-2.mp4,https://boot-video.xuexi.cn/video/1006/p/71ce68defb78b286f976b4530a830a6f-98b9f922db814055b52f4a8f9281bafc-2.mp4,https://boot-video.xuexi.cn/video/1006/p/3a2c3bb124c84f6a917db9e048692f70-bbae575fb9ff4eafb32cc78fecd1177d-2.mp4,https://boot-video.xuexi.cn/video/1006/p/af73e42dffa0206148713cd5555eceb7-1c22d2375710400d8e7c3f4071e5e644-2.mp4,https://boot-video.xuexi.cn/video/1006/p/88e36e96e5a09720aae36b67ed7c18f6-767d5dc02b2f46c18c202726bdd3fcee-2.mp4,https://boot-video.xuexi.cn/video/1006/p/8529ebb9aa153b4d04325e8584b1cd44-8cc16ecb8ad2441ebedf9d3cef76ebb5-2.mp4,https://boot-video.xuexi.cn/video/1006/p/4cbcf0776115a5a2409743c6286a7518-19c79ec4844646e78a12066c9d60e56b-2.mp4,https://boot-video.xuexi.cn/video/1006/p/cff211b0944565f0957ce65053239889-f485890a475047eebf81676a914acf96-2.mp4,https://boot-video.xuexi.cn/video/1006/p/649a17f375e581227c785f07f008164b-ff245af5c0b34118b118783865876148-2.mp4,https://boot-video.xuexi.cn/video/1006/p/395bfdbbfa2a13c48b42dffe60a964bb-db31575eb79548f087c8529fe8c57516-2.mp4,https://boot-video.xuexi.cn/video/1006/p/8c52ce19002c1b856d0efdacc1038db8-bc33fa71867440b8a62c34b1f59b4cba-2.mp4,https://boot-video.xuexi.cn/video/1006/p/3d0bfb2473842a295440720e7542bbba-43027d30f1bb49849fadf3f3679f913c-2.mp4,https://boot-video.xuexi.cn/video/1006/p/519b8af4b34e66ae125d551241434a83-eefe47cb08f24a63bf909094014676dd-2.mp4,https://boot-video.xuexi.cn/video/1006/p/fec74636fee82ccf3f47c5a1b96ba3ca-2e0d6d812d994b8693f77c813034ca27-2.mp4,https://boot-video.xuexi.cn/video/1006/p/3ce509ee964328884c429c416316e6eb-6d2ee7402de84677869bd6f44e408e1a-2.mp4,https://boot-video.xuexi.cn/video/1006/p/bd622a6f00cae493ca1205a035c93bf3-7224ed9b66d14cd1bd472637fc454853-2.mp4,https://boot-video.xuexi.cn/video/1006/p/02797843a2932a33e05ab8fa2b554d42-389940076e71460398a864ea6c32570c-2.mp4,https://boot-video.xuexi.cn/video/1006/p/da464b41516e6f53e1958d2f5702f53d-f614569db0f14e0ca1599222c17fb327-2.mp4,https://boot-video.xuexi.cn/video/1006/p/3ec09182194483e86ec42aa9cf5599f2-bdba19cc1ad84deb847bc6f1b70534eb-2.mp4,https://boot-video.xuexi.cn/video/1006/p/7b26c133b0cfca42ecf2ccbbfc36e689-42b9ff237c884d4dbce2a2842c8faf53-2.mp4,https://boot-video.xuexi.cn/video/1006/p/ad2d5062484e74e05641810d06e71c25-879dfddb8e0049c19680ae7bdff7a403-2.mp4,https://boot-video.xuexi.cn/video/1006/p/1cc397e194d914206a193a0dcbaaf649-f91e7a62bbdf4c4eafd27555096644e2-2.mp4,https://boot-video.xuexi.cn/video/1006/p/b0360d98873df7e7854e30e20dabd107-6e2cdd39c434474cbe408bcc4eeb0594-2.mp4,https://boot-video.xuexi.cn/video/1006/p/d5b209f3d6f05c4adbecab5dd415d58a-45c825d86b0640b5a20b445dd9ee1dc2-2.mp4,https://boot-video.xuexi.cn/video/1006/p/98bef60af42e3d6471bf1df948271118-58f6145b62d044fa9b5fa6ab86b64903-2.mp4,https://boot-video.xuexi.cn/video/1006/p/eb44453847aa49b61a174aec80abfc24-c0eb3b0efe794496b46a7fc22c5b969d-2.mp4,https://boot-video.xuexi.cn/video/1006/p/229f90b1ebf77732b3e6b426b82b07c0-92a75187186342d98630cc271b4efe5f-2.mp4,https://boot-video.xuexi.cn/video/1006/p/2be1df82bd23510e11257533486ecd23-77cdbfbe7f104d04acb276c4f6587b78-2.mp4,https://boot-video.xuexi.cn/video/1006/p/c46ee3226a22101331473c2397149c6f-69e2474d16e94f399d21a1d443b7c4c8-2.mp4,https://boot-video.xuexi.cn/video/1006/p/135ff5aba7cd42529db9f43e06149cd0-f6260aafb4514ba3915288e7b8bb2c3d-2.mp4,https://boot-video.xuexi.cn/video/1006/p/e9e0d0dce252ead465243991dead1585-d946b3e7c002413fbcd3f949813a7be4-2.mp4,https://boot-video.xuexi.cn/video/1006/p/a5b6ed955d7769af321c29b33059e545-2ffef5615a69435dbc93b7385072514c-2.mp4,https://boot-video.xuexi.cn/video/1006/p/f71231f0ff95a31d883e7a459d7ac7a5-59d3a7417c3a4671b7e75da2646097a7-2.mp4,https://boot-video.xuexi.cn/video/1006/p/14b972a46469283fe35ab9dc1746ca2e-be534fd49c23443898886d25084a5b24-2.mp4,https://boot-video.xuexi.cn/video/1006/p/aa1c1d3b2055f8e4e8e4bd135e162c0f-76aa004b273f4755a0d7a81fed81cf14-2.mp4,https://boot-video.xuexi.cn/video/1006/p/96ad67bd488fbee5edc05d882e687e46-78719eefb76c4b3d98db80c312e6060f-2.mp4,https://boot-video.xuexi.cn/video/1006/p/23c5b6b4a2a68c2555f4bc742236ca9b-a8298be10a9c4fbaa81c2cea3072932d-2.mp4,https://boot-video.xuexi.cn/video/1006/p/a1675428e11e764fbd1768b7f574b232-b7a9f438df8344f5861864c75e0bc9dd-2.mp4,https://boot-video.xuexi.cn/video/1006/p/e978f876a8417a42b21fdc980aff8925-778554c730d44be98bfe99352328479b-2.mp4,https://boot-video.xuexi.cn/video/1006/p/aac5acc7939a9590043d86be9f069e2d-ee3d8dbccb074707a1abf50ee4ea1cae-2.mp4,https://boot-video.xuexi.cn/video/1006/p/6a8657cc800fcbdebdc8f65864c4ebe4-e581f011019948dc98f37039085fc1b6-2.mp4,https://boot-video.xuexi.cn/video/1006/p/131c9b7e970f2b1cb289ee1f23ad4d4c-fc11d379a8d74699bc14f31ec61d5d9f-2.mp4,https://boot-video.xuexi.cn/video/1006/p/e8aea8cf65437dd1a6a3ee4f64150926-9171928858d64378b75e5f44171e3806-2.mp4,https://boot-video.xuexi.cn/video/1006/p/cb2393a3288c22fb33c118b47962731a-0fcc03caa2a04a0bb28314d5a5c55bfd-2.mp4,https://boot-video.xuexi.cn/video/1006/p/8d90b321cdab66934de7988d79f42d11-a5b1bf245b5048f29de29b28f0cf4b29-2.mp4,https://boot-video.xuexi.cn/video/1006/p/f0f79d4991d24406c4b1000808866aed-efbe26a5306c45df972488689c0ac6ca-2.mp4,https://boot-video.xuexi.cn/video/1006/p/e0fb2e96085f1f5db5f7492c212654c2-904f1c1ae17d4128a7af950eb010124d-2.mp4,https://boot-video.xuexi.cn/video/1006/p/19923f0e72ca7b750bf112796a14cda9-e6d6acb0e08f4b84aaf8f31dfd4ba09a-2.mp4,https://boot-video.xuexi.cn/video/1006/p/3e72c126a54dc9c8093b4301a8639a94-3f4b29907d8543c58dd2046ad853e415-2.mp4,https://boot-video.xuexi.cn/video/1006/p/22a8b76f1af75caca3bfdd47ad5ba8af-1c745b99a01c4a0a86e6ee0365aad457-2.mp4,https://boot-video.xuexi.cn/video/1006/p/4acd161d511c09fdd7c03a39a1f951b9-1813feef9a87401c9b623cd22bfc5c3f-2.mp4,https://boot-video.xuexi.cn/video/1006/p/c37f66820c0cf0e81c5474e2c57aff79-81e0cc7302d84106bcdb60292b8b3cc2-2.mp4,https://boot-video.xuexi.cn/video/1006/p/1704f9bf212e0fbaa4c6d04f65be9de1-369be5079a2240ce940400afefdb46db-2.mp4,https://boot-video.xuexi.cn/video/1006/p/969d64b4913ac02814e30f005aeb397e-07ffba0f8e4448bb873eb2206a84ee38-2.mp4,https://boot-video.xuexi.cn/video/1006/p/054d48d4c6a8ba28c196d4acf6541ae5-87e960537bf64e688a73d8588cb62bd4-2.mp4,https://boot-video.xuexi.cn/video/1006/p/0e34f3200ecf5508f2f328865826afa5-9a97e4fb7e124b9ca602c66342011701-2.mp4,https://boot-video.xuexi.cn/video/1006/p/184426272dd5b1bad60f330c7e4c6027-263cfee68ee844bbb9a41acec1098753-2.mp4"""namestr = """回乡偶书二首·其一,题西林壁,枫桥夜泊,游子吟,春夜喜雨,出赛二首·其一,四时田园杂兴·其三十一,赠花卿,送元二使安西,江南逢李龟年,鸟鸣涧,石灰吟,芙蓉楼送辛渐,春日,竹石,黄鹤楼送孟浩然之广陵,凉州词二首·其一,江南春,独坐敬亭山,乌衣巷,乞巧,乐游原,六月二十七日望湖楼醉书,渔歌子,寒食,七步诗,月下独酌四首·其一,秋夜将晓出篱门迎凉有感(其二),蝉,山居球暝,秋夕,宿建德江,己亥杂诗(其二百二十),闻官军收河南河北,竹里馆,夏日绝句,长歌行,竹枝词二首·其一,墨梅,示儿,游园不值,题临安邸,题都城南庄,舟过安仁,天竺寺八月十五日夜桂子,登飞来峰,咏华山,劝学,天净沙·秋,早春呈水部张十八员外(其一),春雪,溪居即事,京师得家书,乡村四月,山中送别,游山西村,晚春,过故人庄,咏白鹭,蚕妇,冬夜读书示子聿,秋思,相思,浪淘沙,游钟山,渡汉江,西江月·夜行黄沙道中,梅花,宿新市徐公店,嫦娥,约客,易水送别,江雪,舟夜书所见,暮江吟,三衢道中,望洞庭,小儿垂钓,山行,晓出净慈寺松林子方,赋得古原草送别,夜书所见,早发白帝城,九月九日忆山东兄弟,忆江南,雪梅·其一,望庐山瀑布,大林寺桃花,滁州西涧,饮湖上初晴后雨二首·其二,绝句二首·其一,所见,采莲曲,望天门山,别董大二首·其一,江畔独步寻花·其六,夜宿山寺,鹿柴,咏柳,登鹳雀楼,村居,小池,过华清宫(其一),悯农二首(其二),商山早行,明日歌,绝句,春晓,题画,书湖阴先生壁(二首其一),春望,画鸡,蜂,池上,问刘十九,菩萨蛮·书江西造口壁,山村咏怀,静夜思,牧童,清平乐·村居,赠汪伦,梅花,峨眉山月歌,夜雪,咏鹅,古朗月行(节选),十二月十五夜,悯农二首·其一,汉乐府·江南,寻隐者不遇,画"""urls_list = urlstr.strip().split(",")names_list = namestr.strip().split(",")print(urls_list)print(len(urls_list))    # 131print(names_list)print(len(names_list))   # 131# for i in range(len(urls_list)):for i in range(10):download_mp4_by_url(urls_list[i], names_list[i], i+1)if __name__ == "__main__":main()
  • 上面和下面的程序唯一的差别就是字符的间隔方式,上面是逗号间隔,下面是回车间隔,上面会让程序行数不那么多。
# https://article.xuexi.cn/articles/video/index.html?art_id=294702920556063797
import requests
import osdef download_mp4_by_url(url, name, n):"""通过链接下载视频链接下载相应的mp4视频。:param url: mp4视频超链接。:param name: 视频保存的主题名:param n: 视频的顺序编号:return:"""headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 Edg/123.0.0.0"}video_data = requests.get(url, headers=headers).contentif not os.path.exists("./视频"):os.mkdir("./视频")with open(f"./视频/{n}.{name}.mp4", "wb") as f:f.write(video_data)print(f"正在下载第{n}个视频:{name}")def main():urlstr = """
https://boot-video.xuexi.cn/video/1006/p/5fd0919e562a1eedd1a8f740849f491a-72ee9dcf0fa440d7b8974dbea2538d39-2.mp4
https://boot-video.xuexi.cn/video/1006/p/7556c7043e88186b0bfb60a1abe27481-610517fe75974eef92edaf44fd579853-2.mp4
https://boot-video.xuexi.cn/video/1006/p/29057017b697b69ba089b141ffa7155b-72dba5794ada485fa36916ca6c4bb276-2.mp4
https://boot-video.xuexi.cn/video/1006/p/6cf3b6826f95653511f5dd8ea42b95c9-ff6425a5b1db4fc9b406c42480ebaae4-2.mp4
https://boot-video.xuexi.cn/video/1006/p/dca2b2122efa84ef43c0cf3c05b728d4-60f0576258944bea936d0aea6d9e9e50-2.mp4
https://boot-video.xuexi.cn/video/1006/p/e7c7db360b47191742ef7266aa509573-11044cf3d6d643619924122f2374bf2b-2.mp4
https://boot-video.xuexi.cn/video/1006/p/ae79b9d0c3391a1380a866a9ce2c781a-e5b2e7be528e4d59802175f2d74af5a9-2.mp4
https://boot-video.xuexi.cn/video/1006/p/d3e06265dadc66fd354649793d8aa75e-da7788f2a0984b87b67ff1d6f3e6d6a7-2.mp4
https://boot-video.xuexi.cn/video/1006/p/5613cceb7b31f3eefb8d3c1d1279be47-b9f0d1d881474f16a057c049056daa3b-2.mp4
https://boot-video.xuexi.cn/video/1006/p/0a3767c3924b2d0dc29b8e9c802a81da-46e9198132224d58a79abaf184b39c39-2.mp4
https://boot-video.xuexi.cn/video/1006/p/f5337dcf1029d1755d15b39e1bb34733-2a696096f6614b1780858c64ce8a29c5-2.mp4
https://boot-video.xuexi.cn/video/1006/p/fa1beb92f52913d5d0502e3fa5f096d5-1e0f65c5f8c8406eb34b6210670033c9-2.mp4
https://boot-video.xuexi.cn/video/1006/p/38566457defcadd3b6d9132a38d6ab29-0b349aaffb9c496287f4e1ef64876e86-2.mp4
https://boot-video.xuexi.cn/video/1006/p/5f8b2eb6b9dea34354d05d67f1882ada-b8ec6f074f064290a1182c6ccdae7eba-2.mp4
https://boot-video.xuexi.cn/video/1006/p/731132a6d4d87f7b9e0b9a94a65a5a06-dcf3f148b0c04724b320c7956caedf86-2.mp4
https://boot-video.xuexi.cn/video/1006/p/03a8ba3d09d1c4753546f5b3550a9251-8cec7ba4c26f4bc2bc7a6540cfb0fc7b-2.mp4
https://boot-video.xuexi.cn/video/1006/p/77cdb7969c3fef76cb1615f3c0718a46-5b6cccd988bb40a9a4fdc271061a336f-2.mp4
https://boot-video.xuexi.cn/video/1006/p/527970e4c8030524654803d3d159dbc8-6286fef291be46d5af41900f6988d1d4-2.mp4
https://boot-video.xuexi.cn/video/1006/p/1d6d6e6abd84ceb6368f039aa086a01c-a37df97a4cdf4212ab1982ce7dae1ab7-2.mp4
https://boot-video.xuexi.cn/video/1006/p/af756c8900e9c9b6b54412abb39be9ab-e37dd2b6537846b3a916e35d5dd99b52-2.mp4
https://boot-video.xuexi.cn/video/1006/p/271c0ec735a04cc00b9d13986d7cd65b-83c9c880f0bb4f07a103693f34aa9a95-2.mp4
https://boot-video.xuexi.cn/video/1006/p/29beed2e15abfbe3ba457a6a8d1d1c9c-660da4a738354dd09325aecfab268a43-2.mp4
https://boot-video.xuexi.cn/video/1006/p/a421df188b71340d3d0fee3a1e19fe14-d12daf58c6b24a14b46e6c7e5dc191ea-2.mp4
https://boot-video.xuexi.cn/video/1006/p/2771da94f2ce433a17ff61f8b870bb56-7fe1239fec054348ab1a281616bc146c-2.mp4
https://boot-video.xuexi.cn/video/1006/p/0fde550a85cca3c08a8c1356e21b760b-6be5b3e2d1a34fbd84f69dc955ace72d-2.mp4
https://boot-video.xuexi.cn/video/1006/p/418eb399a3e67bce6ef6748e848107a2-24b9382f5fa94b23ba09477508ba574f-2.mp4
https://boot-video.xuexi.cn/video/1006/p/f82578fa00d98c2d5369661b4a833d70-ef9baf0d218f4bebb25d7ed57db15451-2.mp4
https://boot-video.xuexi.cn/video/1006/p/42466a20053129df040b6dc39af56318-376df6c52bd940229b22aeab66273800-2.mp4
https://boot-video.xuexi.cn/video/1006/p/a153916e82b6c2b0c839dffbba49dec8-721d3890f73c404996508806848fd353-2.mp4
https://boot-video.xuexi.cn/video/1006/p/6d992bc4a29759ca59c0271ef82c95a8-8c120ce367e34ef799868ba1d0446180-2.mp4
https://boot-video.xuexi.cn/video/1006/p/a1a44024fd503a83381f7d8d617f7a5b-79d8b33098b4415db91cfd1ccfdad1f0-2.mp4
https://boot-video.xuexi.cn/video/1006/p/bc811f4dca003b28fd650b1d49c5ba0e-6e443a4230014feb954822a7d68e0c85-2.mp4
https://boot-video.xuexi.cn/video/1006/p/af274d40ddaa2f92d813d5cb6929e4ce-0f11ba22431c49b18701bbc69c300058-2.mp4
https://boot-video.xuexi.cn/video/1006/p/41ff8cabc43fb9bc03ce7fcc0b00eab3-eddc63b4e0e54c2bbede9ed5f02f73be-2.mp4
https://boot-video.xuexi.cn/video/1006/p/8fa92f5e955de50dad8f5e6cd6d9f7ef-30147986d805487f897295f5f13cd13b-2.mp4
https://boot-video.xuexi.cn/video/1006/p/e643da5bde09e6cd536b19ba755063cc-c54a968d54b7401484d85c2c78920e8f-2.mp4
https://boot-video.xuexi.cn/video/1006/p/0a2edf04db75c690a612e5447ee5a070-f907ddf5c87e4456b1a9dc84d79ea3dd-2.mp4
https://boot-video.xuexi.cn/video/1006/p/5e0d7314991de52da8d5b1567813512d-3398307fc32f42cc977f8133f803b76f-2.mp4
https://boot-video.xuexi.cn/video/1006/p/89dd21b2a52faa3c0b75ac1fca03b7cf-745f01a55bc544c4a62464b6e99903d8-2.mp4
https://boot-video.xuexi.cn/video/1006/p/bb9d200a5ed90d19a34265d0f74fe6cf-e6bd05f32ba143e8a40d71d9667e740b-2.mp4
https://boot-video.xuexi.cn/video/1006/p/957e47de4370b3c73c065bd802c52c01-c9d90b11e50f43bf9de79fa56679784c-2.mp4
https://boot-video.xuexi.cn/video/1006/p/cfaf1576ba3b1df2fb8d1b4cfab5d26f-b2e0841da56940a7ad56340633fc6471-2.mp4
https://boot-video.xuexi.cn/video/1006/p/dba15bb80b59fbe6ab95f7360d67bc11-804eb20577ab4877bd7cda30d119ac3e-2.mp4
https://boot-video.xuexi.cn/video/1006/p/8f6d37ca8d45421b468617407df5c95f-37ee2e67fbec4a47844ec3e1ad6f6040-2.mp4
https://boot-video.xuexi.cn/video/1006/p/31176f17aeb61a6d32f960f4bd4a0686-8429f54b53f04a00b24c0bbe2817a686-2.mp4
https://boot-video.xuexi.cn/video/1006/p/5eddff452cad6fe4297e89057799e6bb-3a20a92776334dd08b7b12b5befeaf42-2.mp4
https://boot-video.xuexi.cn/video/1006/p/4aa35925803a1693b35f33736f90dd25-a29d01ca9e7440778fe1b40d78734415-2.mp4
https://boot-video.xuexi.cn/video/1006/p/d29e527934c0556141964732ff3220a1-0ec288d0ddbd44d09cd216678d791933-2.mp4
https://boot-video.xuexi.cn/video/1006/p/0b46fda6f873b0623dd981e157f7e014-acb282c7a3cd477fb72b062227815890-2.mp4
https://boot-video.xuexi.cn/video/1006/p/9f6164c2950b2d37e816fbd7c8c49347-716d290572d84d98ad301c07c17de5cb-2.mp4
https://boot-video.xuexi.cn/video/1006/p/986491bd130e85fddc048eb759cec2fd-56620b7bd08d4ee491db3aa5e7b283e2-2.mp4
https://boot-video.xuexi.cn/video/1006/p/56054bf540fa797e71e3f866c24a09ce-8e9cbf1476ef4dca9b6a7d3bdbfaaf90-2.mp4
https://boot-video.xuexi.cn/video/1006/p/2c7adba23f684e661a7a72766c8a9c17-d734f23b6cbb4ac58dc65ed0cfb42568-2.mp4
https://boot-video.xuexi.cn/video/1006/p/631cb0e564b1944c9ecd957c34a57e88-7c10d4b506d84a8eb03e65b18375ef38-2.mp4
https://boot-video.xuexi.cn/video/1006/p/43ea00ebb945581bf72cde9ca89f2da6-08b1848464374392841074537a34b02d-2.mp4
https://boot-video.xuexi.cn/video/1006/p/46bfe422e70f5d28e248f9ab0d121c38-3e07163b3488418d9ac47fc1798b6bf6-2.mp4
https://boot-video.xuexi.cn/video/1006/p/83f771f0bd7369059b77c3b56ccf7664-9fc2cb92c367485887ea27da8aca904e-2.mp4
https://boot-video.xuexi.cn/video/1006/p/2ee715f21f61106f83e4f901426f136c-1e928dd5f7894ec98cf01123cecd0cab-2.mp4
https://boot-video.xuexi.cn/video/1006/p/a21341b0f5365a32fb8ae2313ae4fc7f-70ec698a68504d74ac87ef4d85f2dec9-2.mp4
https://boot-video.xuexi.cn/video/1006/p/6d3df788e997368bf7163d0dea38acae-0a23ca135101497f931409eed598b5b1-2.mp4
https://boot-video.xuexi.cn/video/1006/p/83ff2a8a6450a5983469c043dfd2ab9b-a03cf7420bf14e809c3501c9cba48cc6-2.mp4
https://boot-video.xuexi.cn/video/1006/p/52c48538b7008cdd480567dea643fa1d-5067f428d79d4758adf6931011a243ec-2.mp4
https://boot-video.xuexi.cn/video/1006/p/6f79a0cd7731e53de00aef3f77b6ba75-1b9f9f0f3318445c8714db7177c75eed-2.mp4
https://boot-video.xuexi.cn/video/1006/p/502ca838457f46985e7d339c9dd94d84-7b79ac473f62441fbc6191ad1c0ed4ef-2.mp4
https://boot-video.xuexi.cn/video/1006/p/f2dfec5d09fd5c3d7b06d65be1afbf44-5124232c0efd41a2b28dd1a5fd991ff9-2.mp4
https://boot-video.xuexi.cn/video/1006/p/29a6bdcbda1d9360fa4c97add1b21258-a6b68866bc8748398a2ac6ff8f1340ad-2.mp4
https://boot-video.xuexi.cn/video/1006/p/1f57dd2a0cf5b7e97e63c6e884087a90-a0a325f1bb2849f5a467bb997bf21878-2.mp4
https://boot-video.xuexi.cn/video/1006/p/70f2c3fb09c7c798c18ea2e64e64252b-40629663598848f6a5ea55ae7fc95732-2.mp4
https://boot-video.xuexi.cn/video/1006/p/ce6daa2b530771a5f69b207e011e82cb-57309ee44bf944e48a79b9b09c84c758-2.mp4
https://boot-video.xuexi.cn/video/1006/p/4961b8cd99003f6f41382e4ebb89fcef-51bd8225f3b149239c18f6b300b48f0f-2.mp4
https://boot-video.xuexi.cn/video/1006/p/73f29350eb985704089b7b61a6eaf3e4-c7f4b173d8dd4195b61242f14ef15c46-2.mp4
https://boot-video.xuexi.cn/video/1006/p/a219b07be0bc35ff41ad5ebf068dc34f-e6736b582b2b4591aa4f100f8b94b7ab-2.mp4
https://boot-video.xuexi.cn/video/1006/p/410a9f2f0b6192bdbdaa39396221f52c-6852abed973d42349d4c9bedbc550f6b-2.mp4
https://boot-video.xuexi.cn/video/1006/p/2ab710a6ce7ddaf96aa1b28e0cf4f6c3-abcb2769e33347559f5e8d2b286b3dd3-2.mp4
https://boot-video.xuexi.cn/video/1006/p/15f6c34100bf876c7dcc0049592d683e-734f90bde3904afa98580647fdbe398b-2.mp4
https://boot-video.xuexi.cn/video/1006/p/71ce68defb78b286f976b4530a830a6f-98b9f922db814055b52f4a8f9281bafc-2.mp4
https://boot-video.xuexi.cn/video/1006/p/3a2c3bb124c84f6a917db9e048692f70-bbae575fb9ff4eafb32cc78fecd1177d-2.mp4
https://boot-video.xuexi.cn/video/1006/p/af73e42dffa0206148713cd5555eceb7-1c22d2375710400d8e7c3f4071e5e644-2.mp4
https://boot-video.xuexi.cn/video/1006/p/88e36e96e5a09720aae36b67ed7c18f6-767d5dc02b2f46c18c202726bdd3fcee-2.mp4
https://boot-video.xuexi.cn/video/1006/p/8529ebb9aa153b4d04325e8584b1cd44-8cc16ecb8ad2441ebedf9d3cef76ebb5-2.mp4
https://boot-video.xuexi.cn/video/1006/p/4cbcf0776115a5a2409743c6286a7518-19c79ec4844646e78a12066c9d60e56b-2.mp4
https://boot-video.xuexi.cn/video/1006/p/cff211b0944565f0957ce65053239889-f485890a475047eebf81676a914acf96-2.mp4
https://boot-video.xuexi.cn/video/1006/p/649a17f375e581227c785f07f008164b-ff245af5c0b34118b118783865876148-2.mp4
https://boot-video.xuexi.cn/video/1006/p/395bfdbbfa2a13c48b42dffe60a964bb-db31575eb79548f087c8529fe8c57516-2.mp4
https://boot-video.xuexi.cn/video/1006/p/8c52ce19002c1b856d0efdacc1038db8-bc33fa71867440b8a62c34b1f59b4cba-2.mp4
https://boot-video.xuexi.cn/video/1006/p/3d0bfb2473842a295440720e7542bbba-43027d30f1bb49849fadf3f3679f913c-2.mp4
https://boot-video.xuexi.cn/video/1006/p/519b8af4b34e66ae125d551241434a83-eefe47cb08f24a63bf909094014676dd-2.mp4
https://boot-video.xuexi.cn/video/1006/p/fec74636fee82ccf3f47c5a1b96ba3ca-2e0d6d812d994b8693f77c813034ca27-2.mp4
https://boot-video.xuexi.cn/video/1006/p/3ce509ee964328884c429c416316e6eb-6d2ee7402de84677869bd6f44e408e1a-2.mp4
https://boot-video.xuexi.cn/video/1006/p/bd622a6f00cae493ca1205a035c93bf3-7224ed9b66d14cd1bd472637fc454853-2.mp4
https://boot-video.xuexi.cn/video/1006/p/02797843a2932a33e05ab8fa2b554d42-389940076e71460398a864ea6c32570c-2.mp4
https://boot-video.xuexi.cn/video/1006/p/da464b41516e6f53e1958d2f5702f53d-f614569db0f14e0ca1599222c17fb327-2.mp4
https://boot-video.xuexi.cn/video/1006/p/3ec09182194483e86ec42aa9cf5599f2-bdba19cc1ad84deb847bc6f1b70534eb-2.mp4
https://boot-video.xuexi.cn/video/1006/p/7b26c133b0cfca42ecf2ccbbfc36e689-42b9ff237c884d4dbce2a2842c8faf53-2.mp4
https://boot-video.xuexi.cn/video/1006/p/ad2d5062484e74e05641810d06e71c25-879dfddb8e0049c19680ae7bdff7a403-2.mp4
https://boot-video.xuexi.cn/video/1006/p/1cc397e194d914206a193a0dcbaaf649-f91e7a62bbdf4c4eafd27555096644e2-2.mp4
https://boot-video.xuexi.cn/video/1006/p/b0360d98873df7e7854e30e20dabd107-6e2cdd39c434474cbe408bcc4eeb0594-2.mp4
https://boot-video.xuexi.cn/video/1006/p/d5b209f3d6f05c4adbecab5dd415d58a-45c825d86b0640b5a20b445dd9ee1dc2-2.mp4
https://boot-video.xuexi.cn/video/1006/p/98bef60af42e3d6471bf1df948271118-58f6145b62d044fa9b5fa6ab86b64903-2.mp4
https://boot-video.xuexi.cn/video/1006/p/eb44453847aa49b61a174aec80abfc24-c0eb3b0efe794496b46a7fc22c5b969d-2.mp4
https://boot-video.xuexi.cn/video/1006/p/229f90b1ebf77732b3e6b426b82b07c0-92a75187186342d98630cc271b4efe5f-2.mp4
https://boot-video.xuexi.cn/video/1006/p/2be1df82bd23510e11257533486ecd23-77cdbfbe7f104d04acb276c4f6587b78-2.mp4
https://boot-video.xuexi.cn/video/1006/p/c46ee3226a22101331473c2397149c6f-69e2474d16e94f399d21a1d443b7c4c8-2.mp4
https://boot-video.xuexi.cn/video/1006/p/135ff5aba7cd42529db9f43e06149cd0-f6260aafb4514ba3915288e7b8bb2c3d-2.mp4
https://boot-video.xuexi.cn/video/1006/p/e9e0d0dce252ead465243991dead1585-d946b3e7c002413fbcd3f949813a7be4-2.mp4
https://boot-video.xuexi.cn/video/1006/p/a5b6ed955d7769af321c29b33059e545-2ffef5615a69435dbc93b7385072514c-2.mp4
https://boot-video.xuexi.cn/video/1006/p/f71231f0ff95a31d883e7a459d7ac7a5-59d3a7417c3a4671b7e75da2646097a7-2.mp4
https://boot-video.xuexi.cn/video/1006/p/14b972a46469283fe35ab9dc1746ca2e-be534fd49c23443898886d25084a5b24-2.mp4
https://boot-video.xuexi.cn/video/1006/p/aa1c1d3b2055f8e4e8e4bd135e162c0f-76aa004b273f4755a0d7a81fed81cf14-2.mp4
https://boot-video.xuexi.cn/video/1006/p/96ad67bd488fbee5edc05d882e687e46-78719eefb76c4b3d98db80c312e6060f-2.mp4
https://boot-video.xuexi.cn/video/1006/p/23c5b6b4a2a68c2555f4bc742236ca9b-a8298be10a9c4fbaa81c2cea3072932d-2.mp4
https://boot-video.xuexi.cn/video/1006/p/a1675428e11e764fbd1768b7f574b232-b7a9f438df8344f5861864c75e0bc9dd-2.mp4
https://boot-video.xuexi.cn/video/1006/p/e978f876a8417a42b21fdc980aff8925-778554c730d44be98bfe99352328479b-2.mp4
https://boot-video.xuexi.cn/video/1006/p/aac5acc7939a9590043d86be9f069e2d-ee3d8dbccb074707a1abf50ee4ea1cae-2.mp4
https://boot-video.xuexi.cn/video/1006/p/6a8657cc800fcbdebdc8f65864c4ebe4-e581f011019948dc98f37039085fc1b6-2.mp4
https://boot-video.xuexi.cn/video/1006/p/131c9b7e970f2b1cb289ee1f23ad4d4c-fc11d379a8d74699bc14f31ec61d5d9f-2.mp4
https://boot-video.xuexi.cn/video/1006/p/e8aea8cf65437dd1a6a3ee4f64150926-9171928858d64378b75e5f44171e3806-2.mp4
https://boot-video.xuexi.cn/video/1006/p/cb2393a3288c22fb33c118b47962731a-0fcc03caa2a04a0bb28314d5a5c55bfd-2.mp4
https://boot-video.xuexi.cn/video/1006/p/8d90b321cdab66934de7988d79f42d11-a5b1bf245b5048f29de29b28f0cf4b29-2.mp4
https://boot-video.xuexi.cn/video/1006/p/f0f79d4991d24406c4b1000808866aed-efbe26a5306c45df972488689c0ac6ca-2.mp4
https://boot-video.xuexi.cn/video/1006/p/e0fb2e96085f1f5db5f7492c212654c2-904f1c1ae17d4128a7af950eb010124d-2.mp4
https://boot-video.xuexi.cn/video/1006/p/19923f0e72ca7b750bf112796a14cda9-e6d6acb0e08f4b84aaf8f31dfd4ba09a-2.mp4
https://boot-video.xuexi.cn/video/1006/p/3e72c126a54dc9c8093b4301a8639a94-3f4b29907d8543c58dd2046ad853e415-2.mp4
https://boot-video.xuexi.cn/video/1006/p/22a8b76f1af75caca3bfdd47ad5ba8af-1c745b99a01c4a0a86e6ee0365aad457-2.mp4
https://boot-video.xuexi.cn/video/1006/p/4acd161d511c09fdd7c03a39a1f951b9-1813feef9a87401c9b623cd22bfc5c3f-2.mp4
https://boot-video.xuexi.cn/video/1006/p/c37f66820c0cf0e81c5474e2c57aff79-81e0cc7302d84106bcdb60292b8b3cc2-2.mp4
https://boot-video.xuexi.cn/video/1006/p/1704f9bf212e0fbaa4c6d04f65be9de1-369be5079a2240ce940400afefdb46db-2.mp4
https://boot-video.xuexi.cn/video/1006/p/969d64b4913ac02814e30f005aeb397e-07ffba0f8e4448bb873eb2206a84ee38-2.mp4
https://boot-video.xuexi.cn/video/1006/p/054d48d4c6a8ba28c196d4acf6541ae5-87e960537bf64e688a73d8588cb62bd4-2.mp4
https://boot-video.xuexi.cn/video/1006/p/0e34f3200ecf5508f2f328865826afa5-9a97e4fb7e124b9ca602c66342011701-2.mp4
https://boot-video.xuexi.cn/video/1006/p/184426272dd5b1bad60f330c7e4c6027-263cfee68ee844bbb9a41acec1098753-2.mp4
"""namestr ="""回乡偶书二首·其一
题西林壁
枫桥夜泊
游子吟
春夜喜雨
出赛二首·其一
四时田园杂兴·其三十一
赠花卿
送元二使安西
江南逢李龟年
鸟鸣涧
石灰吟
芙蓉楼送辛渐
春日
竹石
黄鹤楼送孟浩然之广陵
凉州词二首·其一
江南春
独坐敬亭山
乌衣巷
乞巧
乐游原
六月二十七日望湖楼醉书
渔歌子
寒食
七步诗
月下独酌四首·其一
秋夜将晓出篱门迎凉有感(其二)
蝉
山居球暝
秋夕
宿建德江
己亥杂诗(其二百二十)
闻官军收河南河北
竹里馆
夏日绝句
长歌行
竹枝词二首·其一
墨梅
示儿
游园不值
题临安邸
题都城南庄
舟过安仁
天竺寺八月十五日夜桂子
登飞来峰
咏华山
劝学
天净沙·秋
早春呈水部张十八员外(其一)
春雪
溪居即事
京师得家书
乡村四月
山中送别
游山西村
晚春
过故人庄
咏白鹭
蚕妇
冬夜读书示子聿
秋思
相思
浪淘沙
游钟山
渡汉江
西江月·夜行黄沙道中
梅花
宿新市徐公店
嫦娥
约客
易水送别
江雪
舟夜书所见
暮江吟
三衢道中
望洞庭
小儿垂钓
山行
晓出净慈寺松林子方
赋得古原草送别
夜书所见
早发白帝城
九月九日忆山东兄弟
忆江南
雪梅·其一
望庐山瀑布
大林寺桃花
滁州西涧
饮湖上初晴后雨二首·其二
绝句二首·其一
所见
采莲曲
望天门山
别董大二首·其一
江畔独步寻花·其六
夜宿山寺
鹿柴
咏柳
登鹳雀楼
村居
小池
过华清宫(其一)
悯农二首(其二)
商山早行
明日歌
绝句
春晓
题画
书湖阴先生壁(二首其一)
春望
画鸡
蜂
池上
问刘十九
菩萨蛮·书江西造口壁
山村咏怀
静夜思
牧童
清平乐·村居
赠汪伦
梅花
峨眉山月歌
夜雪
咏鹅
古朗月行(节选)
十二月十五夜
悯农二首·其一
汉乐府·江南
寻隐者不遇
画
"""urls_list = urlstr.strip().split("\n")names_list = namestr.strip().split("\n")print(urls_list)print(len(urls_list))    # 131print(names_list)print(len(names_list))   # 131# for i in range(len(urls_list)):for i in range(10):download_mp4_by_url(urls_list[i], names_list[i], i+1)if __name__ == "__main__":main()

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/794915.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

uni-app如何实现高性能

这篇文章主要讲解uni-app如何实现高性能的问题? 什么是uni-app? 简单说一下什么是uni-app,uni-app是继承自vue.js,对vue做了轻度定制,并且实现了完整的组件化开发,并且支持多端发布的一种架构&#xff0c…

电脑上音频太多,播放速度又不一致,如何批量调节音频播放速度?

批量调节音频速度是现代音频处理中的一个重要环节,尤其在音乐制作、电影剪辑、有声书制作等领域,它能够帮助制作者快速高效地调整音频的播放速度,从而满足特定的制作需求。本文将详细介绍批量调节音频速度的方法、技巧和注意事项,…

移动Web学习04-移动端订单结算页PC端个人中心页面

5、电商结算页面案例 css body{background-color: #F2F2F2; } * {box-sizing: border-box;margin: 0;padding: 0; }.main{padding: 12px 11px 80px; }.pay{display: flex;height: 80px;background-color: #fff;bottom: 0;width: 100%;border-top: 1px solid #ededed;position:…

04-自媒体文章-自动审核

自媒体文章-自动审核 1)自媒体文章自动审核流程 1 自媒体端发布文章后,开始审核文章 2 审核的主要是审核文章的内容(文本内容和图片) 3 借助第三方提供的接口审核文本 4 借助第三方提供的接口审核图片,由于图片存储到minIO中&…

JAVA毕业设计132—基于Java+Springboot+Vue的自习室座位预约小程序管理系统(源代码+数据库)

毕设所有选题: https://blog.csdn.net/2303_76227485/article/details/131104075 基于JavaSpringbootVue的自习室座位预约小程序管理系统(源代码数据库)132 一、系统介绍 本项目前后端分离带小程序,分为管理员、用户两种角色 1、用户: 注…

【Arthas案例】某应用依赖两个GAV-classifier不同的snakeyaml.jar,引起NoSuchMethodError

多个不同的GAV-classifier依赖冲突,引起NoSuchMethodError Maven依赖的三坐标体系GAV(G-groupId,A-artifactId,V-version) classifier通常用于区分从同一POM构建的具有不同内容的构件物(artifact)。它是可选的&#xf…

泰坦尼克号幸存者数据分析

泰坦尼克号幸存者数据分析 1、泰坦尼克号数据集2、数据集加载与概览3、泰坦尼克号幸存者数据分析4、哪些人可能成为幸存者? 1、泰坦尼克号数据集 泰坦尼克号的沉没是世界上最严重的海难事故之一,造成了大量的人员伤亡。这是一艘号称当时世界上最大的邮轮…

​​​​​​​【人工智能】手写数字识别

手写数字识别 实验背景 数据集介绍 MNIST数据集包含了一系列的手写数字图像,包括0到9的数字。每张图像都是灰度图像,尺寸为28x28像素。数据集共包含60000张训练图像和10000张测试图像。 MNIST数据集的目标是通过训练一个模型,使其能够正确地识…

彩虹聚合DNS管理系统v1.0全新发布

聚合DNS管理系统(https://github.com/netcccyun/dnsmgr)可以实现在一个网站内管理多个平台的域名解析,目前已支持的域名平台有:阿里云、腾讯云、华为云、西部数码、CloudFlare。本系统支持多用户,每个用户可分配不同的…

vscode+anaconda 环境python环境

环境说明: windows 10 vscodeanaconda anaconda 安装: 1、官网下载地址:Free Download | Anaconda 2、安装 接受协议,选择安装位置,一直next,到下面这一步,上面是将Anaconda 添加至环境变量&#xff0…

linux使用supervisor部署springboot

supervisor 美:[suːpərvaɪzər ] n.监督人;主管人;指导者; Supervisor是一个进程控制系统工具,用于在Linux系统上管理和监控其他进程。它可以启动、停止、重启和监控应用程序或服务,并在其异常退出时自动重启它们。Supervisor通过提供一个…

idea开发 java web 配电室后台管理系统bootstrap框架web结构java编程计算机网页

一、源码特点 java 配电室后台管理系统是一套完善的完整信息系统,结合java web开发和bootstrap UI框架完成本系统 ,对理解JSP java编程开发语言有帮助,系统具有完整的源代码和数据库,系统主 要采用B/S模式开发。 前段主要技术 cs…

阿里 Arthas 工具使用

Arthas 是一款线上监控诊断产品,通过全局视角实时查看应用 load、内存、gc、线程的状态信息,并能在不修改应用代码的情况下,对业务问题进行诊断,包括查看方法调用的出入参、异常,监测方法执行耗时,类加载信…

苹果CMSV10整合dplayer播放器增加记忆+P2P播放+自动下一集功能插件详细保姆级教程

1.本站已打包&#xff0c;可以直接下载然后上传到你服务器的苹果CMS网站static/player目录下就可以了&#xff0c;下面是教程 wlm3u8.js代码&#xff1a; MacPlayer.Html <iframe border"0" src"mac<span class"wp_keywordlink"><a hre…

全国航空机场分布矢量数据/旅游景点poi/全国港口码头分布/地铁站分布/火车站分布/POI矢量数据

民用航空机场是指针对包括跑道型机场、表面直升机场、高架直升机场、船上直升机场、直升机水上平台、滑翔机场、水上机场、有人操纵气球施放场以及其他专供民用航空器起降的划定区域。民用航空机场分为通用航空机场和公共运输机场&#xff1b;不包括临时机场和专用机场。 根据中…

SSM项目实战——哈哈音乐(四)前台模块开发

1、项目准备 ①导入依赖和前端资源 <project xmlns"http://maven.apache.org/POM/4.0.0" xmlns:xsi"http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.x…

解决element-plus table组件 fixed=“right“(left)浮动后横向滚动文字穿透的问题

BUG 版本&#xff1a;element-plus 2.6.1 浏览器&#xff1a;360极速浏览器22.1 (Chromium内核) 组件&#xff1a;el-table组件 问题&#xff1a;在头部/尾部浮动加上斑马条纹后&#xff0c;横向滚动存在文字穿透的问题。具体如图&#xff1a; 白色背景行的文字&#xff0c…

蓝桥杯单片机真题实践篇

这里就不完全写思路过程代码什么的&#xff0c;这一篇文章就写我在训练真题中遇到的过程。 &#xff08;呜呜呜&#xff0c;时间不够辣&#xff0c;能做多少算多少吧....&#xff09; 十三届省赛题 问题1&#xff1a;数码管的数字消影不明显 &#xff08;参考&#xff1a;蓝…

【蓝桥杯-单链表-网络寻路】

蓝桥杯-单链表-网络寻路 单链表基本操作操作一&#xff1a;向链表头插入一个数操作二:在第 k个插入的数后插入一个数操作三&#xff1a;删除第 k个插入的数后面的一个数&#xff1b; P8605 [蓝桥杯 2013 国 AC] 网络寻路 单链表基本操作 初始化有关操作 // head 表示头结点的…

python-基础篇-字符串、列表、元祖、字典-列表

文章目录 2.3.2列表2.3.2.1列表介绍2.3.2.1.1列表的格式2.3.2.1.2打印列表 2.3.2.2列表的增删改查2.3.2.2.1列表的遍历2.3.2.2.1.1使用for循环2.3.2.2.1.2使用while循环 2.3.2.2.2添加元素("增"append, extend, insert)2.3.2.2.2.1append 2.3.2.2.2.2extend2.3.2.2.2…