Kodi Community Forum
[XBOX] Decrypt Zshare Movie URLs? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+--- Thread: [XBOX] Decrypt Zshare Movie URLs? (/showthread.php?tid=49254)

Pages: 1 2


[XBOX] Decrypt Zshare Movie URLs? - livid86 - 2009-04-20

Hello,

I hope that some here can help on how to decrypt zshare movie urls. I'm having heaps of trouble. Have a look here and follow until you get to zshare http://www.watchtvsitcoms.com/movies.html

Thanks heaps.


- livid86 - 2009-04-20

Sorry, I screwed up.. I figured it out.. Thanks anyhow


- adityaag - 2009-07-04

Hey,
Wondering if there's a new means for getting zshare videos that anyone has worked out yet. Otherwise, I guess I'll start scraping.. thanks.


- Haggy - 2009-07-04

livid86 Wrote:Sorry, I screwed up.. I figured it out.. Thanks anyhow

How about showing a brief explanation on how you fixed it - would be nice for other ppl that stumble upon this thread via google or the search and having the same issues. As for now, this thread is useless.


- Voinage - 2009-07-04

He only dealt with that site directly, not zshare as a whole - I think.

If you have worked around the new format urls, then cookie, then download finally remove unwanted garbage via urllib unquote then piece the url together and begin the stream.

May the chaps see the code brother, probably will help the zshare nuts until i release the tvshack plugin with eatlime ,zshare,stagevu and all the other vendors they seem to keep adding..

Cheers,

Voinage.


- adityaag - 2009-07-04

So I've actually decoded the download URL for zshare completely. I can get the link to the direct video now so that the stream should be able to start. Unfortunately, zshare makes sure that the User-Agent being used to access the file isn't IE (at least for the wmv files I'm interested in..) Any ideas how to spoof this on XBMC?


- Voinage - 2009-07-04

This does the trick for anyone wanting the zshare original file.



Try this:

Code:
url='http://www.zshare.net/videoplayer/player.php?SID=dl045&FID=51809232&FN=fastpasstv.com-jc2.wmv.flv&iframewidth=530&iframeheight=370&width=551&height=370&H=6117532099cb9100'
req = urllib2.Request(url)
req.add_header('User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7')
link = urllib2.urlopen(req).read()
p1=re.compile('<a href="(.+?)" style="color: #666666; text-decoration: none;font-size:10px" target=_top>Download Video</a>').findall(link)
req = urllib2.Request(p1[0])
req.add_header('User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7')
link = urllib2.urlopen(req,'referer2=&download=1&imageField.x=76&imageField.y=28').read()
file=re.compile('new Array.(.+?).;').findall(link)
zsharefile=file[0].replace("'","").replace(",","")
print zsharefile

You would have to listen for the user-agent being sent then send the replacement.

Just run the links through Veohproxy as a streamplug link and adjust the host & referer etc to suit.

As far as i`m aware they haven`t implemented xbmc direct user spoofing yet.
I did ask a while ago, so as soon as i hear anything....


- adityaag - 2009-07-04

Thanks. That's the code I actually have now to get the zshare URL. Just need that tip about VeohProxy. Will look into that. As always, your help is much appreciated Voinage.

Voinage Wrote:This does the trick for anyone wanting the zshare original file.



Try this:

Code:
url='http://www.zshare.net/videoplayer/player.php?SID=dl045&FID=51809232&FN=fastpasstv.com-jc2.wmv.flv&iframewidth=530&iframeheight=370&width=551&height=370&H=6117532099cb9100'
req = urllib2.Request(url)
req.add_header('User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7')
link = urllib2.urlopen(req).read()
p1=re.compile('<a href="(.+?)" style="color: #666666; text-decoration: none;font-size:10px" target=_top>Download Video</a>').findall(link)
req = urllib2.Request(p1[0])
req.add_header('User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7')
link = urllib2.urlopen(req,'referer2=&download=1&imageField.x=76&imageField.y=28').read()
file=re.compile('new Array.(.+?).;').findall(link)
zsharefile=file[0].replace("'","").replace(",","")
print zsharefile

You would have to listen for the user-agent being sent then send the replacement.

Just run the links through Veohproxy as a streamplug link and adjust the host & referer etc to suit.

As far as i`m aware they haven`t implemented xbmc direct user spoofing yet.
I did ask a while ago, so as soon as i hear anything....



- adityaag - 2009-07-05

Just wondering with VeohProxy. When exactly do you start it? Fairly new to VeohProxy and all of those and can't see to figure it out. If I understand right, it's just a local web server that makes the reqeusts and caches things so that the streams work right. I just can't figure out when to actually start VeohProxy so that any links I make would work. Sorry if I should like a newbie.. but it might because I kinda am Big Grin


- Voinage - 2009-07-05

Yes it is, localhost.
No problem, you need to run veoh proxy before you select the streaming link.

Xbox - in the scripts folder.
Any other format just run it by clicking on it via python externally.

You will need to modify the streamplug sending def to include the headers you want.


- adityaag - 2009-07-05

Thanks for the help. Made the modifications to VeohProxy and added another option for zshare. Is there any way to auto launch VeohProxy on Xbox start up. Haven't played with settings and such much yet. Figured I'd ask in case anyone knew real quick before diving in.

Thanks.


- pajretX - 2009-07-05

Yes, there is. Create a file autoexec.py in the main scripts directory (Q:\scripts\)
The file should contain:

import xbmc
xbmc.executescript('Q:\\scripts\\veohproxy\\veohproxy.py')

Change the path accordingly.

Regards,


- adityaag - 2009-07-05

Thanks guys for all the help. Not sure why I'm still running into this last issue. Whenever I launch an actual video link from the Xbox, it can't connect to the VeohProxy web server. If I try the same link from my laptop hitting the Xbox's IP address it's fine and runs the link. I just get a screen where it's Connecting to xxxx[xxxx]:pppp....

I've tried different ports, localhost, and actual static ip.. none of these seem to help me be able to connect to VeohProxy when I actually try and play the video file. Any suggestions? Any settings need to be changed in the Xbox to let this work?

Thanks.


A Question - isiddiqi - 2009-07-11

Using the decrypt method by Voinage I tried that in Python on my PC and I get the zShare Url. Then I paste that Url in VLC Player and it starts to play the movie file.

Now I go to XBOX (XBMC), and in my plugin do the same it does not play the stream link, even though I get the right stream link. Also, when I run Veohproxy on XBOX, sometimes it plays the video and other times it acts like Veohproxy does not even exist (I verified it to be running) and does not play the stream.

I have some more questions if someone would be kind enough to answer, would appreciate very much:

1. If I can play the url on PC, why do I need to run Veohproxy on XBOX, what is so different. Why does XBOX not play the url?
2. When I exit Veohproxy on my XBOX, I get a Python error. What could be the reason, does anyone else get this? Also Do I need to open any ports in my router?
3. What does it mean to "modify the streamplug" in Veohproxy. Can someone give an example. Do you mean I need to edit the Python script for Veohproxy, and if so what type of info do I need to add?


- adityaag - 2009-07-11

So I was trying the same steps as you before I came to the board to ask for advice on User-Agents. The issue is the zshare checks to make sure that the user-agent is MS Windows and even more specifically some for of IE. Since XBMC on the Xbox has it's own User-Agent string, it can't actually open the URL (instead it gets redirect to zshare).

As for VeohProxy not actually playing right, I'm getting the same error. I get the issue where it says it's running but I can actually connect to it from the Xbox. Haven't found what the cause for this is yet and maybe someone else can provide some insight.

As for the "modify the streamplug" in Veohproxy, what he meant is to patch up the code to work with zshare links. I've already done this and can post the updated code so you can get. I'm still getting the issue though where I can't connect to the running VeohProxy on the Xbox so I haven't been able to test it out.. and I hate posting my code without testing it.

So question I have.. anyone know why I wouldn't be able to connect to a running instance of veohproxy from the xbox?