diff --git a/Pipfile b/Pipfile index 7708c367b8..bc96846046 100644 --- a/Pipfile +++ b/Pipfile @@ -25,7 +25,6 @@ flask = "*" opencc-python-reimplemented = "*" fake-useragent = "*" pillow = "*" -yt-dlp = "*" m3u8 = "*" [packages] @@ -39,7 +38,6 @@ opencc-python-reimplemented = "*" fake-useragent = "*" gunicorn = "*" pillow = "*" -yt-dlp = "*" m3u8 = "*" [requires] diff --git a/Pipfile.lock b/Pipfile.lock index 11d69aae20..c85a04d296 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "f8d4db3a4fe1099209d485a38a2cace440689aea074b7259df5fe915028d18e6" + "sha256": "0bdd7b70aad2f5d9925adc1233e40fa91169f68b0ea44f7d2563f7d83bdeabea" }, "pipfile-spec": 6, "requires": { @@ -26,86 +26,86 @@ }, "aiohttp": { "hashes": [ - "sha256:0411777249f25d11bd2964a230b3ffafcbed6cd65d0f2b132bc2b8f5b8c347c7", - "sha256:0a97d657f6cf8782a830bb476c13f7d777cfcab8428ac49dde15c22babceb361", - "sha256:0b5a5009b0159a8f707879dc102b139466d8ec6db05103ec1520394fdd8ea02c", - "sha256:0bcb7f6976dc0b6b56efde13294862adf68dd48854111b422a336fa729a82ea6", - "sha256:14624d96f0d69cf451deed3173079a68c322279be6030208b045ab77e1e8d550", - "sha256:15c4e489942d987d5dac0ba39e5772dcbed4cc9ae3710d1025d5ba95e4a5349c", - "sha256:176f8bb8931da0613bb0ed16326d01330066bb1e172dd97e1e02b1c27383277b", - "sha256:17af09d963fa1acd7e4c280e9354aeafd9e3d47eaa4a6bfbd2171ad7da49f0c5", - "sha256:1a8b13b9950d8b2f8f58b6e5842c4b842b5887e2c32e3f4644d6642f1659a530", - "sha256:202f40fb686e5f93908eee0c75d1e6fbe50a43e9bd4909bf3bf4a56b560ca180", - "sha256:21cbe97839b009826a61b143d3ca4964c8590d7aed33d6118125e5b71691ca46", - "sha256:27935716f8d62c1c73010428db310fd10136002cfc6d52b0ba7bdfa752d26066", - "sha256:282e0a7ddd36ebc411f156aeaa0491e8fe7f030e2a95da532cf0c84b0b70bc66", - "sha256:28f29bce89c3b401a53d6fd4bee401ee943083bf2bdc12ef297c1d63155070b0", - "sha256:2ac9fd83096df36728da8e2f4488ac3b5602238f602706606f3702f07a13a409", - "sha256:30f9f89ae625d412043f12ca3771b2ccec227cc93b93bb1f994db6e1af40a7d3", - "sha256:317251b9c9a2f1a9ff9cd093775b34c6861d1d7df9439ce3d32a88c275c995cd", - "sha256:31de2f10f63f96cc19e04bd2df9549559beadd0b2ee2da24a17e7ed877ca8c60", - "sha256:36df00e0541f264ce42d62280281541a47474dfda500bc5b7f24f70a7f87be7a", - "sha256:39625703540feb50b6b7f938b3856d1f4886d2e585d88274e62b1bd273fae09b", - "sha256:3f5461c77649358610fb9694e790956b4238ac5d9e697a17f63619c096469afe", - "sha256:4313f3bc901255b22f01663eeeae167468264fdae0d32c25fc631d5d6e15b502", - "sha256:442356e8924fe1a121f8c87866b0ecdc785757fd28924b17c20493961b3d6697", - "sha256:44cb1a1326a0264480a789e6100dc3e07122eb8cd1ad6b784a3d47d13ed1d89c", - "sha256:44d323aa80a867cb6db6bebb4bbec677c6478e38128847f2c6b0f70eae984d72", - "sha256:499368eb904566fbdf1a3836a1532000ef1308f34a1bcbf36e6351904cced771", - "sha256:4b01d9cfcb616eeb6d40f02e66bebfe7b06d9f2ef81641fdd50b8dd981166e0b", - "sha256:5720ebbc7a1b46c33a42d489d25d36c64c419f52159485e55589fbec648ea49a", - "sha256:5cc5e0d069c56645446c45a4b5010d4b33ac6c5ebfd369a791b5f097e46a3c08", - "sha256:618b18c3a2360ac940a5503da14fa4f880c5b9bc315ec20a830357bcc62e6bae", - "sha256:6435a66957cdba1a0b16f368bde03ce9c79c57306b39510da6ae5312a1a5b2c1", - "sha256:647ec5bee7e4ec9f1034ab48173b5fa970d9a991e565549b965e93331f1328fe", - "sha256:6e1e9e447856e9b7b3d38e1316ae9a8c92e7536ef48373de758ea055edfd5db5", - "sha256:6ef1550bb5f55f71b97a6a395286db07f7f2c01c8890e613556df9a51da91e8d", - "sha256:6ffa45cc55b18d4ac1396d1ddb029f139b1d3480f1594130e62bceadf2e1a838", - "sha256:77f31cebd8c27a36af6c7346055ac564946e562080ee1a838da724585c67474f", - "sha256:7a3b5b2c012d70c63d9d13c57ed1603709a4d9d7d473e4a9dfece0e4ea3d5f51", - "sha256:7a7ddf981a0b953ade1c2379052d47ccda2f58ab678fca0671c7c7ca2f67aac2", - "sha256:84de955314aa5e8d469b00b14d6d714b008087a0222b0f743e7ffac34ef56aff", - "sha256:8dcfd14c712aa9dd18049280bfb2f95700ff6a8bde645e09f17c3ed3f05a0130", - "sha256:928f92f80e2e8d6567b87d3316c1fd9860ccfe36e87a9a7f5237d4cda8baa1ba", - "sha256:9384b07cfd3045b37b05ed002d1c255db02fb96506ad65f0f9b776b762a7572e", - "sha256:96726839a42429318017e67a42cca75d4f0d5248a809b3cc2e125445edd7d50d", - "sha256:96bbec47beb131bbf4bae05d8ef99ad9e5738f12717cfbbf16648b78b0232e87", - "sha256:9bcf97b971289be69638d8b1b616f7e557e1342debc7fc86cf89d3f08960e411", - "sha256:a0cf4d814689e58f57ecd5d8c523e6538417ca2e72ff52c007c64065cef50fb2", - "sha256:a7c6147c6306f537cff59409609508a1d2eff81199f0302dd456bb9e7ea50c39", - "sha256:a9266644064779840feec0e34f10a89b3ff1d2d6b751fe90017abcad1864fa7c", - "sha256:afbe85b50ade42ddff5669947afde9e8a610e64d2c80be046d67ec4368e555fa", - "sha256:afcda759a69c6a8be3aae764ec6733155aa4a5ad9aad4f398b52ba4037942fe3", - "sha256:b2fab23003c4bb2249729a7290a76c1dda38c438300fdf97d4e42bf78b19c810", - "sha256:bd3f711f4c99da0091ced41dccdc1bcf8be0281dc314d6d9c6b6cf5df66f37a9", - "sha256:be0c7c98e38a1e3ad7a6ff64af8b6d6db34bf5a41b1478e24c3c74d9e7f8ed42", - "sha256:c1f2d7fd583fc79c240094b3e7237d88493814d4b300d013a42726c35a734bc9", - "sha256:c5bba6b83fde4ca233cfda04cbd4685ab88696b0c8eaf76f7148969eab5e248a", - "sha256:c6beeac698671baa558e82fa160be9761cf0eb25861943f4689ecf9000f8ebd0", - "sha256:c7333e7239415076d1418dbfb7fa4df48f3a5b00f8fdf854fca549080455bc14", - "sha256:c8a02f74ae419e3955af60f570d83187423e42e672a6433c5e292f1d23619269", - "sha256:c9c23e62f3545c2216100603614f9e019e41b9403c47dd85b8e7e5015bf1bde0", - "sha256:cca505829cdab58c2495ff418c96092d225a1bbd486f79017f6de915580d3c44", - "sha256:d3108f0ad5c6b6d78eec5273219a5bbd884b4aacec17883ceefaac988850ce6e", - "sha256:d4b8a1b6c7a68c73191f2ebd3bf66f7ce02f9c374e309bdb68ba886bbbf1b938", - "sha256:d6e274661c74195708fc4380a4ef64298926c5a50bb10fbae3d01627d7a075b7", - "sha256:db2914de2559809fdbcf3e48f41b17a493b58cb7988d3e211f6b63126c55fe82", - "sha256:e738aabff3586091221044b7a584865ddc4d6120346d12e28e788307cd731043", - "sha256:e7f6173302f8a329ca5d1ee592af9e628d3ade87816e9958dcf7cdae2841def7", - "sha256:e9d036a9a41fc78e8a3f10a86c2fc1098fca8fab8715ba9eb999ce4788d35df0", - "sha256:ea142255d4901b03f89cb6a94411ecec117786a76fc9ab043af8f51dd50b5313", - "sha256:ebd3e6b0c7d4954cca59d241970011f8d3327633d555051c430bd09ff49dc494", - "sha256:ec656680fc53a13f849c71afd0c84a55c536206d524cbc831cde80abbe80489e", - "sha256:ec8df0ff5a911c6d21957a9182402aad7bf060eaeffd77c9ea1c16aecab5adbf", - "sha256:ed95d66745f53e129e935ad726167d3a6cb18c5d33df3165974d54742c373868", - "sha256:ef2c9499b7bd1e24e473dc1a85de55d72fd084eea3d8bdeec7ee0720decb54fa", - "sha256:f5252ba8b43906f206048fa569debf2cd0da0316e8d5b4d25abe53307f573941", - "sha256:f737fef6e117856400afee4f17774cdea392b28ecf058833f5eca368a18cf1bf", - "sha256:fc726c3fa8f606d07bd2b500e5dc4c0fd664c59be7788a16b9e34352c50b6b6b" + "sha256:012f176945af138abc10c4a48743327a92b4ca9adc7a0e078077cdb5dbab7be0", + "sha256:02c13415b5732fb6ee7ff64583a5e6ed1c57aa68f17d2bda79c04888dfdc2769", + "sha256:03b6002e20938fc6ee0918c81d9e776bebccc84690e2b03ed132331cca065ee5", + "sha256:04814571cb72d65a6899db6099e377ed00710bf2e3eafd2985166f2918beaf59", + "sha256:0580f2e12de2138f34debcd5d88894786453a76e98febaf3e8fe5db62d01c9bf", + "sha256:06a8e2ee1cbac16fe61e51e0b0c269400e781b13bcfc33f5425912391a542985", + "sha256:076bc454a7e6fd646bc82ea7f98296be0b1219b5e3ef8a488afbdd8e81fbac50", + "sha256:0c9527819b29cd2b9f52033e7fb9ff08073df49b4799c89cb5754624ecd98299", + "sha256:0dc49f42422163efb7e6f1df2636fe3db72713f6cd94688e339dbe33fe06d61d", + "sha256:14cdb5a9570be5a04eec2ace174a48ae85833c2aadc86de68f55541f66ce42ab", + "sha256:15fccaf62a4889527539ecb86834084ecf6e9ea70588efde86e8bc775e0e7542", + "sha256:24213ba85a419103e641e55c27dc7ff03536c4873470c2478cce3311ba1eee7b", + "sha256:31d5093d3acd02b31c649d3a69bb072d539d4c7659b87caa4f6d2bcf57c2fa2b", + "sha256:3691ed7726fef54e928fe26344d930c0c8575bc968c3e239c2e1a04bd8cf7838", + "sha256:386fbe79863eb564e9f3615b959e28b222259da0c48fd1be5929ac838bc65683", + "sha256:3bbbfff4c679c64e6e23cb213f57cc2c9165c9a65d63717108a644eb5a7398df", + "sha256:3de34936eb1a647aa919655ff8d38b618e9f6b7f250cc19a57a4bf7fd2062b6d", + "sha256:40d1c7a7f750b5648642586ba7206999650208dbe5afbcc5284bcec6579c9b91", + "sha256:44224d815853962f48fe124748227773acd9686eba6dc102578defd6fc99e8d9", + "sha256:47ad15a65fb41c570cd0ad9a9ff8012489e68176e7207ec7b82a0940dddfd8be", + "sha256:482cafb7dc886bebeb6c9ba7925e03591a62ab34298ee70d3dd47ba966370d2c", + "sha256:49c7dbbc1a559ae14fc48387a115b7d4bbc84b4a2c3b9299c31696953c2a5219", + "sha256:4b2c7ac59c5698a7a8207ba72d9e9c15b0fc484a560be0788b31312c2c5504e4", + "sha256:4cca22a61b7fe45da8fc73c3443150c3608750bbe27641fc7558ec5117b27fdf", + "sha256:4cfce37f31f20800a6a6620ce2cdd6737b82e42e06e6e9bd1b36f546feb3c44f", + "sha256:502a1464ccbc800b4b1995b302efaf426e8763fadf185e933c2931df7db9a199", + "sha256:53bf2097e05c2accc166c142a2090e4c6fd86581bde3fd9b2d3f9e93dda66ac1", + "sha256:593c114a2221444f30749cc5e5f4012488f56bd14de2af44fe23e1e9894a9c60", + "sha256:5d6958671b296febe7f5f859bea581a21c1d05430d1bbdcf2b393599b1cdce77", + "sha256:5ef359ebc6949e3a34c65ce20230fae70920714367c63afd80ea0c2702902ccf", + "sha256:613e5169f8ae77b1933e42e418a95931fb4867b2991fc311430b15901ed67079", + "sha256:61b9bae80ed1f338c42f57c16918853dc51775fb5cb61da70d590de14d8b5fb4", + "sha256:6362cc6c23c08d18ddbf0e8c4d5159b5df74fea1a5278ff4f2c79aed3f4e9f46", + "sha256:65a96e3e03300b41f261bbfd40dfdbf1c301e87eab7cd61c054b1f2e7c89b9e8", + "sha256:65e55ca7debae8faaffee0ebb4b47a51b4075f01e9b641c31e554fd376595c6c", + "sha256:68386d78743e6570f054fe7949d6cb37ef2b672b4d3405ce91fafa996f7d9b4d", + "sha256:68ff6f48b51bd78ea92b31079817aff539f6c8fc80b6b8d6ca347d7c02384e33", + "sha256:6ab29b8a0beb6f8eaf1e5049252cfe74adbaafd39ba91e10f18caeb0e99ffb34", + "sha256:77ae58586930ee6b2b6f696c82cf8e78c8016ec4795c53e36718365f6959dc82", + "sha256:77c4aa15a89847b9891abf97f3d4048f3c2d667e00f8a623c89ad2dccee6771b", + "sha256:78153314f26d5abef3239b4a9af20c229c6f3ecb97d4c1c01b22c4f87669820c", + "sha256:7852bbcb4d0d2f0c4d583f40c3bc750ee033265d80598d0f9cb6f372baa6b836", + "sha256:7e97d622cb083e86f18317282084bc9fbf261801b0192c34fe4b1febd9f7ae69", + "sha256:7f3dc0e330575f5b134918976a645e79adf333c0a1439dcf6899a80776c9ab39", + "sha256:80886dac673ceaef499de2f393fc80bb4481a129e6cb29e624a12e3296cc088f", + "sha256:811f23b3351ca532af598405db1093f018edf81368e689d1b508c57dcc6b6a32", + "sha256:86a5dfcc39309470bd7b68c591d84056d195428d5d2e0b5ccadfbaf25b026ebc", + "sha256:8b3cf2dc0f0690a33f2d2b2cb15db87a65f1c609f53c37e226f84edb08d10f52", + "sha256:8cc5203b817b748adccb07f36390feb730b1bc5f56683445bfe924fc270b8816", + "sha256:909af95a72cedbefe5596f0bdf3055740f96c1a4baa0dd11fd74ca4de0b4e3f1", + "sha256:974d3a2cce5fcfa32f06b13ccc8f20c6ad9c51802bb7f829eae8a1845c4019ec", + "sha256:98283b94cc0e11c73acaf1c9698dea80c830ca476492c0fe2622bd931f34b487", + "sha256:98f5635f7b74bcd4f6f72fcd85bea2154b323a9f05226a80bc7398d0c90763b0", + "sha256:99b7920e7165be5a9e9a3a7f1b680f06f68ff0d0328ff4079e5163990d046767", + "sha256:9bca390cb247dbfaec3c664326e034ef23882c3f3bfa5fbf0b56cad0320aaca5", + "sha256:9e2e576caec5c6a6b93f41626c9c02fc87cd91538b81a3670b2e04452a63def6", + "sha256:9ef405356ba989fb57f84cac66f7b0260772836191ccefbb987f414bcd2979d9", + "sha256:a55d2ad345684e7c3dd2c20d2f9572e9e1d5446d57200ff630e6ede7612e307f", + "sha256:ab7485222db0959a87fbe8125e233b5a6f01f4400785b36e8a7878170d8c3138", + "sha256:b1fc6b45010a8d0ff9e88f9f2418c6fd408c99c211257334aff41597ebece42e", + "sha256:b78f053a7ecfc35f0451d961dacdc671f4bcbc2f58241a7c820e9d82559844cf", + "sha256:b99acd4730ad1b196bfb03ee0803e4adac371ae8efa7e1cbc820200fc5ded109", + "sha256:be2b516f56ea883a3e14dda17059716593526e10fb6303189aaf5503937db408", + "sha256:beb39a6d60a709ae3fb3516a1581777e7e8b76933bb88c8f4420d875bb0267c6", + "sha256:bf3d1a519a324af764a46da4115bdbd566b3c73fb793ffb97f9111dbc684fc4d", + "sha256:c49a76c1038c2dd116fa443eba26bbb8e6c37e924e2513574856de3b6516be99", + "sha256:c5532f0441fc09c119e1dca18fbc0687e64fbeb45aa4d6a87211ceaee50a74c4", + "sha256:c6b9e6d7e41656d78e37ce754813fa44b455c3d0d0dced2a047def7dc5570b74", + "sha256:c87bf31b7fdab94ae3adbe4a48e711bfc5f89d21cf4c197e75561def39e223bc", + "sha256:cbad88a61fa743c5d283ad501b01c153820734118b65aee2bd7dbb735475ce0d", + "sha256:cf14627232dfa8730453752e9cdc210966490992234d77ff90bc8dc0dce361d5", + "sha256:db1d0b28fcb7f1d35600150c3e4b490775251dea70f894bf15c678fdd84eda6a", + "sha256:ddf5f7d877615f6a1e75971bfa5ac88609af3b74796ff3e06879e8422729fd01", + "sha256:e44a9a3c053b90c6f09b1bb4edd880959f5328cf63052503f892c41ea786d99f", + "sha256:efb15a17a12497685304b2d976cb4939e55137df7b09fa53f1b6a023f01fcb4e", + "sha256:fbbaea811a2bba171197b08eea288b9402faa2bab2ba0858eecdd0a4105753a3" ], "index": "aliyun", "markers": "python_version >= '3.9'", - "version": "==3.11.9" + "version": "==3.11.10" }, "aiosignal": { "hashes": [ @@ -295,11 +295,12 @@ }, "fake-useragent": { "hashes": [ - "sha256:57415096557c8a4e23b62a375c21c55af5fd4ba30549227f562d2c4f5b60e3b3", - "sha256:6387269f5a2196b5ba7ed8935852f75486845a1c95c50e72460e6a8e762f5c49" + "sha256:8bae50abb72c309a5b3ae2f01a0b82426613fd5c4e2a04dca9332399ec44daa1", + "sha256:af86a26ef8229efece8fed529b4aeb5b73747d889b60f01cd477b6f301df46e6" ], "index": "aliyun", - "version": "==1.5.1" + "markers": "python_version >= '3.9'", + "version": "==2.0.3" }, "flask": { "hashes": [ @@ -930,17 +931,6 @@ ], "markers": "python_version >= '3.9'", "version": "==1.18.3" - }, - "yt-dlp": { - "hashes": [ - "sha256:1bc3f137d039bf2ab801a61ce008f39bf3699ea994aa8d09a79bf50e626890d6", - "sha256:35abff51c5762033103f2330ba0a8a1f48c4388a413a2d8cdc9b84642fe8edd4", - "sha256:8d6e5838a11ff588f1f0bbb563144cf8eca526689076862ad379b36a94359e82", - "sha256:a6b32ea879ce3f95b47b9b57948b755b4d61f3700d4fc24602b17537ddf0cf90" - ], - "index": "aliyun", - "markers": "python_version >= '3.9'", - "version": "==2024.12.3" } }, "develop": { @@ -954,86 +944,86 @@ }, "aiohttp": { "hashes": [ - "sha256:0411777249f25d11bd2964a230b3ffafcbed6cd65d0f2b132bc2b8f5b8c347c7", - "sha256:0a97d657f6cf8782a830bb476c13f7d777cfcab8428ac49dde15c22babceb361", - "sha256:0b5a5009b0159a8f707879dc102b139466d8ec6db05103ec1520394fdd8ea02c", - "sha256:0bcb7f6976dc0b6b56efde13294862adf68dd48854111b422a336fa729a82ea6", - "sha256:14624d96f0d69cf451deed3173079a68c322279be6030208b045ab77e1e8d550", - "sha256:15c4e489942d987d5dac0ba39e5772dcbed4cc9ae3710d1025d5ba95e4a5349c", - "sha256:176f8bb8931da0613bb0ed16326d01330066bb1e172dd97e1e02b1c27383277b", - "sha256:17af09d963fa1acd7e4c280e9354aeafd9e3d47eaa4a6bfbd2171ad7da49f0c5", - "sha256:1a8b13b9950d8b2f8f58b6e5842c4b842b5887e2c32e3f4644d6642f1659a530", - "sha256:202f40fb686e5f93908eee0c75d1e6fbe50a43e9bd4909bf3bf4a56b560ca180", - "sha256:21cbe97839b009826a61b143d3ca4964c8590d7aed33d6118125e5b71691ca46", - "sha256:27935716f8d62c1c73010428db310fd10136002cfc6d52b0ba7bdfa752d26066", - "sha256:282e0a7ddd36ebc411f156aeaa0491e8fe7f030e2a95da532cf0c84b0b70bc66", - "sha256:28f29bce89c3b401a53d6fd4bee401ee943083bf2bdc12ef297c1d63155070b0", - "sha256:2ac9fd83096df36728da8e2f4488ac3b5602238f602706606f3702f07a13a409", - "sha256:30f9f89ae625d412043f12ca3771b2ccec227cc93b93bb1f994db6e1af40a7d3", - "sha256:317251b9c9a2f1a9ff9cd093775b34c6861d1d7df9439ce3d32a88c275c995cd", - "sha256:31de2f10f63f96cc19e04bd2df9549559beadd0b2ee2da24a17e7ed877ca8c60", - "sha256:36df00e0541f264ce42d62280281541a47474dfda500bc5b7f24f70a7f87be7a", - "sha256:39625703540feb50b6b7f938b3856d1f4886d2e585d88274e62b1bd273fae09b", - "sha256:3f5461c77649358610fb9694e790956b4238ac5d9e697a17f63619c096469afe", - "sha256:4313f3bc901255b22f01663eeeae167468264fdae0d32c25fc631d5d6e15b502", - "sha256:442356e8924fe1a121f8c87866b0ecdc785757fd28924b17c20493961b3d6697", - "sha256:44cb1a1326a0264480a789e6100dc3e07122eb8cd1ad6b784a3d47d13ed1d89c", - "sha256:44d323aa80a867cb6db6bebb4bbec677c6478e38128847f2c6b0f70eae984d72", - "sha256:499368eb904566fbdf1a3836a1532000ef1308f34a1bcbf36e6351904cced771", - "sha256:4b01d9cfcb616eeb6d40f02e66bebfe7b06d9f2ef81641fdd50b8dd981166e0b", - "sha256:5720ebbc7a1b46c33a42d489d25d36c64c419f52159485e55589fbec648ea49a", - "sha256:5cc5e0d069c56645446c45a4b5010d4b33ac6c5ebfd369a791b5f097e46a3c08", - "sha256:618b18c3a2360ac940a5503da14fa4f880c5b9bc315ec20a830357bcc62e6bae", - "sha256:6435a66957cdba1a0b16f368bde03ce9c79c57306b39510da6ae5312a1a5b2c1", - "sha256:647ec5bee7e4ec9f1034ab48173b5fa970d9a991e565549b965e93331f1328fe", - "sha256:6e1e9e447856e9b7b3d38e1316ae9a8c92e7536ef48373de758ea055edfd5db5", - "sha256:6ef1550bb5f55f71b97a6a395286db07f7f2c01c8890e613556df9a51da91e8d", - "sha256:6ffa45cc55b18d4ac1396d1ddb029f139b1d3480f1594130e62bceadf2e1a838", - "sha256:77f31cebd8c27a36af6c7346055ac564946e562080ee1a838da724585c67474f", - "sha256:7a3b5b2c012d70c63d9d13c57ed1603709a4d9d7d473e4a9dfece0e4ea3d5f51", - "sha256:7a7ddf981a0b953ade1c2379052d47ccda2f58ab678fca0671c7c7ca2f67aac2", - "sha256:84de955314aa5e8d469b00b14d6d714b008087a0222b0f743e7ffac34ef56aff", - "sha256:8dcfd14c712aa9dd18049280bfb2f95700ff6a8bde645e09f17c3ed3f05a0130", - "sha256:928f92f80e2e8d6567b87d3316c1fd9860ccfe36e87a9a7f5237d4cda8baa1ba", - "sha256:9384b07cfd3045b37b05ed002d1c255db02fb96506ad65f0f9b776b762a7572e", - "sha256:96726839a42429318017e67a42cca75d4f0d5248a809b3cc2e125445edd7d50d", - "sha256:96bbec47beb131bbf4bae05d8ef99ad9e5738f12717cfbbf16648b78b0232e87", - "sha256:9bcf97b971289be69638d8b1b616f7e557e1342debc7fc86cf89d3f08960e411", - "sha256:a0cf4d814689e58f57ecd5d8c523e6538417ca2e72ff52c007c64065cef50fb2", - "sha256:a7c6147c6306f537cff59409609508a1d2eff81199f0302dd456bb9e7ea50c39", - "sha256:a9266644064779840feec0e34f10a89b3ff1d2d6b751fe90017abcad1864fa7c", - "sha256:afbe85b50ade42ddff5669947afde9e8a610e64d2c80be046d67ec4368e555fa", - "sha256:afcda759a69c6a8be3aae764ec6733155aa4a5ad9aad4f398b52ba4037942fe3", - "sha256:b2fab23003c4bb2249729a7290a76c1dda38c438300fdf97d4e42bf78b19c810", - "sha256:bd3f711f4c99da0091ced41dccdc1bcf8be0281dc314d6d9c6b6cf5df66f37a9", - "sha256:be0c7c98e38a1e3ad7a6ff64af8b6d6db34bf5a41b1478e24c3c74d9e7f8ed42", - "sha256:c1f2d7fd583fc79c240094b3e7237d88493814d4b300d013a42726c35a734bc9", - "sha256:c5bba6b83fde4ca233cfda04cbd4685ab88696b0c8eaf76f7148969eab5e248a", - "sha256:c6beeac698671baa558e82fa160be9761cf0eb25861943f4689ecf9000f8ebd0", - "sha256:c7333e7239415076d1418dbfb7fa4df48f3a5b00f8fdf854fca549080455bc14", - "sha256:c8a02f74ae419e3955af60f570d83187423e42e672a6433c5e292f1d23619269", - "sha256:c9c23e62f3545c2216100603614f9e019e41b9403c47dd85b8e7e5015bf1bde0", - "sha256:cca505829cdab58c2495ff418c96092d225a1bbd486f79017f6de915580d3c44", - "sha256:d3108f0ad5c6b6d78eec5273219a5bbd884b4aacec17883ceefaac988850ce6e", - "sha256:d4b8a1b6c7a68c73191f2ebd3bf66f7ce02f9c374e309bdb68ba886bbbf1b938", - "sha256:d6e274661c74195708fc4380a4ef64298926c5a50bb10fbae3d01627d7a075b7", - "sha256:db2914de2559809fdbcf3e48f41b17a493b58cb7988d3e211f6b63126c55fe82", - "sha256:e738aabff3586091221044b7a584865ddc4d6120346d12e28e788307cd731043", - "sha256:e7f6173302f8a329ca5d1ee592af9e628d3ade87816e9958dcf7cdae2841def7", - "sha256:e9d036a9a41fc78e8a3f10a86c2fc1098fca8fab8715ba9eb999ce4788d35df0", - "sha256:ea142255d4901b03f89cb6a94411ecec117786a76fc9ab043af8f51dd50b5313", - "sha256:ebd3e6b0c7d4954cca59d241970011f8d3327633d555051c430bd09ff49dc494", - "sha256:ec656680fc53a13f849c71afd0c84a55c536206d524cbc831cde80abbe80489e", - "sha256:ec8df0ff5a911c6d21957a9182402aad7bf060eaeffd77c9ea1c16aecab5adbf", - "sha256:ed95d66745f53e129e935ad726167d3a6cb18c5d33df3165974d54742c373868", - "sha256:ef2c9499b7bd1e24e473dc1a85de55d72fd084eea3d8bdeec7ee0720decb54fa", - "sha256:f5252ba8b43906f206048fa569debf2cd0da0316e8d5b4d25abe53307f573941", - "sha256:f737fef6e117856400afee4f17774cdea392b28ecf058833f5eca368a18cf1bf", - "sha256:fc726c3fa8f606d07bd2b500e5dc4c0fd664c59be7788a16b9e34352c50b6b6b" + "sha256:012f176945af138abc10c4a48743327a92b4ca9adc7a0e078077cdb5dbab7be0", + "sha256:02c13415b5732fb6ee7ff64583a5e6ed1c57aa68f17d2bda79c04888dfdc2769", + "sha256:03b6002e20938fc6ee0918c81d9e776bebccc84690e2b03ed132331cca065ee5", + "sha256:04814571cb72d65a6899db6099e377ed00710bf2e3eafd2985166f2918beaf59", + "sha256:0580f2e12de2138f34debcd5d88894786453a76e98febaf3e8fe5db62d01c9bf", + "sha256:06a8e2ee1cbac16fe61e51e0b0c269400e781b13bcfc33f5425912391a542985", + "sha256:076bc454a7e6fd646bc82ea7f98296be0b1219b5e3ef8a488afbdd8e81fbac50", + "sha256:0c9527819b29cd2b9f52033e7fb9ff08073df49b4799c89cb5754624ecd98299", + "sha256:0dc49f42422163efb7e6f1df2636fe3db72713f6cd94688e339dbe33fe06d61d", + "sha256:14cdb5a9570be5a04eec2ace174a48ae85833c2aadc86de68f55541f66ce42ab", + "sha256:15fccaf62a4889527539ecb86834084ecf6e9ea70588efde86e8bc775e0e7542", + "sha256:24213ba85a419103e641e55c27dc7ff03536c4873470c2478cce3311ba1eee7b", + "sha256:31d5093d3acd02b31c649d3a69bb072d539d4c7659b87caa4f6d2bcf57c2fa2b", + "sha256:3691ed7726fef54e928fe26344d930c0c8575bc968c3e239c2e1a04bd8cf7838", + "sha256:386fbe79863eb564e9f3615b959e28b222259da0c48fd1be5929ac838bc65683", + "sha256:3bbbfff4c679c64e6e23cb213f57cc2c9165c9a65d63717108a644eb5a7398df", + "sha256:3de34936eb1a647aa919655ff8d38b618e9f6b7f250cc19a57a4bf7fd2062b6d", + "sha256:40d1c7a7f750b5648642586ba7206999650208dbe5afbcc5284bcec6579c9b91", + "sha256:44224d815853962f48fe124748227773acd9686eba6dc102578defd6fc99e8d9", + "sha256:47ad15a65fb41c570cd0ad9a9ff8012489e68176e7207ec7b82a0940dddfd8be", + "sha256:482cafb7dc886bebeb6c9ba7925e03591a62ab34298ee70d3dd47ba966370d2c", + "sha256:49c7dbbc1a559ae14fc48387a115b7d4bbc84b4a2c3b9299c31696953c2a5219", + "sha256:4b2c7ac59c5698a7a8207ba72d9e9c15b0fc484a560be0788b31312c2c5504e4", + "sha256:4cca22a61b7fe45da8fc73c3443150c3608750bbe27641fc7558ec5117b27fdf", + "sha256:4cfce37f31f20800a6a6620ce2cdd6737b82e42e06e6e9bd1b36f546feb3c44f", + "sha256:502a1464ccbc800b4b1995b302efaf426e8763fadf185e933c2931df7db9a199", + "sha256:53bf2097e05c2accc166c142a2090e4c6fd86581bde3fd9b2d3f9e93dda66ac1", + "sha256:593c114a2221444f30749cc5e5f4012488f56bd14de2af44fe23e1e9894a9c60", + "sha256:5d6958671b296febe7f5f859bea581a21c1d05430d1bbdcf2b393599b1cdce77", + "sha256:5ef359ebc6949e3a34c65ce20230fae70920714367c63afd80ea0c2702902ccf", + "sha256:613e5169f8ae77b1933e42e418a95931fb4867b2991fc311430b15901ed67079", + "sha256:61b9bae80ed1f338c42f57c16918853dc51775fb5cb61da70d590de14d8b5fb4", + "sha256:6362cc6c23c08d18ddbf0e8c4d5159b5df74fea1a5278ff4f2c79aed3f4e9f46", + "sha256:65a96e3e03300b41f261bbfd40dfdbf1c301e87eab7cd61c054b1f2e7c89b9e8", + "sha256:65e55ca7debae8faaffee0ebb4b47a51b4075f01e9b641c31e554fd376595c6c", + "sha256:68386d78743e6570f054fe7949d6cb37ef2b672b4d3405ce91fafa996f7d9b4d", + "sha256:68ff6f48b51bd78ea92b31079817aff539f6c8fc80b6b8d6ca347d7c02384e33", + "sha256:6ab29b8a0beb6f8eaf1e5049252cfe74adbaafd39ba91e10f18caeb0e99ffb34", + "sha256:77ae58586930ee6b2b6f696c82cf8e78c8016ec4795c53e36718365f6959dc82", + "sha256:77c4aa15a89847b9891abf97f3d4048f3c2d667e00f8a623c89ad2dccee6771b", + "sha256:78153314f26d5abef3239b4a9af20c229c6f3ecb97d4c1c01b22c4f87669820c", + "sha256:7852bbcb4d0d2f0c4d583f40c3bc750ee033265d80598d0f9cb6f372baa6b836", + "sha256:7e97d622cb083e86f18317282084bc9fbf261801b0192c34fe4b1febd9f7ae69", + "sha256:7f3dc0e330575f5b134918976a645e79adf333c0a1439dcf6899a80776c9ab39", + "sha256:80886dac673ceaef499de2f393fc80bb4481a129e6cb29e624a12e3296cc088f", + "sha256:811f23b3351ca532af598405db1093f018edf81368e689d1b508c57dcc6b6a32", + "sha256:86a5dfcc39309470bd7b68c591d84056d195428d5d2e0b5ccadfbaf25b026ebc", + "sha256:8b3cf2dc0f0690a33f2d2b2cb15db87a65f1c609f53c37e226f84edb08d10f52", + "sha256:8cc5203b817b748adccb07f36390feb730b1bc5f56683445bfe924fc270b8816", + "sha256:909af95a72cedbefe5596f0bdf3055740f96c1a4baa0dd11fd74ca4de0b4e3f1", + "sha256:974d3a2cce5fcfa32f06b13ccc8f20c6ad9c51802bb7f829eae8a1845c4019ec", + "sha256:98283b94cc0e11c73acaf1c9698dea80c830ca476492c0fe2622bd931f34b487", + "sha256:98f5635f7b74bcd4f6f72fcd85bea2154b323a9f05226a80bc7398d0c90763b0", + "sha256:99b7920e7165be5a9e9a3a7f1b680f06f68ff0d0328ff4079e5163990d046767", + "sha256:9bca390cb247dbfaec3c664326e034ef23882c3f3bfa5fbf0b56cad0320aaca5", + "sha256:9e2e576caec5c6a6b93f41626c9c02fc87cd91538b81a3670b2e04452a63def6", + "sha256:9ef405356ba989fb57f84cac66f7b0260772836191ccefbb987f414bcd2979d9", + "sha256:a55d2ad345684e7c3dd2c20d2f9572e9e1d5446d57200ff630e6ede7612e307f", + "sha256:ab7485222db0959a87fbe8125e233b5a6f01f4400785b36e8a7878170d8c3138", + "sha256:b1fc6b45010a8d0ff9e88f9f2418c6fd408c99c211257334aff41597ebece42e", + "sha256:b78f053a7ecfc35f0451d961dacdc671f4bcbc2f58241a7c820e9d82559844cf", + "sha256:b99acd4730ad1b196bfb03ee0803e4adac371ae8efa7e1cbc820200fc5ded109", + "sha256:be2b516f56ea883a3e14dda17059716593526e10fb6303189aaf5503937db408", + "sha256:beb39a6d60a709ae3fb3516a1581777e7e8b76933bb88c8f4420d875bb0267c6", + "sha256:bf3d1a519a324af764a46da4115bdbd566b3c73fb793ffb97f9111dbc684fc4d", + "sha256:c49a76c1038c2dd116fa443eba26bbb8e6c37e924e2513574856de3b6516be99", + "sha256:c5532f0441fc09c119e1dca18fbc0687e64fbeb45aa4d6a87211ceaee50a74c4", + "sha256:c6b9e6d7e41656d78e37ce754813fa44b455c3d0d0dced2a047def7dc5570b74", + "sha256:c87bf31b7fdab94ae3adbe4a48e711bfc5f89d21cf4c197e75561def39e223bc", + "sha256:cbad88a61fa743c5d283ad501b01c153820734118b65aee2bd7dbb735475ce0d", + "sha256:cf14627232dfa8730453752e9cdc210966490992234d77ff90bc8dc0dce361d5", + "sha256:db1d0b28fcb7f1d35600150c3e4b490775251dea70f894bf15c678fdd84eda6a", + "sha256:ddf5f7d877615f6a1e75971bfa5ac88609af3b74796ff3e06879e8422729fd01", + "sha256:e44a9a3c053b90c6f09b1bb4edd880959f5328cf63052503f892c41ea786d99f", + "sha256:efb15a17a12497685304b2d976cb4939e55137df7b09fa53f1b6a023f01fcb4e", + "sha256:fbbaea811a2bba171197b08eea288b9402faa2bab2ba0858eecdd0a4105753a3" ], "index": "aliyun", "markers": "python_version >= '3.9'", - "version": "==3.11.9" + "version": "==3.11.10" }, "aiosignal": { "hashes": [ @@ -1303,11 +1293,12 @@ }, "fake-useragent": { "hashes": [ - "sha256:57415096557c8a4e23b62a375c21c55af5fd4ba30549227f562d2c4f5b60e3b3", - "sha256:6387269f5a2196b5ba7ed8935852f75486845a1c95c50e72460e6a8e762f5c49" + "sha256:8bae50abb72c309a5b3ae2f01a0b82426613fd5c4e2a04dca9332399ec44daa1", + "sha256:af86a26ef8229efece8fed529b4aeb5b73747d889b60f01cd477b6f301df46e6" ], "index": "aliyun", - "version": "==1.5.1" + "markers": "python_version >= '3.9'", + "version": "==2.0.3" }, "flask": { "hashes": [ @@ -2077,17 +2068,6 @@ ], "markers": "python_version >= '3.9'", "version": "==1.18.3" - }, - "yt-dlp": { - "hashes": [ - "sha256:1bc3f137d039bf2ab801a61ce008f39bf3699ea994aa8d09a79bf50e626890d6", - "sha256:35abff51c5762033103f2330ba0a8a1f48c4388a413a2d8cdc9b84642fe8edd4", - "sha256:8d6e5838a11ff588f1f0bbb563144cf8eca526689076862ad379b36a94359e82", - "sha256:a6b32ea879ce3f95b47b9b57948b755b4d61f3700d4fc24602b17537ddf0cf90" - ], - "index": "aliyun", - "markers": "python_version >= '3.9'", - "version": "==2024.12.3" } } } diff --git a/config/cache.pkl b/config/cache.pkl deleted file mode 100644 index 6838378182..0000000000 Binary files a/config/cache.pkl and /dev/null differ diff --git a/config/config.ini b/config/config.ini index 4a48df8205..2c8b5b64e9 100644 --- a/config/config.ini +++ b/config/config.ini @@ -13,6 +13,8 @@ open_keep_all = False open_sort = True sort_timeout = 10 open_ffmpeg = True +open_filter_speed = True +min_speed = 0.5 open_filter_resolution = True min_resolution = 1920x1080 delay_weight = 0.25 @@ -26,7 +28,7 @@ ipv6_num = 5 open_m3u_result = True url_keywords_blacklist = epg.pw,skype.serv00.net,iptv.yjxfz.com,live-hls-web-ajb.getaj.net,live.goodiptv.club,hc73k3dhwo5gfkt.wcetv.com,stream1.freetv.fun,zw9999.cnstream.top,zsntlqj.xicp.net open_subscribe = True -subscribe_urls = https://iptv.b2og.com/txt/fmml_ipv6.txt,https://ghp.ci/raw.githubusercontent.com/suxuang/myIPTV/main/ipv6.m3u,https://live.zbds.top/tv/iptv6.txt,https://live.zbds.top/tv/iptv4.txt,https://live.fanmingming.com/tv/m3u/ipv6.m3u,https://ghp.ci/https://raw.githubusercontent.com/joevess/IPTV/main/home.m3u8,https://aktv.top/live.txt,http://175.178.251.183:6689/live.txt,https://ghp.ci/https://raw.githubusercontent.com/kimwang1978/collect-tv-txt/main/merged_output.txt,https://m3u.ibert.me/txt/fmml_dv6.txt,https://m3u.ibert.me/txt/o_cn.txt,https://m3u.ibert.me/txt/j_iptv.txt,https://ghp.ci/https://raw.githubusercontent.com/xzw832/cmys/main/S_CCTV.txt,https://ghp.ci/https://raw.githubusercontent.com/xzw832/cmys/main/S_weishi.txt,http://itv.22m.top/ITVBox/tv/tvonline.txt,https://ghp.ci//https://raw.githubusercontent.com/asdjkl6/tv/tv/.m3u/整套直播源/测试/整套直播源/l.txt,https://ghp.ci//https://raw.githubusercontent.com/asdjkl6/tv/tv/.m3u/整套直播源/测试/整套直播源/kk.txt +subscribe_urls = https://iptv.b2og.com/txt/fmml_ipv6.txt,https://ghp.ci/raw.githubusercontent.com/suxuang/myIPTV/main/ipv6.m3u,https://live.zbds.top/tv/iptv6.txt,https://live.zbds.top/tv/iptv4.txt,https://live.fanmingming.com/tv/m3u/ipv6.m3u,https://ghp.ci/https://raw.githubusercontent.com/joevess/IPTV/main/home.m3u8,https://aktv.top/live.txt,http://175.178.251.183:6689/live.txt,https://ghp.ci/https://raw.githubusercontent.com/kimwang1978/collect-tv-txt/main/merged_output.txt,https://m3u.ibert.me/txt/fmml_dv6.txt,https://m3u.ibert.me/txt/o_cn.txt,https://m3u.ibert.me/txt/j_iptv.txt,https://ghp.ci/https://raw.githubusercontent.com/xzw832/cmys/main/S_CCTV.txt,https://ghp.ci/https://raw.githubusercontent.com/xzw832/cmys/main/S_weishi.txt,https://ghp.ci//https://raw.githubusercontent.com/asdjkl6/tv/tv/.m3u/整套直播源/测试/整套直播源/l.txt,https://ghp.ci//https://raw.githubusercontent.com/asdjkl6/tv/tv/.m3u/整套直播源/测试/整套直播源/kk.txt open_multicast = True open_multicast_foodie = True open_multicast_fofa = True diff --git a/docs/config.md b/docs/config.md index 102088f806..b8aa56df22 100644 --- a/docs/config.md +++ b/docs/config.md @@ -17,6 +17,8 @@ | sort_timeout | 5 | 单个接口测速超时时长,单位秒(s);数值越大测速所属时间越长,能提高获取接口数量,但质量会有所下降;数值越小测速所需时间越短,能获取低延时的接口,质量较好;调整此值能优化更新时间 | | open_ffmpeg | True | 开启使用 FFmpeg 进行测速,获取更准确的速度与分辨率信息,需要提前手动安装 | | open_m3u_result | True | 开启转换生成 m3u 文件类型结果链接,支持显示频道图标 | +| open_filter_speed | True | 开启速率过滤,低于最小速率(min_speed)的接口将会被过滤 | +| min_speed | 0.5 | 接口最小速率(单位M/s),需要开启 open_filter_speed 才能生效 | | open_filter_resolution | True | 开启分辨率过滤,低于最小分辨率(min_resolution)的接口将会被过滤 | | min_resolution | 1920x1080 | 接口最小分辨率,需要开启 open_filter_resolution 才能生效 | | speed_weight | 0.5 | 速率权重值(所有权重值总和应为 1) | diff --git a/docs/config_en.md b/docs/config_en.md index 5bc6098000..fa6ddf99e9 100644 --- a/docs/config_en.md +++ b/docs/config_en.md @@ -17,6 +17,8 @@ | sort_timeout | 5 | The timeout duration for speed testing of a single interface, in seconds (s). A larger value means a longer testing period, which can increase the number of interfaces obtained but may decrease their quality. A smaller value means a shorter testing time, which can obtain low-latency interfaces with better quality. Adjusting this value can optimize the update time. | | open_ffmpeg | True | Enable speed testing using FFmpeg to obtain more accurate speed and resolution information. Manual installation is required in advance. | | open_m3u_result | True | Enable the conversion to generate m3u file type result links, supporting the display of channel icons | +| open_filter_speed | True | Enable speed filtering, interfaces with speed lower than the minimum speed (min_speed) will be filtered | +| min_speed | 0.5 | Minimum interface speed (M/s), requires enabling open_filter_speed to take effect | | open_filter_resolution | True | Enable resolution filtering, interfaces with resolution lower than the minimum resolution (min_resolution) will be filtered | | min_resolution | 1920x1080 | Minimum interface resolution, requires enabling open_filter_resolution to take effect | | speed_weight | 0.5 | Speed weight value (the sum of all weight values should be 1) | diff --git a/tkinter_ui/tkinter_ui.spec b/tkinter_ui/tkinter_ui.spec index 8f4912ddab..299ee87fda 100644 --- a/tkinter_ui/tkinter_ui.spec +++ b/tkinter_ui/tkinter_ui.spec @@ -8,7 +8,9 @@ a = Analysis( ('../config/config.ini', 'config'), ('../config/demo.txt', 'config'), ('../config/rtp', 'config/rtp'), + ('../updates/hotel/cache.pkl', 'updates/hotel'), ('../updates/multicast/multicast_map.json', 'updates/multicast'), + ('../updates/multicast/cache.pkl', 'updates/multicast'), ('../updates/fofa/fofa_hotel_region_result.pkl', 'updates/fofa'), ('../updates/fofa/fofa_multicast_region_result.pkl', 'updates/fofa'), ('../static/images/favicon.ico', 'static/images'), diff --git a/updates/hotel/cache.pkl b/updates/hotel/cache.pkl new file mode 100644 index 0000000000..0152da300e Binary files /dev/null and b/updates/hotel/cache.pkl differ diff --git a/updates/hotel/request.py b/updates/hotel/request.py index 7dbba6c751..837c74146e 100644 --- a/updates/hotel/request.py +++ b/updates/hotel/request.py @@ -23,7 +23,7 @@ retry_func, find_clickable_element_with_retry, ) -from utils.tools import get_pbar_remaining, get_soup, merge_objects +from utils.tools import get_pbar_remaining, get_soup, merge_objects, resource_path if config.open_driver: try: @@ -34,17 +34,16 @@ async def get_channels_by_hotel(callback=None): """ - Get the channels by multicase + Get the channels by hotel """ channels = {} if config.open_use_cache: try: with open( - constants.config_cache_path, + resource_path("updates/hotel/cache.pkl"), "rb", ) as file: - cache = pickle.load(file) or {} - channels = cache.get("hotel", {}) + channels = pickle.load(file) or {} except: pass if config.open_request: diff --git a/updates/multicast/cache.pkl b/updates/multicast/cache.pkl new file mode 100644 index 0000000000..fecbd4a026 Binary files /dev/null and b/updates/multicast/cache.pkl differ diff --git a/updates/multicast/request.py b/updates/multicast/request.py index 67e6e6a6e1..3c1f1b89fb 100644 --- a/updates/multicast/request.py +++ b/updates/multicast/request.py @@ -26,7 +26,7 @@ retry_func, find_clickable_element_with_retry, ) -from utils.tools import get_pbar_remaining, get_soup, merge_objects +from utils.tools import get_pbar_remaining, get_soup, merge_objects, resource_path from .update_tmp import get_multicast_region_result_by_rtp_txt if config.open_driver: @@ -44,11 +44,11 @@ async def get_channels_by_multicast(names, callback=None): if config.open_use_cache: try: with open( - constants.config_cache_path, + resource_path("updates/multicast/cache.pkl"), "rb", ) as file: cache = pickle.load(file) or {} - channels = {key: value for key, value in cache.get("multicast", {}).items() if key in names} + channels = {key: value for key, value in cache.items() if key in names} except: pass if config.open_request: diff --git a/utils/channel.py b/utils/channel.py index b1c48746ac..805dfc92f6 100644 --- a/utils/channel.py +++ b/utils/channel.py @@ -6,7 +6,6 @@ import pickle import re from collections import defaultdict -from logging import INFO from bs4 import NavigableString from opencc import OpenCC @@ -15,17 +14,16 @@ from utils.config import config from utils.speed import ( get_speed, - sort_urls_by_speed_and_resolution, + sort_urls, ) from utils.tools import ( check_url_by_patterns, - get_total_urls_from_info_list, + get_total_urls, process_nested_dict, add_url_info, remove_cache_info, resource_path, write_content_into_txt, - get_logger, ) @@ -574,10 +572,9 @@ async def limited_get_speed(info, ipv6_proxy, callback): for info in info_list ] await asyncio.gather(*tasks) - logger = get_logger(constants.sort_log_path, level=INFO, init=True) for cate, obj in data.items(): for name, info_list in obj.items(): - info_list = sort_urls_by_speed_and_resolution(name, info_list, logger) + info_list = sort_urls(name, info_list) append_data_to_info_data( result, cate, @@ -602,6 +599,10 @@ def write_channel_to_file(data, ipv6=False, callback=None): write_content_into_txt(f"{update_time},url", path) no_result_name = [] open_empty_category = config.open_empty_category + ipv_type_prefer = list(config.ipv_type_prefer) + if any(pref in ipv_type_prefer for pref in ["自动", "auto"]) or not ipv_type_prefer: + ipv_type_prefer = ["ipv6", "ipv4"] if (ipv6 or (not os.environ.get("GITHUB_ACTIONS"))) else ["ipv4", "ipv6"] + origin_type_prefer = config.origin_type_prefer for cate, channel_obj in data.items(): print(f"\n{cate}:", end=" ") write_content_into_txt(f"{cate},#genre#", path) @@ -609,7 +610,7 @@ def write_channel_to_file(data, ipv6=False, callback=None): names_len = len(list(channel_obj_keys)) for i, name in enumerate(channel_obj_keys): info_list = data.get(cate, {}).get(name, []) - channel_urls = get_total_urls_from_info_list(info_list, ipv6=ipv6) + channel_urls = get_total_urls(info_list, ipv_type_prefer, origin_type_prefer) end_char = ", " if i < names_len - 1 else "" print(f"{name}:", len(channel_urls), end=end_char) if not channel_urls: diff --git a/utils/config.py b/utils/config.py index 66c03ffc55..b49924169e 100644 --- a/utils/config.py +++ b/utils/config.py @@ -58,6 +58,12 @@ def open_use_cache(self): def open_request(self): return self.config.getboolean("Settings", "open_request", fallback=False) + @property + def open_filter_speed(self): + return self.config.getboolean( + "Settings", "open_filter_speed", fallback=True + ) + @property def open_filter_resolution(self): return self.config.getboolean( @@ -79,7 +85,7 @@ def ipv_type_prefer(self): return [ type.strip().lower() for type in self.config.get( - "Settings", "ipv_type_prefer", fallback="ipv4" + "Settings", "ipv_type_prefer", fallback="auto" ).split(",") ] @@ -135,6 +141,10 @@ def source_limits(self): "online_search": self.online_search_num, } + @property + def min_speed(self): + return self.config.getfloat("Settings", "min_speed", fallback=0.5) + @property def min_resolution(self): return self.config.get("Settings", "min_resolution", fallback="1920x1080") diff --git a/utils/constants.py b/utils/constants.py index 63ab039cf8..c2b41e28d4 100644 --- a/utils/constants.py +++ b/utils/constants.py @@ -4,8 +4,6 @@ output_path = "output" -config_cache_path = os.path.join(config_path, "cache.pkl") - result_path = os.path.join(output_path, "result_new.txt") cache_path = os.path.join(output_path, "cache.pkl") diff --git a/utils/speed.py b/utils/speed.py index 341889c3db..4ee0ab3fdd 100644 --- a/utils/speed.py +++ b/utils/speed.py @@ -1,19 +1,17 @@ import asyncio import re import subprocess +from logging import INFO from time import time from urllib.parse import quote import m3u8 -import yt_dlp from aiohttp import ClientSession, TCPConnector import utils.constants as constants from utils.config import config from utils.tools import is_ipv6, remove_cache_info, get_resolution_value, get_logger -logger = get_logger(constants.log_path) - async def get_speed_with_download(url: str, timeout: int = config.sort_timeout) -> dict[str, float | None]: """ @@ -68,42 +66,6 @@ async def get_speed_m3u8(url: str, timeout: int = config.sort_timeout) -> dict[s return info -def get_info_yt_dlp(url, timeout=config.sort_timeout): - """ - Get the url info by yt_dlp - """ - ydl_opts = { - "socket_timeout": timeout, - "skip_download": True, - "quiet": True, - "no_warnings": True, - "format": "best", - "logger": logger, - } - with yt_dlp.YoutubeDL(ydl_opts) as ydl: - return ydl.sanitize_info(ydl.extract_info(url, download=False)) - - -async def get_delay_yt_dlp(url, timeout=config.sort_timeout): - """ - Get the delay of the url by yt_dlp - """ - try: - start_time = time() - info = await asyncio.wait_for( - asyncio.to_thread(get_info_yt_dlp, url, timeout), timeout=timeout - ) - fps = int(round((time() - start_time) * 1000)) if len(info) else float("inf") - resolution = ( - f"{info['width']}x{info['height']}" - if "width" in info and "height" in info - else None - ) - return fps, resolution - except: - return float("inf"), None - - async def get_delay_requests(url, timeout=config.sort_timeout, proxy=None): """ Get the delay of the url by requests @@ -242,11 +204,13 @@ async def get_speed(url, ipv6_proxy=None, callback=None): callback() -def sort_urls_by_speed_and_resolution(name, data, logger=None): +def sort_urls(name, data, logger=None): """ - Sort by speed and resolution + Sort the urls with info """ filter_data = [] + if logger is None: + logger = get_logger(constants.sort_log_path, level=INFO, init=True) for url, date, resolution, origin in data: result = { "url": remove_cache_info(url), @@ -274,10 +238,14 @@ def sort_urls_by_speed_and_resolution(name, data, logger=None): ) except Exception as e: print(e) + if config.open_filter_speed and speed < config.min_speed: + continue result["delay"] = delay result["speed"] = speed result["resolution"] = resolution filter_data.append(result) + if logger: + logger.handlers.clear() def combined_key(item): speed, delay, resolution, origin = item["speed"], item["delay"], item["resolution"], item["origin"] diff --git a/utils/tools.py b/utils/tools.py index 785fada204..f51033703a 100644 --- a/utils/tools.py +++ b/utils/tools.py @@ -141,20 +141,15 @@ def get_resolution_value(resolution_str): return 0 -def get_total_urls_from_info_list(infoList, ipv6=False): +def get_total_urls(info_list, ipv_type_prefer, origin_type_prefer): """ Get the total urls from info list """ - ipv_type_prefer = list(config.ipv_type_prefer) - if any(pref in ipv_type_prefer for pref in ["自动", "auto"]) or not ipv_type_prefer: - ipv_type_prefer = ["ipv6", "ipv4"] if (ipv6 or os.environ.get("GITHUB_ACTIONS")) else ["ipv4", "ipv6"] - origin_type_prefer = config.origin_type_prefer categorized_urls = { origin: {"ipv4": [], "ipv6": []} for origin in origin_type_prefer } - total_urls = [] - for url, _, resolution, origin in infoList: + for url, _, resolution, origin in info_list: if not origin: continue @@ -205,13 +200,16 @@ def get_total_urls_from_info_list(infoList, ipv6=False): if len(total_urls) >= urls_limit: break if ipv_num[ipv_type] < config.ipv_limit[ipv_type]: + urls = categorized_urls[origin][ipv_type] + if not urls: + break limit = min( max(config.source_limits[origin] - ipv_num[ipv_type], 0), max(config.ipv_limit[ipv_type] - ipv_num[ipv_type], 0), ) - urls = categorized_urls[origin][ipv_type][:limit] - total_urls.extend(urls) - ipv_num[ipv_type] += len(urls) + limit_urls = urls[:limit] + total_urls.extend(limit_urls) + ipv_num[ipv_type] += len(limit_urls) else: continue @@ -274,7 +272,7 @@ def check_ipv6_support(): return True except Exception: pass - print("Your network does not support IPv6") + print("Your network does not support IPv6, don't worry, these results will be saved") return False