hdmario:supporto conferma con mail
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "https?://hdmario.live/embed/([0-9]+)",
|
||||
"url": "https://hdmario.live/embed/\\1?"
|
||||
"url": "https://hdmario.live/embed/\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -8,8 +8,22 @@ baseUrl = 'https://hdmario.live'
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
global data
|
||||
|
||||
page = httptools.downloadpage(page_url)
|
||||
logger.info(page.url)
|
||||
if 'unconfirmed' in page.url:
|
||||
from lib import onesecmail
|
||||
id = page_url.split('/')[-1]
|
||||
mail = onesecmail.getRandom()
|
||||
postData = {
|
||||
'email': mail,
|
||||
'hls_video_id': id
|
||||
}
|
||||
httptools.downloadpage(page.url, post=postData)
|
||||
jsonMail = onesecmail.waitForMail(mail)
|
||||
logger.info(jsonMail)
|
||||
code = jsonMail['subject'].split(' - ')[0]
|
||||
page = httptools.downloadpage(page_url + '?code=' + code)
|
||||
data = page.data
|
||||
if "the page you are looking for could not be found" in data:
|
||||
return False, config.get_localized_string(70449) % "HDmario"
|
||||
|
||||
Reference in New Issue
Block a user