-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not fetch PRB articles #1
Comments
I'm so sorry for the belated reply. I should find a way to get a notification for an issue being raised. Thanks for your interest in my code. Probably your lynx does not allow command execution. I also had this trouble on my recent installs, and it is a TODO item to have getpaper be able to identify that lynx is missing the required option. Let me show you how I test this. Firstly, make a simple script in your path, call it hello.sh for instance
Then be sure to Fill a text file with some information, which will be used as a special configuration for lynx in a moment. You can use any text editor but you can just paste this at the command line, after fixing the path to hello.sh from above:
The other option is you find /etc/lynx.cfg and use sudo to edit it and find the part with
And you should change it to be something similar like
Now, go to google.com or whatever with lynx to test it. If you just did a local configuration, then
Then hit A and y etc to allow all cookies and so on so google loads. Now hit the comma key In all probability, you did not get the Zenity popup, proving the issue is with your lynx version that needs command execution build in to it. (Or that I did not explain instructions how to test this very clearly...I am planning to write an automated function to check this in the future.) Until recently, I believed that it was normal to include this feature with lynx, but I found some Linux distros do not enable it by default. In that sense, you will have to get lynx installed with this option. I don't have specific advice for you because I forget even what search terms I used or what this compile-time flag is called in lynx, but I will try to post an update in the future once I get it together. There is no way I know of for getpaper to otherwise deal with the APS captcha, because I need to retain the lynx session actively or the URLs to the image become invalid, and this was this trick of command execution with lynx (which launches getpaper again in a special mode) was my workaround. The problem is that we need the lynx session to stay alive. But how can we launch another command to parse the lynx output 1) Keeping the lynx session active 2) At the correct time. We could launch lynx in the background, but the script lynx is doing has to pause at just the right moment, and then do something correct with whatever we did in bash in the meantime. If I hadn't found this hack with executing commands in lynx I would have concluded I could not resolve the issue with APS captcha, but ideas are welcome to do this another way. |
Thank you for your reply and clear explanation. The configure option to compile lynx with external command support is "--enable-externs", as explained in the INSTALLATION file of lynx source package. I tried to compile lynx manually with external command support but still got some errors. It seems not easy to resolve and maybe I will check some time. |
Thanks. Yes you are right. I have added the name of the flag --enable-externs to the readme on the main page. I am still wondering about a solution, but so far did not find a way to easily test this feature. There is a -restrictions flag to lynx, which includes restricting externals. I haven't tested it yet, but it could be that it gives a useful error or output if one tries to restrict the feature which is not implemented (but I am doubtful). Also is your lynx compile error related with ncurses TERMINAL fixed pointers?
Strange bug...feel free to discuss with me here if so (which Linux distro, etc.); I would like to try to help. It's related to my project, so I am interested in workarounds etc. It used to be if your system didn't provide lynx (at all) I could show you how to compile from source. But that is difficult right now it seems. I found many posts about that issue on various distros but I am not sure the status. In Arch Linux I found it under lynx-current (compiled with externs). In Gentoo on my old system it just worked. Xubuntu was also working with the apt-get out-of-box version this week. I'm asking my work to install lynx in Scientific Linux now...let's see! Let me conclude by noting that this is actually two issues:
I remain interested in resolving both issues. |
I do have the access to APS journals in my institute. The commands and outputs:
The text was updated successfully, but these errors were encountered: