View Single Post
Old 10-08-2010, 02:13 PM   #11
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by kidblue View Post
Does the above suggest that "use print version" take the place of /content/printVersion?
I'm not sure how much you understand about recipes or what Tony did in that particular case. The normal use of the print_version method is described in the Calibre API.

When a recipe is run, it takes a list of feeds, parses each feed to find links to articles, and fetches the articles. The print_version method simply modifies the link to the article so that you get a simpler version of the article than the feed link supplies. Instead of going to the article, with all of its junk, Calibre goes to the print version of that article. With me so far?

In some cases, the link to the article is not enough. The link is said to be "obfuscated." There are lots of reasons why the link is not enough. Perhaps cookies need to be handled, perhaps it's a referer issue, but regardless, it's usually possible to follow that link with a browser set up inside the recipe. That's what Tony did. Calibre allows you to set up an internal browser session that will behave in a way that's closer to the way a normal browser works. As he did that, it looks like Tony made the link go to the print version, but, he didn't have to send it there, and it's different from just using the print_version method. The link I gave you describes the bit of Calibre recipe code that Tony used that sets up the internal browser. It gives a good explanation of the code and how it's used. You seemed to be interested.

Last edited by Starson17; 10-08-2010 at 02:50 PM.
Starson17 is offline   Reply With Quote