LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-23-2012, 07:35 PM   #1
RandomTroll
Senior Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 1,032

Rep: Reputation: 166Reputation: 166
The disappearance of the 'print' link from articles on nytimes.com


I view articles at http://www.nytimes.com in the 'print' version. This puts the whole article on one page, making it easier to scroll up and down and search, and removes all the ads and other stuff; it's cleaner.

Beginning Friday the 'print' link no longer appears when I view http://www.nytimes.com with my favorite browser, lynx. It works in Firefox. It appears in Opera but, instead of giving me the 'print' version, returns me to the regular version; the same happens in IE when I use a public computer which has Windoze. (It works properly in Firefox in Windoze.)

I changed the 'user agent' (a settable parameter in lynx) to Firefox's: this made no difference.

Does anyone understand this? I 'hack' my copy of lynx to make it work the way I want to; if I can rewrite something to make it 'cue' nytimes.com appropriately, I will. I thought it might be Java, but Opera and IE have Java.

Blog articles still have the 'print' version on all browsers.
 
Old 04-23-2012, 08:20 PM   #2
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
That sounds alot like browser interpretation issues. There may not be much you can do except use IE and report the bug to nytimes with your OS, User Agent etc.. so they can try and duplicate and resolve the problem. I seriously doubt the issue is something you could resolve on your local machine but you may be able to do something like stylish and write your own CSS for it if it uses CSS and that is the problem.
 
Old 04-24-2012, 02:40 AM   #3
RandomTroll
Senior Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 1,032

Original Poster
Rep: Reputation: 166Reputation: 166
Why would I want to use IE? It doesn't work nor does it run in Linux. And I don't have it on my machine.

I reported it to nytimes.com. I have been a subscriber for years but they have never responded to any error report I have sent them.

I have inspected their stylesheets: I don't see what in them would affect this.

If I know how they interpret my browser (which I know they do because they gzip pages I download) then I should be able to make them think I can handle print links.
 
Old 04-24-2012, 02:55 PM   #4
SharpyWarpy
Member
 
Registered: Feb 2003
Location: Florida
Distribution: Fedora 18
Posts: 862

Rep: Reputation: 91
You said you like using Lynx, have you tried elinks for this? Just a suggestion.
 
Old 04-24-2012, 02:59 PM   #5
RandomTroll
Senior Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 1,032

Original Poster
Rep: Reputation: 166Reputation: 166
elinks exhibits the same behavior.
 
Old 04-24-2012, 03:50 PM   #6
SharpyWarpy
Member
 
Registered: Feb 2003
Location: Florida
Distribution: Fedora 18
Posts: 862

Rep: Reputation: 91
Navigate to your New York Times page and hit "l". See if the "print" link shows up there. Using Lynx.

Last edited by SharpyWarpy; 04-24-2012 at 03:51 PM. Reason: more info
 
Old 04-24-2012, 07:25 PM   #7
RandomTroll
Senior Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 1,032

Original Poster
Rep: Reputation: 166Reputation: 166
Quote:
Originally Posted by SharpyWarpy View Post
Navigate to your New York Times page and hit "l". See if the "print" link shows up there. Using Lynx.
It doesn't.

For the first time nytimes.com responded!

Quote:
Originally Posted by someguy@nytimes.com
We have received reports of Internet Explorer not showing the "Single" and "Print" buttons correctly. We have been able to replicate this error and our technical team are working to correct the issue.
Good thing it doesn't work correctly in IE. That's probably the difference. Bet they won't fix my problem though.

If I append ?pagewanted=print to the URI I get the page I want. I'll have to figure out how to rewrite lynx to do that.
 
Old 04-25-2012, 03:21 PM   #8
RandomTroll
Senior Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 1,032

Original Poster
Rep: Reputation: 166Reputation: 166
This ended up with a happier result: I added a new function to lynx that appends ?pagewanted=print to the highlighted link so I can bring up the print version with a single key (y was available) rather than bringing up the page, finding the print link, and clicking on it. Once I figured it out it was simple. It's much better to fix one's own problems than rely on others.
 
Old 04-25-2012, 04:19 PM   #9
SharpyWarpy
Member
 
Registered: Feb 2003
Location: Florida
Distribution: Fedora 18
Posts: 862

Rep: Reputation: 91
Quote:
Originally Posted by RandomTroll View Post
This ended up with a happier result: I added a new function to lynx that appends ?pagewanted=print to the highlighted link so I can bring up the print version with a single key (y was available) rather than bringing up the page, finding the print link, and clicking on it. Once I figured it out it was simple. It's much better to fix one's own problems than rely on others.
I agree it's better to fix your own problems. That being said, however, can you elaborate on just how you did this? For the benefit of others who do not share your sentiment and lack your knowledge and skills? It might also be nice to let the folks with whom you corresponded at the New York Times know, too.
 
Old 04-26-2012, 12:23 AM   #10
RandomTroll
Senior Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 1,032

Original Poster
Rep: Reputation: 166Reputation: 166
I duplicated the LYK_DOWNLOAD portions of LYKeymaps.c LYStrings.c and LYMainLoop.c as NYT_DOWNLOAD I used the 'y' key (it was unused). In the handle_NYT_DOWNLOAD function I use strcspn to find the first instance of ? of the URI, copy that portion to a new string, NYT_TARGET, append ?pagewanted=print, then use that as the argument.

Code:
          NYTTargetLength=strcspn(links[curdoc.link].lname, "?");


          /* nytimes.com appends stuff after the base URI that tells it whence
             one chose the target, such as ?us (for national), ?science,
             ?todayspaper (for the front page).
             I strip that off and append ?pagewanted=print.
*/
           
            strncpy(NYTTarget, links[curdoc.link].lname, NYTTargetLength);
          strcat(NYTTarget,"?pagewanted=print");

                    set_address(&newdoc, NYTTarget);
 
1 members found this post helpful.
Old 04-26-2012, 04:18 AM   #11
SharpyWarpy
Member
 
Registered: Feb 2003
Location: Florida
Distribution: Fedora 18
Posts: 862

Rep: Reputation: 91
Nicely done. Thanks very much for your contribution, I'm sure it will be of use to many.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Publish your own articles, and retain credit; edit other articles VectorThorn General 11 11-01-2009 01:14 PM
Print to D-Link Print Server dovad Linux - Hardware 1 08-19-2006 04:32 AM
nytimes crossword puzzles north49er Slackware 1 07-28-2004 02:28 PM
using print server from D-Link 704p duckjob Linux - Hardware 11 11-09-2003 10:59 PM
Problem Printing to D-Link Print Server Marth Slackware 4 06-14-2003 05:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration