script.module.urlresolver development
#20
so here is what i just did when taking a quick look at this site.....

rogerthis Wrote:Thanks getting back so quick.

The site is vidreel
http://vidreel.com/video/OTM3NDM0/ which redirects to http://vidreel.com/human/OTM3NDM0/ straight away. I know that I have to include
Code:
"name" : "watch" and "action" : "#"
but how do I know what else needs to be included eg cookies, Referer. Is it trial and error?

in a incognito window (so you don't get any old cookies) of chrome, open dev tools (ctrl+shit+i) then load the page. as you say it is diverted to the /human page. right click on the 'continue to video' button and choose 'inspect element' and you will be taken to the html code for the button. you'll see that it is in a html form, but that the button itself is just an <a> tag which just links back to the original page. weird. unless there is some fancy javascript going on the form isn't being submitted.

click on the button and look at the top entry ion the network tab of the dev tools. you'll see that sure enough, it is just a GET request. you'll notice that there are some cookies sent (you can ignore all the tracking ones - '__utma', '__utmb' etc. - you'll notice these appear on lots of pages) - 'videohuman' an sometimes 'video'. maybe these are all that is required?

so i test in python. in the 'lib' directory of script.module.t0mm0.common i type python to enter the interactive interpretor and use the Net class with the debug flag enabled to load the page (this is easier than straight urllib2 as it handles cookies etc. with hardly any code required). it gets diverted to the /human page but you can see the cookies being set. so i load the page again, this time it desn't get diverted! so all you have to do is load the url twice, the first time the cookies get set and the second time it loads the real page. you can see my python session here

stage one done!

rogerthis Wrote:Here is the code for the video.
Code:
<script type='text/javascript'>
var so = new SWFObject('../../9.swf','ply','600','340','9','#ffffff');
so.addParam('allowfullscreen','true');
so.addParam('allowscriptaccess','always');
so.addParam('wmode','transparent');
so.addVariable('file','08022eb20345a3d9fd77b34f087a97f8.mp4');
so.addVariable("skin", "../../dangdang.swf");
so.addVariable('bufferlength','5');
so.write('mediaspace');
</script>

Is the link?
Code:
http://vidreel.com/9.swf:08022eb20345a3d9fd77b34f087a97f8.mp4

Do I need to include the other parameters for the file to play?

getting close.

as you noticed the javascript you posted above shows the file name but not the server or protocol - this means it is probably embeded in the swf file so we need to do more work.

pressing the play button on the flash player gives no entries in the network tab of the chrome dev tools so it is probably not just downloading the video via http. that makes it a little tougher.

i decided to use rtmpsrv which comes with rtmpdump and lets you intercept calls to rtmp servers and gives you an rtmpdump command line to use.

(this is on linux, dunno about other os's) first off i run the iptables command that diverts traffic for port 1935 (the rtmp port) to localhost. then run rtmpsrv and press play on the flash player. now don't forget to remove the iptables rule (or prepare to get very confused later!). my terminal output from this process is here.

copy and paste the rtmpdump command line to test - it works!

this gives you all the needed information to play the link in xbmc. the rtmp command line translates to
Code:
rtmp://213.163.74.245/vod/mp4:08022eb20345a3d9fd77b34f087a97f8.mp4 swfUrl=http://vidreel.com/7.swf pageUrl=http://vidreel.com/video/OTM3NDM0/
in xbmc talk. bung that in a .strm file to test and.... yay! that works too Wink

now all you need to do is try a bunch of different videos to see if they all use the same rtmp server, and if not work out how to tell the difference (hint: maybe the different numbered swf files refer to different servers? can you just pick one at random or do you need to use a specific server for a specific video? so many questions - this is where the fun of testing comes in Wink)

hope that helps - shout if you don't follow any of that. obviously it isn't written as a nice tutorial but is literally just notes i took as i was looking at the site. maybe we can turn it into a proper tutorial as part of the docs for this module.....

t0mm0.
Reply


Messages In This Thread
[No subject] - by t0mm0 - 2011-07-25, 02:06
[No subject] - by mrdally204 - 2011-07-25, 20:30
[No subject] - by Temhil - 2011-07-26, 23:44
[No subject] - by anarchintosh - 2011-07-27, 13:54
[No subject] - by t0mm0 - 2011-07-27, 14:14
[No subject] - by cloom - 2011-07-31, 09:26
[No subject] - by anarchintosh - 2011-07-31, 15:15
[No subject] - by t0mm0 - 2011-07-31, 20:10
[No subject] - by rogerthis - 2011-07-31, 21:35
[No subject] - by t0mm0 - 2011-07-31, 21:51
[No subject] - by rogerthis - 2011-07-31, 23:51
[No subject] - by t0mm0 - 2011-08-01, 00:53
[No subject] - by t0mm0 - 2011-08-01, 19:10
[No subject] - by rogerthis - 2011-08-01, 19:40
[No subject] - by t0mm0 - 2011-08-01, 20:19
[No subject] - by rogerthis - 2011-08-02, 21:43
[No subject] - by t0mm0 - 2011-08-02, 22:00
[No subject] - by rogerthis - 2011-08-02, 22:42
[No subject] - by t0mm0 - 2011-08-03, 00:11
[No subject] - by rogerthis - 2011-08-03, 23:48
[No subject] - by t0mm0 - 2011-08-04, 00:03
[No subject] - by rogerthis - 2011-08-04, 00:49
[No subject] - by Temhil - 2011-08-04, 19:07
[No subject] - by t0mm0 - 2011-08-05, 12:56
[No subject] - by reni10 - 2011-08-06, 09:46
[No subject] - by rogerthis - 2011-08-06, 10:26
[No subject] - by reni10 - 2011-08-06, 10:46
[No subject] - by rogerthis - 2011-08-06, 10:55
[No subject] - by reni10 - 2011-08-06, 11:32
[No subject] - by t0mm0 - 2011-08-06, 20:16
[No subject] - by t0mm0 - 2011-08-08, 21:52
[No subject] - by dallasnights - 2011-08-09, 03:57
[No subject] - by t0mm0 - 2011-08-09, 15:07
[No subject] - by reni10 - 2011-08-10, 02:07
[No subject] - by t0mm0 - 2011-08-10, 21:02
[No subject] - by Eldorado - 2011-08-11, 23:02
[No subject] - by t0mm0 - 2011-08-11, 23:36
[No subject] - by rogerthis - 2011-08-12, 00:00
[No subject] - by t0mm0 - 2011-08-12, 00:29
[No subject] - by reni10 - 2011-08-12, 01:53
[No subject] - by Eldorado - 2011-08-12, 21:47
[No subject] - by t0mm0 - 2011-08-12, 23:54
[No subject] - by rogerthis - 2011-08-13, 01:54
[No subject] - by t0mm0 - 2011-08-13, 03:30
[No subject] - by pieh - 2011-08-13, 09:33
[No subject] - by rogerthis - 2011-08-13, 09:47
[No subject] - by 95123321 - 2011-08-13, 11:20
[No subject] - by t0mm0 - 2011-08-13, 12:26
[No subject] - by reni10 - 2011-08-13, 15:05
[No subject] - by t0mm0 - 2011-08-13, 15:10
[No subject] - by whufclee - 2011-08-13, 23:37
[No subject] - by t0mm0 - 2011-08-14, 01:25
[No subject] - by ghizzu - 2011-08-14, 10:05
[No subject] - by whufclee - 2011-08-14, 10:52
[No subject] - by reni10 - 2011-08-14, 11:37
[No subject] - by t0mm0 - 2011-08-14, 11:52
[No subject] - by t0mm0 - 2011-08-14, 16:24
[No subject] - by Eldorado - 2011-08-14, 18:03
[No subject] - by ghizzu - 2011-08-14, 18:34
[No subject] - by rogerthis - 2011-08-14, 21:21
[No subject] - by t0mm0 - 2011-08-14, 21:26
[No subject] - by icky - 2011-08-14, 23:03
[No subject] - by rogerthis - 2011-08-15, 00:22
[No subject] - by t0mm0 - 2011-08-15, 01:56
[No subject] - by rogerthis - 2011-08-16, 12:03
[No subject] - by t0mm0 - 2011-08-16, 22:36
urlresolver and cookies - by DragonWin - 2011-08-17, 00:22
[No subject] - by t0mm0 - 2011-08-17, 01:07
[No subject] - by DragonWin - 2011-08-17, 16:09
[No subject] - by rogerthis - 2011-08-17, 21:07
[No subject] - by DragonWin - 2011-08-17, 22:17
[No subject] - by t0mm0 - 2011-08-17, 22:35
[No subject] - by t0mm0 - 2011-08-17, 22:38
[No subject] - by rogerthis - 2011-08-18, 01:02
[No subject] - by Eldorado - 2011-08-18, 19:26
[No subject] - by t0mm0 - 2011-08-18, 20:09
[No subject] - by rogerthis - 2011-08-18, 20:42
[No subject] - by iDude - 2011-08-18, 22:19
[No subject] - by t0mm0 - 2011-08-18, 23:02
[No subject] - by winylisa - 2011-08-19, 04:55
[No subject] - by iDude - 2011-08-19, 13:55
[No subject] - by dlinao23 - 2011-08-19, 16:20
[No subject] - by Eldorado - 2011-08-19, 16:29
[No subject] - by Eldorado - 2011-08-19, 16:42
[No subject] - by t0mm0 - 2011-08-19, 18:43
[No subject] - by Eldorado - 2011-08-19, 19:50
[No subject] - by pieh - 2011-08-19, 20:15
[No subject] - by t0mm0 - 2011-08-19, 20:17
[No subject] - by Eldorado - 2011-08-19, 22:01
[No subject] - by t0mm0 - 2011-08-19, 22:39
[No subject] - by Eldorado - 2011-08-20, 20:50
[No subject] - by t0mm0 - 2011-08-20, 21:02
[No subject] - by DragonWin - 2011-08-20, 22:34
[No subject] - by t0mm0 - 2011-08-20, 23:41
[No subject] - by DragonWin - 2011-08-21, 00:16
[No subject] - by t0mm0 - 2011-08-21, 01:10
[No subject] - by t0mm0 - 2011-08-21, 01:22
[No subject] - by t0mm0 - 2011-08-21, 11:51
[No subject] - by DragonWin - 2011-08-21, 12:40
[No subject] - by t0mm0 - 2011-08-21, 13:15
[No subject] - by DragonWin - 2011-08-21, 13:29
[No subject] - by DragonWin - 2011-08-21, 19:18
[No subject] - by rogerthis - 2011-08-21, 20:00
[No subject] - by t0mm0 - 2011-08-21, 21:33
[No subject] - by DragonWin - 2011-08-21, 22:15
[No subject] - by t0mm0 - 2011-08-21, 22:34
[No subject] - by Eldorado - 2011-08-22, 18:13
[No subject] - by whufclee - 2011-08-22, 21:36
[No subject] - by t0mm0 - 2011-08-22, 22:11
[No subject] - by Eldorado - 2011-08-23, 00:01
[No subject] - by rogerthis - 2011-08-23, 09:52
[No subject] - by matmabro - 2011-08-23, 17:11
[No subject] - by t0mm0 - 2011-08-23, 22:14
[No subject] - by DragonWin - 2011-08-25, 10:14
Zshare plugin - by Eldorado - 2011-08-25, 19:42
[No subject] - by rogerthis - 2011-08-25, 21:08
[No subject] - by t0mm0 - 2011-08-25, 21:38
[No subject] - by t0mm0 - 2011-08-25, 21:44
[No subject] - by Eldorado - 2011-08-25, 22:49
[No subject] - by Eldorado - 2011-08-25, 22:51
[No subject] - by t0mm0 - 2011-08-25, 23:04
[No subject] - by Eldorado - 2011-08-26, 00:08
[No subject] - by Eldorado - 2011-08-26, 16:48
[No subject] - by rogerthis - 2011-08-26, 18:17
[No subject] - by Eldorado - 2011-08-26, 19:44
[No subject] - by t0mm0 - 2011-08-26, 20:14
[No subject] - by DragonWin - 2011-08-27, 21:37
[No subject] - by DragonWin - 2011-08-27, 21:50
[No subject] - by t0mm0 - 2011-08-27, 22:02
[No subject] - by DragonWin - 2011-08-27, 22:22
[No subject] - by t0mm0 - 2011-08-27, 22:29
[No subject] - by DragonWin - 2011-08-28, 23:02
[No subject] - by t0mm0 - 2011-08-28, 23:52
[No subject] - by k1m0s - 2011-08-29, 04:02
[No subject] - by DragonWin - 2011-08-29, 06:55
[No subject] - by k1m0s - 2011-08-29, 12:47
[No subject] - by t0mm0 - 2011-08-29, 15:52
[No subject] - by mynumbistongue - 2011-08-29, 18:00
[No subject] - by t0mm0 - 2011-08-29, 18:39
[No subject] - by Eldorado - 2011-08-29, 19:11
[No subject] - by Eldorado - 2011-08-29, 19:22
[No subject] - by t0mm0 - 2011-08-29, 19:50
[No subject] - by Eldorado - 2011-08-29, 21:38
[No subject] - by k1m0s - 2011-08-30, 01:53
[No subject] - by DragonWin - 2011-08-30, 18:23
[No subject] - by t0mm0 - 2011-08-30, 20:55
[No subject] - by t0mm0 - 2011-09-01, 01:14
[No subject] - by DragonWin - 2011-09-01, 06:42
[No subject] - by DragonWin - 2011-09-01, 07:12
[No subject] - by t0mm0 - 2011-09-01, 20:55
[No subject] - by t0mm0 - 2011-09-01, 21:12
[No subject] - by t0mm0 - 2011-09-01, 21:31
[No subject] - by DragonWin - 2011-09-02, 08:01
[No subject] - by DragonWin - 2011-09-02, 08:03
[No subject] - by DragonWin - 2011-09-02, 08:30
[No subject] - by DragonWin - 2011-09-02, 09:45
[No subject] - by t0mm0 - 2011-09-02, 20:00
[No subject] - by DragonWin - 2011-09-02, 20:54
[No subject] - by t0mm0 - 2011-09-02, 22:39
[No subject] - by DragonWin - 2011-09-03, 22:19
[No subject] - by t0mm0 - 2011-09-03, 22:43
[No subject] - by DragonWin - 2011-09-03, 23:35
[No subject] - by DragonWin - 2011-09-04, 12:59
[No subject] - by t0mm0 - 2011-09-04, 13:46
[No subject] - by DragonWin - 2011-09-04, 14:17
[No subject] - by t0mm0 - 2011-09-04, 14:32
[No subject] - by DragonWin - 2011-09-04, 15:10
[No subject] - by t0mm0 - 2011-09-04, 15:17
[No subject] - by DragonWin - 2011-09-04, 16:23
[No subject] - by DragonWin - 2011-09-05, 19:39
[No subject] - by t0mm0 - 2011-09-05, 21:15
[No subject] - by DragonWin - 2011-09-05, 21:41
[No subject] - by k1m0s - 2011-09-09, 04:19
[No subject] - by t0mm0 - 2011-09-09, 22:47
[No subject] - by k1m0s - 2011-09-10, 05:27
[No subject] - by DragonWin - 2011-09-12, 16:19
[No subject] - by DragonWin - 2011-09-12, 17:42
[No subject] - by anarchintosh - 2011-09-13, 14:23
[No subject] - by t0mm0 - 2011-09-14, 16:06
[No subject] - by t0mm0 - 2011-09-14, 16:25
[No subject] - by Eldorado - 2011-09-14, 18:32
[No subject] - by whufclee - 2011-09-14, 20:03
[No subject] - by k_zeon - 2011-09-16, 22:13
[No subject] - by t0mm0 - 2011-09-16, 22:16
[No subject] - by k_zeon - 2011-09-16, 22:44
[No subject] - by rogerthis - 2011-09-16, 23:03
[No subject] - by Eldorado - 2011-09-16, 23:36
[No subject] - by rogerthis - 2011-09-16, 23:48
[No subject] - by slyi - 2011-09-17, 09:50
[No subject] - by t0mm0 - 2011-09-17, 12:08
[No subject] - by t0mm0 - 2011-09-17, 13:20
[No subject] - by DragonWin - 2011-09-17, 16:02
[No subject] - by t0mm0 - 2011-09-17, 16:31
[No subject] - by k_zeon - 2011-09-17, 17:48
[No subject] - by t0mm0 - 2011-09-17, 17:50
[No subject] - by k_zeon - 2011-09-17, 18:10
[No subject] - by t0mm0 - 2011-09-17, 18:30
[No subject] - by k_zeon - 2011-09-17, 19:06
[No subject] - by k_zeon - 2011-09-17, 20:41
[No subject] - by t0mm0 - 2011-09-17, 21:25
[No subject] - by k_zeon - 2011-09-17, 21:38
[No subject] - by t0mm0 - 2011-09-17, 21:45
[No subject] - by k_zeon - 2011-09-18, 09:08
[No subject] - by t0mm0 - 2011-09-18, 12:59
[No subject] - by Eldorado - 2011-09-20, 03:47
[No subject] - by t0mm0 - 2011-09-20, 04:30
[No subject] - by Eldorado - 2011-09-20, 20:07
[No subject] - by t0mm0 - 2011-09-20, 20:15
[No subject] - by Eldorado - 2011-09-21, 05:05
[No subject] - by t0mm0 - 2011-09-21, 19:21
[No subject] - by t0mm0 - 2011-09-21, 19:41
[No subject] - by Eldorado - 2011-09-23, 20:49
[No subject] - by t0mm0 - 2011-09-23, 22:28
[No subject] - by Eldorado - 2011-09-27, 18:08
[No subject] - by Eldorado - 2011-09-29, 21:52
[No subject] - by slyi - 2011-09-29, 23:43
[No subject] - by t0mm0 - 2011-09-30, 15:48
[No subject] - by Eldorado - 2011-09-30, 17:45
[No subject] - by slyi - 2011-10-03, 17:05
[No subject] - by t0mm0 - 2011-10-03, 17:24
[No subject] - by lzoubek - 2011-10-03, 19:50
[No subject] - by t0mm0 - 2011-10-03, 20:40
[No subject] - by k_zeon - 2011-10-04, 08:28
[No subject] - by t0mm0 - 2011-10-04, 12:38
[No subject] - by k_zeon - 2011-10-04, 14:12
[No subject] - by Eldorado - 2011-10-04, 15:07
[No subject] - by Eldorado - 2011-10-20, 15:52
[No subject] - by k_zeon - 2011-10-20, 20:48
[No subject] - by Eldorado - 2011-10-20, 21:37
[No subject] - by k_zeon - 2011-10-20, 21:46
[No subject] - by Eldorado - 2011-10-20, 22:45
[No subject] - by t0mm0 - 2011-10-27, 15:48
[No subject] - by k_zeon - 2011-10-27, 20:04
[No subject] - by Eldorado - 2011-10-27, 21:15
[No subject] - by t0mm0 - 2011-10-30, 11:13
[No subject] - by t0mm0 - 2011-10-30, 16:26
[No subject] - by Eldorado - 2011-10-30, 17:34
[No subject] - by t0mm0 - 2011-10-30, 17:39
[No subject] - by Eldorado - 2011-10-30, 18:39
[No subject] - by k_zeon - 2011-10-30, 20:46
[No subject] - by Eldorado - 2011-10-31, 18:28
[No subject] - by t0mm0 - 2011-10-31, 21:16
[No subject] - by Eldorado - 2011-10-31, 22:09
[No subject] - by firejackson1 - 2011-11-01, 06:43
[No subject] - by koma85 - 2011-11-01, 11:52
[No subject] - by t0mm0 - 2011-11-01, 12:35
[No subject] - by koma85 - 2011-11-01, 12:57
[No subject] - by koma85 - 2011-11-01, 13:11
[No subject] - by MaxMustermann - 2011-11-01, 15:04
[No subject] - by koma85 - 2011-11-01, 16:21
[No subject] - by t0mm0 - 2011-11-01, 17:09
[No subject] - by t0mm0 - 2011-11-01, 17:13
[No subject] - by MaxMustermann - 2011-11-01, 17:33
[No subject] - by t0mm0 - 2011-11-01, 17:54
[No subject] - by koma85 - 2011-11-01, 18:26
[No subject] - by slyi - 2011-11-01, 19:15
[No subject] - by Eldorado - 2011-11-01, 23:17
[No subject] - by t0mm0 - 2011-11-02, 20:15
[No subject] - by slyi - 2011-11-03, 19:11
[No subject] - by t0mm0 - 2011-11-03, 21:33
[No subject] - by slyi - 2011-11-03, 22:31
[No subject] - by rogerthis - 2011-11-03, 23:23
[No subject] - by t0mm0 - 2011-11-04, 00:12
[No subject] - by t0mm0 - 2011-11-04, 00:15
[No subject] - by Eldorado - 2011-11-15, 22:42
[No subject] - by t0mm0 - 2011-11-17, 19:13
[No subject] - by Eldorado - 2011-11-17, 20:09
[No subject] - by Eldorado - 2011-11-17, 20:11
[No subject] - by bigdog6262 - 2011-11-18, 08:59
[No subject] - by DragonWin - 2011-11-18, 17:55
[No subject] - by Eldorado - 2011-11-18, 19:22
[No subject] - by t0mm0 - 2011-11-18, 19:43
[No subject] - by MaxMustermann - 2011-11-29, 12:47
[No subject] - by t0mm0 - 2011-11-29, 19:47
[No subject] - by halfman - 2011-12-06, 21:05
[No subject] - by Eldorado - 2011-12-07, 00:03
[No subject] - by dirtylion - 2012-01-03, 11:44
[No subject] - by Lynx187 - 2012-01-03, 13:30
[No subject] - by dirtylion - 2012-01-03, 14:28
[No subject] - by Lynx187 - 2012-01-03, 15:09
[No subject] - by dirtylion - 2012-01-03, 15:42
[No subject] - by Harry Muscle - 2012-01-23, 21:27
[No subject] - by Eldorado - 2012-01-23, 23:15
[No subject] - by newatv2user - 2012-01-24, 18:54
[No subject] - by Eldorado - 2012-01-26, 15:59
Is this ready to use - by coolkris - 2012-01-27, 00:13
[No subject] - by rogerthis - 2012-01-27, 00:26
[No subject] - by dirtylion - 2012-02-15, 19:32
[No subject] - by k_zeon - 2012-02-15, 23:06
[No subject] - by dirtylion - 2012-02-15, 23:43
[No subject] - by newatv2user - 2012-02-16, 00:21
update frequency - by icharania - 2013-07-16, 03:50
Logout Mark Read Team Forum Stats Members Help
script.module.urlresolver development7