themaLeecher
http://leecher.themasoftware.com/forum/

[masterani.me] Clean up messages.
http://leecher.themasoftware.com/forum/viewtopic.php?f=19&t=6433
Page 1 of 1

Author:  Crackpot [ September 7th, 2018, 4:22 pm ]
Post subject:  [masterani.me] Clean up messages.

URL:
Code:
https://www.masterani.me/anime/watch/2296-pokemon-sun-moon/89


Error message: N/A

Problem: not sure which div should i use to get messages.

this is the messages TL provide:
Code:
<video-mirrors :mirrors="[{"id":412482,"host_id":1,"embed_id":"2xlpa0y5woxy","quality":720,"type":1,"host":{"id":1,"name":"MP4Upload","embed_prefix":"https:\/\/mp4upload.com\/embed-","embed_suffix":".html"}},{"id":412486,"host_id":20,"embed_id":"vsc5t243s3sl","quality":720,"type":1,"host":{"id":20,"name":"Tiwi.kiwi","embed_prefix":"https:\/\/tiwi.kiwi\/embed-","embed_suffix":".html"}},{"id":412484,"host_id":21,"embed_id":"FV0K1JJ517","quality":720,"type":1,"host":{"id":21,"name":"Rapidvideo","embed_prefix":"https:\/\/www.rapidvideo.com\/e\/","embed_suffix":null}},{"id":412491,"host_id":18,"embed_id":"opnbedlqfatfeemm","quality":720,"type":1,"host":{"id":18,"name":"Streamango","embed_prefix":"https:\/\/streamango.com\/embed\/","embed_suffix":null}},{"id":412483,"host_id":15,"embed_id":"C8gNP500Mbk","quality":720,"type":1,"host":{"id":15,"name":"Openload","embed_prefix":"https:\/\/openload.co\/embed\/","embed_suffix":null}},{"id":412485,"host_id":22,"embed_id":"joxjmy314o7c","quality":720,"type":1,"host":{"id":22,"name":"Mystream","embed_prefix":"https:\/\/embed.mystream.to\/","embed_suffix":null}},{"id":412488,"host_id":1,"embed_id":"umpyfhris1im","quality":480,"type":1,"host":{"id":1,"name":"MP4Upload","embed_prefix":"https:\/\/mp4upload.com\/embed-","embed_suffix":".html"}},{"id":412490,"host_id":18,"embed_id":"tcacqtfsbdbeolce","quality":480,"type":1,"host":{"id":18,"name":"Streamango","embed_prefix":"https:\/\/streamango.com\/embed\/","embed_suffix":null}},{"id":412489,"host_id":15,"embed_id":"YONjdyRcCbw","quality":480,"type":1,"host":{"id":15,"name":"Openload","embed_prefix":"https:\/\/openload.co\/embed\/","embed_suffix":null}},{"id":412487,"host_id":22,"embed_id":"bsteywp3ugbh","quality":480,"type":1,"host":{"id":22,"name":"Mystream","embed_prefix":"https:\/\/embed.mystream.to\/","embed_suffix":null}}]"></video-mirrors>


like for first one
Code:
{"id":412482,"host_id":1,"embed_id":"2xlpa0y5woxy","quality":720,"type":1,"host":{"id":1,"name":"MP4Upload","embed_prefix":"https:\/\/mp4upload.com\/embed-","embed_suffix":".html"}},


output link will be:
MP4Upload 720p: https://www.mp4upload.com/embed-2xlpa0y5woxy.html

second one
Code:
{"id":412486,"host_id":20,"embed_id":"vsc5t243s3sl","quality":720,"type":1,"host":{"id":20,"name":"Tiwi.kiwi","embed_prefix":"https:\/\/tiwi.kiwi\/embed-","embed_suffix":".html"}},


output link will be:
Tiwi.kiwi 720P: http://www.tiwi.kiwi/embed-vsc5t243s3sl.html

possible to make it using regex? give me one example please i will try to make others

Author:  Freddy [ September 8th, 2018, 8:11 am ]
Post subject:  Re: [masterani.me] Clean up messages.

You could do this with couple of replacements.

1. To deal with the ones which has suffix (not all has):
Search for:
Code:
\{\"id\".+?\"embed_id\":\"(.+?)\",\"quality\":(.+?),.+?\"name\":\"(.+?)\".+?\"embed_prefix\":\"(.+?)\",\"embed_suffix\":\"(.+?)\"\}\},?


Replace with:
Code:
$3 $2p: $4$1$5\n


Enable regex.

2. To deal with the ones which doesn't have suffix (not all has):
Search for:
Code:
\{\"id\".+?\"embed_id\":\"(.+?)\",\"quality\":(.+?),.+?\"name\":\"(.+?)\".+?\"embed_prefix\":\"(.+?)\",\"embed_suffix\".+?\}\},?


Replace with:
Code:
$3 $2p: $4$1\n


Enable regex.

3. To fix escaped URL, add simple replacement (not regex).
Search for:
Code:
\/


Replace with:
Code:
/


Enable regex.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/