AnimeSuki RSS & XML
Please Note: This information was originally posted by GHDpro on the old forum, here.
For those of you who wish to syndicate the latest releases
(essentially the main page), by request I've written a XML
page to make extracting the info a lot easier (hopefully).
The page is: http://www.animesuki.com/xml.php
By default it outputs exactly the same thing as the main
page, sorted by added date. But there are a few options:
This sorts the XML page by release date, not added date.
This sorts the page by filename if specified.
Allows you to specify how much you want to see. The value
you need to pass to this is a unix timestamp. Any torrents older
(by added or release date) than this date will not be included
in the output, hence the name "cutoff". So if you just want
the releases of the past day, you would specify:
time() - (24 * 60 * 60)
Note: The maximum cutoff is about 10 days, anything more
will not be allowed because it would use to much bandwidth if
used to much with that amount of data.
Example URL using above options:
Now I've not written any XML before, so I'm not sure if the
page can even be properly parsed at all, but IMHO it looks good.
After more requests (see below) I've now also build a RSS page.
Looking into what client applications can do with such a feed,
RSS looks VERY interesting.
The page is: http://www.animesuki.com/rss.php
One client you can use for this feed is FeedReader (Freeware).
One very interesting option of this utility is that it can sit in the
system tray and check the RSS page in intervals (15 min by default).
If it finds a new "headline", it'll show a popup like this:
Imagine getting notified of the latest Naruto (or whatever your
favorite series is) this way! I haven't really tested it properly,
but in theory it should work!
(Many people have since tested it ^_^ and it does indeed work really well ~ Ed)
Note: The RSS page doesn't take any options, it always lists the most
recent added torrents in the past 24 hours.
If you have any questions/comments, reply to this thread.
You can also use the RSS to put an AnimeSuki feed on your homepage. Using a tool like http://www.newsisfree.com/ you can see the latest headlines from Slashdot, Kuro5hin and AnimeSuki all in one place.
I've been playing around with the XML (not RSS XML) and have successfully parsed it using php.... http://temp.pzfn.com/xmlsuki/
the filesize might be off but is approximate and i can't figure out why the release dates comeout wrong... maybe because server time is different or something...
Even though your page looks nicer and has all the presented information on it I think phattangent's attempt is better. Given the name of your file (asripper) and the fact it shows only Naruto torrents; I'm guessing you just filtered the Naruto series page. He on the other hand processed the XML feed as intended... So in my opinion, despite your pretty layout, his is the "better" page in this instance. :)
Anyway; back on topic -- I'm not really sure why you posted in this thread phattangent; if you want help with the script (fixing the time for example?) you might want to post in the Technology forum instead.
Edit: Just changed id to "one piece" to show it works with any series. Plus it uses css to change look and one another thing...AS doesn't provide xml for series, if it did I would parse xml rather too.
I can't seem to get http://www.animeblitz.org/Temp/asripper/example.php to show up...
note: i thought about exporting the xml to mysql but then realized that the ul and dl wouldn't be live for torrents not in the xml...
note2: i think that maybe instead of getting animesuki's xml file every hit it might be better to do a cron job and get the xml once every hour or two and save it to a local suki.xml (maybe) and then run my script using that.. which probably would be faster
Oh yeah... i fixed the release dates....
ok... i can see it now... thats cool.... is it possible for me to see your code?
sure thing... thx!
First off, Moin Forse! ^_^
I just recently (like a few hours ago) read about RSS in the April edition of Maxium PC and I started thinking about posting a comment about this on the forums. And low and behold, people have already done it LOL.
So anyways back to the topic.
I'm confused Forse on why you are using PHP to check AS releases when the XML/RSS is all ready and there for you to use?
What's the advantage? Cause I want to start scripting my own page =P
Let me show a trick so far only reserved for the innards of the AnimeSuki (mirror-side) scripts:
This file contains a repeating pattern of 6 bytes containing:
- Penalties for the tracker
Special values: 65535 for penalties means "no info for UL/DL" (the site will show "-" instead).
Here is the function you can use to get the info
(where $scrape is a string with complete contents of the file):
This will return an array with the fields array["ul"], array["dl"] and array["penalties"].
Now just like RSS and XML, please DO NOT hit this file to often, and DO NOT
use the main site (AnimeSuki.com) to get this info -- use mirrors and preferbly
the link I posted above, as it's my "own" mirror which can take a "hit" (by figure
There are more data files like these, but those aren't as useful. Most of the data
is stored in a MySQL database of course, as it's easier to query on. However the
scrape (UL/DL) etc. data would be much to "tiny" to update the database with each
time for each row -- it would take thousands of UPDATE queries -- every 15 minutes!
Which is still ok for a server you own (backend server does do this) but I wouldn't want
to burden the mirrors with this and came up with this solution.
So I would use the PHP function you provided to grab info from that .dat file you provided?
Yes and no. That function will extract the information from a string called $scrape but it would be up to you to actually download the .dat file from one of the mirrors and read it into the string.
...and to elaborate on NighWish's post, that would be as simple as:
[php]$fp = fopen("http://www.rpguru.com/data/scrape.dat","rb");
$scrape = fread($fp,102400);
...really simple PHP -- if you don't know that then... er. Of course you can
make it a bit more exotic if you use the CURL functionality in PHP (if compiled in)
to get the file (which is what the AnimeSuki scripts do to for example support
GZIP reading etc, which some trackers require).
P.S. I would rather use xml too if there was one for series.
Here is an example of how my xml parser script will look on my website...
thx for sharing the info guys.
I'll be able to take it from here, I'm taking a C++ class now and im the top student :P
(yes, I love programing!)
|All times are GMT -5. The time now is 19:35.|
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2015, vBulletin Solutions, Inc.