Kodi Community Forum
[REQUEST] ThePirateCity.org plugin or script? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+--- Thread: [REQUEST] ThePirateCity.org plugin or script? (/showthread.php?tid=37727)

Pages: 1 2 3 4


[REQUEST] ThePirateCity.org plugin or script? - w3__ - 2008-09-23

http://thepiratecity.org

Streaming movies galore. Smile


- empty - 2008-09-23

So illegal


- althekiller - 2008-09-23

The site will likely be taken down before the script is finished. They never last, and aren't worth the trouble IMO.


- Spc4 - 2008-09-25

I saw this on Digg the other day, and I think some one said that the Pirate Bay was starting a streaming site. Im not sure if this was it or something diffrent.


- w3__ - 2008-09-25

That's what I thought it was (and why I thought it would stay up for a while)


- PKOneTwo - 2008-09-26

it is coming. It was just a beta phase and will launch on 1st october.

So a Plugin or a script IS WORTH the trouble.
And we all know piratebay: they will go ofline and go back online and offline and online and.....


- Voinage - 2008-09-27

If a plugin is coded before their code is stable it`s pointless. Changing code every week is tiedious.


- CASHMON3Y - 2008-09-27

This is starting to look promising. If its piratebay then more then likely it shouldnt be to hard to stream, as im sure they would support it more then ninjavideo does.


- CASHMON3Y - 2008-10-02

Its up.


- rwparris2 - 2008-10-02

It isn't actually related to thepiratebay.org at all.

http://newteevee.com/2008/09/22/pirate-bay-imposters-launch-streaming-video-site-get-media-attention/

Doesn't mean it isn't worth while, just means it isn't as cool as a real pirate bay streaming site.


- w3__ - 2008-10-24

This site is getting better and better! Anyone want to take a shot at it?


- Voinage - 2008-10-25

If you feel like converting their actionscript to python for converting their links then here you go.

Code:
Stage.addListener(listener);
for (i = 0; i < 26; i++)
{
    if (storeMessage.charAt(0) == alphabet.charAt(i))
    {
        keyPosition = i;
    } // end if
} // end of for
for (i = 0; i < 26; i++)
{
    randomAlpha = randomAlpha + alphabet.charAt(keyPosition);
    ++keyPosition;
    if (keyPosition == 26)
    {
        keyPosition = 0;
    } // end if
} // end of for
for (i = 0; i < storeMessage.length; i++)
{
    if (storeMessage.charAt(i) > String.fromCharCode(96) && storeMessage.charAt(i) < String.fromCharCode(123))
    {
        for (j = 0; j < 26; j++)
        {
            if (storeMessage.charAt(i) == randomAlpha.charAt(j))
            {
                switchOverDecoded = switchOverDecoded + alphabet.charAt(j);
            } // end if
        } // end of for
        continue;
    } // end if
    switchOverDecoded = switchOverDecoded + storeMessage.charAt(i);
} // end of for
storeMessage = switchOverDecoded.substring(1);
randomAlpha = "";
switchOverDecoded = "";
videoPath = storeMessage;
flvControl.contentPath = videoPath;

That changes : -

flashvars="myURL=lseea://hhh219.xprlfawzlo.nzx/qtwpd/6o3npq153n53705m8258421n5nm97o8n/674QBY78jY.qwg"

into a legible useable flv link to megaupload.

I`m too busy but you can use this code , just tweak it.

Code:
import urllib,urllib2,re
    
def ExtractMediaUrl(data):
        if len(data) > 0:
            code = codeResults[-1]
            dictionary = {"0":":","%24": ".", "%25": "/", "%3A": "0", "%3B": "1", "8": "2", "9": "3", "%3E": "4", "%3F": "5", "%3C": "6", "%3D": "7", "2": "8", "3": "9", "a": "k", "b": "h", "c": "i", "d": "n", "e": "o", "f": "l", "g": "m", "h": "b", "i": "c", "k": "a", "l": "f", "m": "g", "n": "d", "o": "e", "p": "z", "s": "y", "%7E": "t", "y": "s","%7C": "v", "%7D": "w", "z": "p"}
            return RegexReplaceDictionary(code, dictionary)
        else:
            return ""
        
        #===========================================================
def RegexReplaceDictionary(string, dictionary):
        """
            take a text and replace words that match a key in a dictionary with
            the associated value, return the changed text
        """
        rc = re.compile('|'.join(map(re.escape, dictionary)))
        
        def Translate(match):
            return dictionary[match.group(0)]
        
        return rc.sub(Translate, string)



req = urllib2.Request('http://www.thepiratecity.org/movieiframe.htm?id=571UBQNCTWN6da734187f5b0e43184a338174d18f71YItsszRaLnU4Hp4tQYefg617ylD7J9QxH9Q0zx0bKL')
req.add_header('User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1;en-GB; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14')
response = urllib2.urlopen(req).read()
match=re.compile('\r\nflashvars="myURL=(.+?)"').findall(response)
link=ExtractMediaUrl(match[0])

You just need to change the dictionary values to piratecitys` and add the offsets.

cheers V


Piratecity is fixed. - Voinage - 2008-11-27

Fixed and working, in the sig.


- Temhil - 2008-11-27

Hi Voinage,

First of all, thanks for your great work on plugins!
For Pirate City I am a little bit confuse, of wich version this is a fix?

Coolblaze has realeased a v2 of his plugin on November 19th here:
http://code.google.com/p/coolblaze-xbmc-plugins/downloads/list

so the one you just fixed is it from the v2 or the first release?
Or is it 2 parallel versions?

Thanks in advance!


- Voinage - 2008-11-27

They changed the layout on the 25th - so mine is a fix of a version with imdb but not v2