Kodi Community Forum

Full Version: can't write scraper to get encoded plot from mtime.com
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
mtime.com encode the plot like this:
Code:
{value:{"isLogin": false,
"paragraghs": " <div class=\"juqing\">\t<p class=\"mt20\">\t<P><span class=\"m_s51\"> </span><span class=\"m_s52\">good </span><span class=\"m_s51\"> </span><span class=\"m_s23\">no </span><span class=\"m_s45\">This </span><span class=\"m_s43\">don't </span><span class=\"m_s0\">is </span><span class=\"m_s19\">rich </span><span class=\"m_s39\">a </span><span class=\"m_s32\">fish </span><span class=\"m_s42\">good </span><span class=\"m_s31\">dog </span><span class=\"m_s18\">story </span><span class=\"m_s8\">work </span><span class=\"m_s51\">about </span><span class=\"m_s63\">wolf </span><span class=\"m_s13\">pig </span><span class=\"m_s27\">and </span><span class=\"m_s36\">sheep.</span><span class=\"m_s33\">Long </span><span class=\"m_s45\">long </span><span class=\"m_s62\">run </span><span class=\"m_s0\">ago,</span><span class=\"m_s45\">a </span><span class=\"m_s39\">sheep </span><span class=\"m_s16\">moive </span><span class=\"m_s63\">walk </span><span class=\"m_s12\">along </span><span class=\"m_s54\">the </span><span class=\"m_s0\">river.</span><span class=\"m_s17\">more </span><BR></P>\t</p> </div>\t<p class=\"tr c_a5 mt12\">\tposter:Mtime\t<span class=\"time\">(2008-05-19 16:34:55)</span>\t</p>\t<div class=\"line_dot mt12 mb12\"></div>",
"userId": -1},error:null}

And use this file(http://www.mtime.com/css/scramble.css) to decode:
Code:
.m_s1{display:none;}.m_s2{display:none;}.m_s4{display:none;}.m_s5{display:none;}.m_s7{display:none;}.m_s8{display:none;}.m_s10{display:none;}.m_s11{display:none;}.m_s13{display:none;}.m_s14{display:none;}.m_s16{display:none;}.m_s17{display:none;}.m_s19{display:none;}.m_s20{display:none;}.m_s22{display:none;}.m_s23{display:none;}.m_s25{display:none;}.m_s26{display:none;}.m_s28{display:none;}.m_s29{display:none;}.m_s31{display:none;}.m_s32{display:none;}.m_s34{display:none;}.m_s35{display:none;}.m_s37{display:none;}.m_s38{display:none;}.m_s40{display:none;}.m_s41{display:none;}.m_s43{display:none;}.m_s44{display:none;}.m_s46{display:none;}.m_s47{display:none;}.m_s49{display:none;}.m_s50{display:none;}.m_s52{display:none;}.m_s53{display:none;}.m_s55{display:none;}.m_s56{display:none;}.m_s58{display:none;}.m_s59{display:none;}.m_s61{display:none;}.m_s62{display:none;}

the example decode like this:
Code:
This is a good story about wolf and sheep.Long long ago,a sheep walk along the river.

How to decode the plot in scraper?
pretty much impossible, they do that to make sure you can't :/
May be change the flow of scraper to call some program to decode message like this.
you'd need a full blown webbrowser with atleast css support and probably javascript on top of that. i can't see it happening, atleast not just for this.
Could you supply an example url, please?

mtime.com looks very asian for me. Do you want to scrap also asian characters?
w00dst0ck Wrote:Could you supply an example url, please?

mtime.com looks very asian for me. Do you want to scrap also asian characters?

mtime.com is a movie site with chinese language.

Here is a example url for plot of the movie "Vicky Cristina Barcelona" in chinese language:
Code:
http://www.mtime.com/database/ShowPlotService.m?Ajax_CallBack=true&Ajax_CallBackType=Mtime.Community.Controls.CommunityPages.ShowPlotService&Ajax_CallBackMethod=LoadData&Ajax_RequestUrl=http%3A%2F%2Fwww.mtime.com%2Fmovie%2F53935%2Fplots.html&Ajax_CallBackArgument0=1&Ajax_CallBackArgument1=53935

I'm also submit a scraper of mtime.com for xbmc. You can see it in the xbmc svn.
As Spiff noticed before, it seems impossible.
Sometimes those sites supply an api to work with the content. Maybe you have to contact the webmaster of mtimes.com to find a solution.
I know the flow of scraper now can't do this. But meedio's .mpp can do this.