Saving webpage

All your questions about AniDB belong in here.
No download support!

Moderator: AniDB

kyoo

Saving webpage

Post by kyoo »

Hm I don't know if this classifies as a bug, but...
The thing is I never had problems saving the webpage from anidb to my HDD (using IE) before. For example I opened some anime page on anidb and I needed to save it to my HDD for the purpose of offline viewing. I just clicked File -> Save as... and it was all fine. But lately it's not working at all, the web saving just stops with an error on the way, saying that it's not possible to continue. I though that it's smth wrong with my IE, but my friend has the same thing. Can it be fixed somehow or is it meant to be that way?
suppy
Posts: 151
Joined: Mon Jan 31, 2005 10:37 am
Location: A House of the Azath

Post by suppy »

IE is not supported by AniDB as it is a buggy client, and every version has its own quirks. I suggest you switch to a better browser like firefox or opera instead.
kyoo

Post by kyoo »

I've just tried saving it with FireFox. It's possible, but the page is full of errors - white background, broken links etc and it looks absolutely horrible.
TechNiko
Posts: 38
Joined: Thu Jun 30, 2005 5:07 am
Location: Quebec, Canada
Contact:

Post by TechNiko »

Well the "horrible white background" probably happens because AniDB now uses Cascading Style Sheets which are not in the main html, they're linked-in. As you can see there:

Code: Select all

<link rel="stylesheet" href="http://www.anidb.net/css/anidbstyle/anidbstyle.css" type="text/css" title="AniDB Style" />
But it works perfectly here (using firefox), as long as you view the saved webpage while connected to the internet, it should grab the stylesheet.
suppy
Posts: 151
Joined: Mon Jan 31, 2005 10:37 am
Location: A House of the Azath

Post by suppy »

if you want working things that look good, you could try a mylist export ... you'd haveto add the anime to your mylist though

...I believe some of the export templates include info about the anime too atleast. but don't take my word for it.

(I would point you to the wiki, but the mylist export wikipage has yet to be written ... I'll get on that soonish)

Edit: ok, so now I've made the mylist export wiki page: http://www.anidb.net/wiki/index.php?title=Mylist_export
kyoo

Post by kyoo »

Well, the point is I don't want to/can't be connected while watching saved webpages, otherwise there would be really no sense in saving them anyway. All I want is to save the page exacly how it is to my hdd, it was still possible 3 months ago and suddenly it's not and that's the first time I see problems like that happen, this is why I posted this topic. Thanks for the mylist export tip but that's not really what I'm after.
Rar
AniDB Staff
Posts: 1471
Joined: Fri Mar 12, 2004 2:41 pm
Location: UK
Contact:

Post by Rar »

All browsers offer a "Web page, complete" option rather than "Web Page, HTML only" - this ties a folder of all the images, scripts and styles to the markup and does a little rewriting to (try and) make everything work. Just pick the option you want under save as, yo.

Rar
kyoo

Post by kyoo »

Yes indeed, I do pick the complete web option and I get the problems I've posted :/ IE would propably save it correctly but dunno why it gets this error that the page cannot be saved on the way.
Rar
AniDB Staff
Posts: 1471
Joined: Fri Mar 12, 2004 2:41 pm
Location: UK
Contact:

Post by Rar »

*shrug*... works here (firefox 1.0.7)

Check that the css link is rewritten correctly:
<link rel="stylesheet" href="myplace_files/blue.css" type="text/css" title="AniDB Style">
That's where I've saved the page as 'myplace.htm' and it's created a folder called 'myplace_files' with the attachments in it.

Rar
kyoo

Post by kyoo »

I've installed FireFox 1.0.7. I chose File -> Save Pages As... and then pick "Web Page, complete". It saves the html file with the folder but in the folder there are only 2 files: anidbscript.js and anidbstyle_hacks.css. I downloaded the missing anidbstyle.css manually and pasted it into the folder and now the page displays correctly, however it is missing graphics. I don't have a clue why those werent saved by FF aswell.
Rar
AniDB Staff
Posts: 1471
Joined: Fri Mar 12, 2004 2:41 pm
Location: UK
Contact:

Post by Rar »

I presume it's not liking saving resources from a different domain, the pics/css are on anidb.net and the page is from anidb.info - I'd have guessed it was a css included pics issue, but as most of the pages still have the old <img> tags. Anyway, dunno what else to say, saving pages Works Here (tm).

Oh, unrelated but don't use _hacks.css unless you're actually forced to use IE, it's just a bunch of workarounds, linking anidbstyle.css directly will save you a few ms load once a month or so when your cached copy expires.

Rar
kyoo

Post by kyoo »

Yeah, I guess that is true. Anyway even if it did save the graphics, it still wouldn't rewrite the css file which contains gfx links. However, I found out how to make it work the hard way ;) I did the same directory structure like anidb has, in the saved page folder and then I just opened the css file in noteped and forced it to change every "www.anidb.net/css/images/..." to "/folder_name/css/images/...". It's not exacly the way I wanted to do this but hey - it works :P
kyoo

Post by kyoo »

OK, after having massive problems I can see that it doesn't work, tho it should. Anyway im stuck now, I ever wanted a friend to save the webpage for me but he can't do that in both IE and FireFox having the same problems as me. Anyone has some other ideas?
Rar
AniDB Staff
Posts: 1471
Joined: Fri Mar 12, 2004 2:41 pm
Location: UK
Contact:

Post by Rar »

Well, no, not really, and this is only going to get more complicated as we increase the dynamic-ness of the site - petriw has a revision planned for the anime pages that'll take all the file data out of the html.
Really, what you should be trying to do is use the browser's own mechanism for saving stuff off the internet - the cache - rather that trying to reinvent the wheel yourself. All browsers have an offline-mode, and doesn't IE even have an offline viewing flag? There are bound to be cache-preserving firefox extensions too, that could do stuff like never purge stuff from www.anidb.net / anidb.info - I'll have a look.

Rar
terrukallan

Post by terrukallan »

The problem is that anidbstyle_hacks.css uses an @import line to include the main anidbstyle.css stylesheet. Firefox/IE can download all necessary files that are referenced in the page, but that one is not.
Doing a complete web page save and then downloading http://www.anidb.net/css/anidbstyle/anidbstyle.css and putting it in the same folder as anidbstyle_hacks.css should (does for me, anyway) produce a working offline version of any page that references the "_hacks" stylesheet.
Locked