Warning to all: My development copy of comx.xml is attached. It works fine
for me (except for King Features comics), but I have not tested it
carefully. If you want to try it, save a backup copy of your current
comx.xml.

Shawn,

> > I'm still trying to get King Features comics (like Baby
> > Blues) to work. They use JavaScript and the document
> > referrer to deliver the comic image after the page loads.
> > Anyone got any ideas how to make this work? 
> 
> Can you link me to a sample comic so I can look at the 
> javascript and write a regex for it? I'm sure it's possible 
> to parse the JS as easily as the tables from most other 
> comics. I've started using the code I initially wrote for 
> RSSX for just about all the screen scraping functionality I need.

Try Baby Blues:
http://sfgate.com/cgi-bin/article.cgi?file=/comics/Baby_Blues.dtl
http://www.babyblues.com/

The first link may be slightly easier, since it doesn't load the image with
a 'document.write'. They both have the same problem: If the referrer isn't
correct, you get a bogus comic image.

> You can add a referer header to the xmlhttp request, after 
> ".open", before ".send". It'll look kinda like this:
>   xmlhttpObj.setRequestHeader("referer","http://somepage";);

Get out! I didn't know you could do that on xmlhttp requests. I'll try it!

> The other alternative, though this is only effective for 
> normal searches, is to use a named target window and send two 
> requests to it, the first as the page you need as referer, 
> the second as the ultimate target. This doesn't work with 
> xmlhttp though. :(

I've been thinking about that: creating a window, redirecting to the comic
sight, retrieving the results. I haven't found an approach that works, yet.
 
> For anyone wanting to try this functionality out (and it's 
> been a long-requested feature) please get the latest 
> defer_tools.js from CVS.

I'll try it!

Regards,
Gregory Krohne

Attachment: comx.xml
Description: Binary data

Reply via email to