请转到http://iMath.cnblogs.com

■■■■■■■■■■本博客打算放弃,请转到http://iMath.cnblogs.com

Get m3u8 playlist urls by Python

The most frequently usage for you to use this m3u8 module is perhaps you want to get the playlist URLs, here is the fast way, for example


>>> import m3u8

>>> m3u8.load('https://www.the5fire.com/static/demos/diaosi.m3u8').files

['http://123.125.123.82/ipad?file=/81/70/OitlPYGCUGyq6AEJl75wm5.mp4&start=0&end=6.759&ch=tv&cateCode=101111;101113&uid=1310091944277985&plat=h5&pt=2&prod=ad&pg=1&vid=1681667&eye=0&sig=-CCYzeCbgqyNfDu0hUIVgm5x7kqqSbHL', 'http://123.125.123.82/ipad?file=/81/70/OitlPYGCUGyq6AEJl75wm5.mp4&start=6.759&end=15.279&ch=tv&cateCode=101111;101113&uid=1310091944277985&plat=h5&pt=2&prod=ad&pg=1&vid=1681667&eye=0&sig=-CCYzeCbgqyNfDu0hUIVgm5x7kqqSbHL', 'http://123.125.123.82/ipad?file=/2/10/XTBZKiL2tQl1OxiIhKiaP.mp4&start=0&end=5.36&ch=tv&cateCode=101111;101113&uid=1310091944277985&plat=h5&pt=2&prod=ad&pg=1&vid=1681667&eye=0&sig=XwrNMe7aH7R7VHjCCmo984uOKktNIUFm', 'http://123.125.123.82/ipad?file=/2/10/XTBZKiL2tQl1OxiIhKiaP.mp4&start=5.36&end=15.604&ch=tv&cateCode=101111;101113&uid=1310091944277985&plat=h5&pt=2&prod=ad&pg=1&vid=1681667&eye=0&sig=XwrNMe7aH7R7VHjCCmo984uOKktNIUFm', 'http://123.125.123.82/ipad?file=/52/249/tskosgtSoWOpsud7NKaCR4.mp4&start=0&end=9.92&ch=tv&cateCode=101111;101113&uid=1310091944277985&plat=h5&pt=2&prod=h5&pg=1&vid=1681667&eye=0&sig=W_xH3LrPGGL-hUfPzVMMCJQW3eYKthkq', 'http://123.125.123.82/ipad?file=/52/249/tskosgtSoWOpsud7NKaCR4.mp4&start=9.92&end=37.08&ch=tv&cateCode=101111;101113&uid=1310091944277985&plat=h5&pt=2&prod=h5&pg=1&vid=1681667&eye=0&sig=W_xH3LrPGGL-hUfPzVMMCJQW3eYKthkq', 'http://123.125.123.82/ipad?file=/52/249/tskosgtSoWOpsud7NKaCR4.mp4&start=37.08&end=67.079&ch=tv&cateCode=101111;101113&uid=1310091944277985&plat=h5&pt=2&prod=h5&pg=1&vid=1681667&eye=0&sig=W_xH3LrPGGL-hUfPzVMMCJQW3eYKthkq', 'http://123.125.123.82/ipad?file=/52/249/tskosgtSoWOpsud7NKaCR4.mp4&start=67.079&end=93.719&ch=tv&cateCode=101111;101113&uid=1310091944277985&plat=h5&pt=2&prod=h5&pg=1&vid=1681667&eye=0&sig=W_xH3LrPGGL-hUfPzVMMCJQW3eYKthkq', 'http://123.125.123.82/ipad?file=/52/249/tskosgtSoWOpsud7NKaCR4.mp4&start=93.719&end=123.719&ch=tv&cateCode=101111;101113&uid=1310091944277985&plat=h5&pt=2&prod=h5&pg=1&vid=1681667&eye=0&sig=W_xH3LrPGGL-hUfPzVMMCJQW3eYKthkq', 'http://123.125.123.82/ipad?file=/52/249/tskosgtSoWOpsud7NKaCR4.mp4&start=123.719&end=151.36&ch=tv&cateCode=101111;101113&uid=1310091944277985&plat=h5&pt=2&prod=h5&pg=1&vid=1681667&eye=0&sig=W_xH3LrPGGL-hUfPzVMMCJQW3eYKthkq', 'http://123.125.123.82/ipad?file=/52/249/tskosgtSoWOpsud7NKaCR4.mp4&start=151.36&end=179.84&ch=tv&cateCode=101111;101113&uid=1310091944277985&plat=h5&pt=2&prod=h5&pg=1&vid=1681667&eye=0&sig=W_xH3LrPGGL-hUfPzVMMCJQW3eYKthkq', 'http://123.125.123.82/ipad?file=/52/249/tskosgtSoWOpsud7NKaCR4.mp4&start=179.84&end=211.96&ch=tv&cateCode=101111;101113&uid=1310091944277985&plat=h5&pt=2&prod=h5&pg=1&vid=1681667&eye=0&sig=W_xH3LrPGGL-hUfPzVMMCJQW3eYKthkq', 'http://123.125.123.82/ipad?file=/52/249/tskosgtSoWOpsud7NKaCR4.mp4&start=211.96&end=237.64&ch=tv&cateCode=101111;101113&uid=1310091944277985&plat=h5&pt=2&prod=h5&pg=1&vid=1681667&eye=0&sig=W_xH3LrPGGL-hUfPzVMMCJQW3eYKthkq', 'http://123.125.123.82/ipad?file=/52/249/tskosgtSoWOpsud7NKaCR4.mp4&start=237.64&end=269.839&ch=tv&cateCode=101111;101113&uid=1310091944277985&plat=h5&pt=2&prod=h5&pg=1&vid=1681667&eye=0&sig=W_xH3LrPGGL-hUfPzVMMCJQW3eYKthkq', 'http://123.125.123.82/ipad?file=/52/249/tskosgtSoWOpsud7NKaCR4.mp4&start=269.839&end=293.917&ch=tv&cateCode=101111;101113&uid=1310091944277985&plat=h5&pt=2&prod=h5&pg=1&vid=1681667&eye=0&sig=W_xH3LrPGGL-hUfPzVMMCJQW3eYKthkq', 'http://123.125.123.82/ipad?file=/63/235/up47FCpAB9mA8Bvo7TQM3.mp4&start=0&end=9.92&ch=tv&cateCode=101111;101113&uid=1310091944277985&plat=h5&pt=2&prod=h5&pg=1&vid=1681667&eye=0&sig=dAPC_zoejR6PLQnEe-FaXIrxhe0wbh7e', 'http://123.125.123.82/ipad?file=/63/235/up47FCpAB9mA8Bvo7TQM3.mp4&start=9.92&end=40.88&ch=tv&cateCode=101111;101113&uid=1310091944277985&plat=h5&pt=2&prod=h5&pg=1&vid=1681667&eye=0&sig=dAPC_zoejR6PLQnEe-FaXIrxhe0wbh7e', 'http://123.125.123.82/ipad?file=/63/235/up47FCpAB9mA8Bvo7TQM3.mp4&start=40.88&end=66.039&ch=tv&cateCode=101111;101113&uid=1310091944277985&plat=h5&pt=2&prod=h5&pg=1&vid=1681667&eye=0&sig=dAPC_zoejR6PLQnEe-FaXIrxhe0wbh7e', 'http://123.125.123.82/ipad?file=/63/235/up47FCpAB9mA8Bvo7TQM3.mp4&start=66.039&end=92.399&ch=tv&cateCode=101111;101113&uid=1310091944277985&plat=h5&pt=2&prod=h5&pg=1&vid=1681667&eye=0&sig=dAPC_zoejR6PLQnEe-FaXIrxhe0wbh7e', 'http://123.125.123.82/ipad?file=/63/235/up47FCpAB9mA8Bvo7TQM3.mp4&start=92.399&end=122.399&ch=tv&cateCode=101111;101113&uid=1310091944277985&plat=h5&pt=2&prod=h5&pg=1&vid=1681667&eye=0&sig=dAPC_zoejR6PLQnEe-FaXIrxhe0wbh7e', 'http://123.125.123.82/ipad?file=/63/235/up47FCpAB9mA8Bvo7TQM3.mp4&start=122.399&end=147.72&ch=tv&cateCode=101111;101113&uid=1310091944277985&plat=h5&pt=2&prod=h5&pg=1&vid=1681667&eye=0&sig=dAPC_zoejR6PLQnEe-FaXIrxhe0wbh7e', 'http://123.125.123.82/ipad?file=/63/235/up47FCpAB9mA8Bvo7TQM3.mp4&start=147.72&end=180.96&ch=tv&cateCode=101111;101113&uid=1310091944277985&plat=h5&pt=2&prod=h5&pg=1&vid=1681667&eye=0&sig=dAPC_zoejR6PLQnEe-FaXIrxhe0wbh7e', 'http://123.125.123.82/ipad?file=/63/235/up47FCpAB9mA8Bvo7TQM3.mp4&start=180.96&end=214.159&ch=tv&cateCode=101111;101113&uid=1310091944277985&plat=h5&pt=2&prod=h5&pg=1&vid=1681667&eye=0&sig=dAPC_zoejR6PLQnEe-FaXIrxhe0wbh7e', 'http://123.125.123.82/ipad?file=/63/235/up47FCpAB9mA8Bvo7TQM3.mp4&start=214.159&end=244.159&ch=tv&cateCode=101111;101113&uid=1310091944277985&plat=h5&pt=2&prod=h5&pg=1&vid=1681667&eye=0&sig=dAPC_zoejR6PLQnEe-FaXIrxhe0wbh7e', 'http://123.125.123.82/ipad?file=/63/235/up47FCpAB9mA8Bvo7TQM3.mp4&start=244.159&end=274.16&ch=tv&cateCode=101111;101113&uid=1310091944277985&plat=h5&pt=2&prod=h5&pg=1&vid=1681667&eye=0&sig=dAPC_zoejR6PLQnEe-FaXIrxhe0wbh7e', 'http://123.125.123.82/ipad?file=/63/235/up47FCpAB9mA8Bvo7TQM3.mp4&start=274.16&end=290.248&ch=tv&cateCode=101111;101113&uid=1310091944277985&plat=h5&pt=2&prod=h5&pg=1&vid=1681667&eye=0&sig=dAPC_zoejR6PLQnEe-FaXIrxhe0wbh7e', 'http://123.125.123.82/ipad?file=/194/25/GgiBXgjRxQTqknG1655Wg7.mp4&start=0&end=9.92&ch=tv&cateCode=101111;101113&uid=1310091944277985&plat=h5&pt=2&prod=h5&pg=1&vid=1681667&eye=0&sig=g-tUjUQCd6TlWIRfdltI_MMhfnmxhX17', 'http://123.125.123.82/ipad?file=/194/25/GgiBXgjRxQTqknG1655Wg7.mp4&start=9.92&end=39.92&ch=tv&cateCode=101111;101113&uid=1310091944277985&plat=h5&pt=2&prod=h5&pg=1&vid=1681667&eye=0&sig=g-tUjUQCd6TlWIRfdltI_MMhfnmxhX17', 'http://123.125.123.82/ipad?file=/194/25/GgiBXgjRxQTqknG1655Wg7.mp4&start=39.92&end=71.12&ch=tv&cateCode=101111;101113&uid=1310091944277985&plat=h5&pt=2&prod=h5&pg=1&vid=1681667&eye=0&sig=g-tUjUQCd6TlWIRfdltI_MMhfnmxhX17', 'http://123.125.123.82/ipad?file=/194/25/GgiBXgjRxQTqknG1655Wg7.mp4&start=71.12&end=101.12&ch=tv&cateCode=101111;101113&uid=1310091944277985&plat=h5&pt=2&prod=h5&pg=1&vid=1681667&eye=0&sig=g-tUjUQCd6TlWIRfdltI_MMhfnmxhX17', 'http://123.125.123.82/ipad?file=/194/25/GgiBXgjRxQTqknG1655Wg7.mp4&start=101.12&end=131.12&ch=tv&cateCode=101111;101113&uid=1310091944277985&plat=h5&pt=2&prod=h5&pg=1&vid=1681667&eye=0&sig=g-tUjUQCd6TlWIRfdltI_MMhfnmxhX17', 'http://123.125.123.82/ipad?file=/194/25/GgiBXgjRxQTqknG1655Wg7.mp4&start=131.12&end=161.12&ch=tv&cateCode=101111;101113&uid=1310091944277985&plat=h5&pt=2&prod=h5&pg=1&vid=1681667&eye=0&sig=g-tUjUQCd6TlWIRfdltI_MMhfnmxhX17', 'http://123.125.123.82/ipad?file=/194/25/GgiBXgjRxQTqknG1655Wg7.mp4&start=161.12&end=167.508&ch=tv&cateCode=101111;101113&uid=1310091944277985&plat=h5&pt=2&prod=h5&pg=1&vid=1681667&eye=0&sig=g-tUjUQCd6TlWIRfdltI_MMhfnmxhX17']>>> 

评论

© 请转到http://iMath.cnblogs.com | Powered by LOFTER