Alexander_88
23-10-2018, 06:26
Здравствуйте. Подскажите скриптик, который будет извлекать нужные ссылки из txt файла в отдельный txt файл.
Пример файла:
Subject message
http://s5.depic.me/0686/zp0hjgh3m7d_o/0634start_m.jpg
http://s6.depic.me/06876/26fhgh8kxo8_o/0634start_t.jpg
File Name.type: 0634start.avi
Resolution: 1920x1080
Duration: 0:08:56
Filesize: 952Mb
Download
https://k2s.cc/file/f07we76wee3/0634start.mp4
//==================
Subject message
http://s7.depic.me/065676/cjb9jhkjhbm78_o/0087start_m.jpg
http://s7.depic.me/07666/56ygjfjh7kikg_o/0087start_t.jpg
File Name.type: 0087start.wmv
Resolution: 640x480
Duration: 0:53:20
Filesize: 311Mb
Download
https://k2s.cc/file/059we76456/0087start.mp4
//==================
Subject message
http://s5.depic.me/06396/xj0hgkoio_o/0248start_m.jpg
http://s5.depic.me/67556/w12jhgjblxh_o/0248start_t.jpg
File Name.type: 0248start.mp4
Resolution: 1280x720
Duration: 0:05:44
Filesize: 169Mb
Download
https://k2s.cc/file/8c76web35b/0248start.mp4
//==================
Subject message
http://s6.depic.me/07396/uzpqptzh8rxl_o/0007start_m.jpg
http://s7.depic.me/07156/puojhjh95tn_o/0007start_t.jpg
File Name.type: 0007start.mp4
Resolution: 1280x720
Duration: 0:05:35
Filesize: 59Mb
Download
https://k2s.cc/file/28s76ds8d82/0007start.mp4
//==================
Нужные ссылки находятся ниже слова "download". Домены могут быть разными, поэтому необходимо либо мне самому указывать список доменов, либо ориентироваться по слову "download". Извлекать ссылки нужно без BB кодов и тегов.
Если применить скрипт к выше представленному примеру, результирующий файл с извлеченными ссылками должен получиться такой:
https://k2s.cc/file/f07we76wee3/0634start.mp4
https://k2s.cc/file/059we76456/0087start.mp4
https://k2s.cc/file/8c76web35b/0248start.mp4
https://k2s.cc/file/28s76ds8d82/0007start.mp4
Пример файла:
Subject message
http://s5.depic.me/0686/zp0hjgh3m7d_o/0634start_m.jpg
http://s6.depic.me/06876/26fhgh8kxo8_o/0634start_t.jpg
File Name.type: 0634start.avi
Resolution: 1920x1080
Duration: 0:08:56
Filesize: 952Mb
Download
https://k2s.cc/file/f07we76wee3/0634start.mp4
//==================
Subject message
http://s7.depic.me/065676/cjb9jhkjhbm78_o/0087start_m.jpg
http://s7.depic.me/07666/56ygjfjh7kikg_o/0087start_t.jpg
File Name.type: 0087start.wmv
Resolution: 640x480
Duration: 0:53:20
Filesize: 311Mb
Download
https://k2s.cc/file/059we76456/0087start.mp4
//==================
Subject message
http://s5.depic.me/06396/xj0hgkoio_o/0248start_m.jpg
http://s5.depic.me/67556/w12jhgjblxh_o/0248start_t.jpg
File Name.type: 0248start.mp4
Resolution: 1280x720
Duration: 0:05:44
Filesize: 169Mb
Download
https://k2s.cc/file/8c76web35b/0248start.mp4
//==================
Subject message
http://s6.depic.me/07396/uzpqptzh8rxl_o/0007start_m.jpg
http://s7.depic.me/07156/puojhjh95tn_o/0007start_t.jpg
File Name.type: 0007start.mp4
Resolution: 1280x720
Duration: 0:05:35
Filesize: 59Mb
Download
https://k2s.cc/file/28s76ds8d82/0007start.mp4
//==================
Нужные ссылки находятся ниже слова "download". Домены могут быть разными, поэтому необходимо либо мне самому указывать список доменов, либо ориентироваться по слову "download". Извлекать ссылки нужно без BB кодов и тегов.
Если применить скрипт к выше представленному примеру, результирующий файл с извлеченными ссылками должен получиться такой:
https://k2s.cc/file/f07we76wee3/0634start.mp4
https://k2s.cc/file/059we76456/0087start.mp4
https://k2s.cc/file/8c76web35b/0248start.mp4
https://k2s.cc/file/28s76ds8d82/0007start.mp4