can't write scraper to get encoded plot from mtime.com

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
taxigps Offline
Team-XBMC Python Developer
Posts: 395
Joined: Jan 2009
Reputation: 0
Post: #1
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{disp​lay: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:n​one;}.m_s47{display:none;}.m_s49{display:none;}.m_s50{display:none;}.m_s52{displ​ay:none;}.m_s53{display:none;}.m_s55{display:none;}.m_s56{display:none;}.m_s58{d​isplay: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?
find quote
spiff Offline
Grumpy Bastard Developer
Posts: 12,179
Joined: Nov 2003
Reputation: 82
Post: #2
pretty much impossible, they do that to make sure you can't :/

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
taxigps Offline
Team-XBMC Python Developer
Posts: 395
Joined: Jan 2009
Reputation: 0
Post: #3
May be change the flow of scraper to call some program to decode message like this.
find quote
spiff Offline
Grumpy Bastard Developer
Posts: 12,179
Joined: Nov 2003
Reputation: 82
Post: #4
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.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
w00dst0ck Offline
Junior Member
Posts: 37
Joined: Aug 2008
Reputation: 0
Location: Germany
Post: #5
Could you supply an example url, please?

mtime.com looks very asian for me. Do you want to scrap also asian characters?
find quote
taxigps Offline
Team-XBMC Python Developer
Posts: 395
Joined: Jan 2009
Reputation: 0
Post: #6
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.
(This post was last modified: 2009-05-28 11:08 by taxigps.)
find quote
w00dst0ck Offline
Junior Member
Posts: 37
Joined: Aug 2008
Reputation: 0
Location: Germany
Post: #7
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.
find quote
taxigps Offline
Team-XBMC Python Developer
Posts: 395
Joined: Jan 2009
Reputation: 0
Post: #8
I know the flow of scraper now can't do this. But meedio's .mpp can do this.
(This post was last modified: 2009-05-29 03:23 by taxigps.)
find quote