-
Notifications
You must be signed in to change notification settings - Fork 775
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
Added --citations-only option. It prints all the articles that cite the queried one #83
base: master
Are you sure you want to change the base?
Conversation
Did you notice it bugs if you change the citation format? It only outputs the first result. ./scholar.py --phrase "Online Clustering of Bandits" --citations-only --citation bt @inproceedings{kawale2015efficient,
title={Efficient Thompson Sampling for Online Matrix-Factorization Recommendation},
author={Kawale, Jaya and Bui, Hung H and Kveton, Branislav and Tran-Thanh, Long and Chawla, Sanjay},
booktitle={Advances in Neural Information Processing Systems},
pages={1297--1305},
year={2015}
}
} |
@daniel-severo I just included this feature following the main behavior of the tool (with only a minimal change in the code).
whilst if you specify the citation format
So unless i missed something, no, my feature didn't added a bug, it's just a preexisting behavior. Checking the code, I've found that the problem is present only when the settings are specified (like in the case of the citation format). Since it's a very easy fix, this may or may not be a bug in the main tool, it could be an intended behavior of the author. I've only tested it for biblatex format before incurring in the captcha limit. tl:dr it wasn't my fault. It might not be a bug. Fixed anyway. |
Thank you for this great modification, it sounds to do exactly what I am looking for. But unfortunately when I run the code after modifications to the parts you added and deleted I get the following error: self.per_page_results = 10 So I have not get the output yet and I would like to have a list of papers cited by an original paper in CSV format. I would be glad if you could help me. Thanks in advanced |
It should've been a typo, try it now and let me know. |
I am sorry it is not fixed yet, the error line is 1035 as shown below: runfile('C:/Users/NOVEMBER/Documents/src/PaperCrawler/.git/scholar.py', args='--citations-only -c 1 --author "albert einstein" --phrase "quantum theory"', wdir='C:/Users/NOVEMBER/Documents/src/PaperCrawler/.git') I added exactly the lines you added and deleted what you have deleted, and used the command line: --citations-only -c 1 --author "albert einstein" --phrase "quantum theory" Did I do something wrong? |
I have read a little bit about changing taps into 4 spaces in order to fix the previous error, and I changed the typo you told me about, but then I got another error in line 1035 as previously stated. Thank you for replying so fast, I appreciate it. |
What I want to do exactly is to get all the papers that cited the paper
"Novel properties of the Fourier decomposition of the sinogram"
and put the titles of those papers in CSV format. The command line you
worked on should do it, right? Or what should I do exactly in your opinion?
I apologize I am still new to these things and I would love to learn.
Thank you for time and consideration
…On Mon, Apr 17, 2017 at 3:25 PM, Luca Baronti ***@***.***> wrote:
It should've been a typo, try it now and let me know.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#83 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AXu1JJAG_FiPa5GWzVt9kRtmLl9gTi7Kks5rw2hLgaJpZM4MMDJg>
.
|
Your problem seems related to the different indentation styles used in different systems (mine is Unix, I assume you are using windows). Everything else should work as intended, let me know otherwise. On another note, I've just noticed that the current version is unable to download more than the first 10 citations. Now I've pushed a workaround that is able to fetch all the citations for a given paper. Also, it's been quite some time since last time I've touched that code, and I hadn't time to check every possible interactions, so let me know if you find some new issues. About your specific query, I've checked this command |
I fixed what you changed and fixed the taps and spaces problem now I am getting onlz this output: UserWarning: To exit: use 'exit', 'quit', or Ctrl-D. SystemExit: 0 I am using what is called Python interpreter, I only downloaded Winpython version 3.6 for Windows and opened the scholar.py from the shortcut Spyder that the Winpython provides, could you please tell me how do you usually run the code on your device, and what about the things people mention in other questions and comments about Beautifulsoup4 and Pip, I have no idea on how to run the code other than Spyder, please if you have some time tell me how you run it. Thanks in advanced. |
Hello again, |
The sys.exit(main()) was put there by the original author. It works well on my machine, however if that causes you troubles I think that you can safely replace it with main() as you did. |
Hello Mr. Baronti, Please tell me if you have any idea why this is happening, I am sure it is not because of the code, you did a great job, my question is like is it related to the google scholar itself or is there anything that I am not taking into consideration? Thank you for your time and consideration. |
It's possible that you made too many requests in a day and the server blocked them as result. Has been a while since last time I checked this project code, but I remember that I couldn't find a way to request all the citations at once. For this purpose, an user may be blocked server-side by its ip, their cookies, or both. You can try to mitigate the problem increasing the sleep time (search for sleep in the code) but keep in mind that since this is a server issue there are very few things we can do client-side to address it. |
It is mostly the reasons that I am thinking of, but since we can not fix this, how can I be sure that the server is blocking me, and that it is not another issue? Because I do not receive any warnings, it is just not giving any output as for the very first few times I tried the code. Is it possible to make a warning message when the server is drawn in request, or if the user is blocked? |
I'm currently using the original author's functions to query google scholar. |
@lucabaronti It would be fantastic if this could be merged. It's a very useful feature. |
@ivanperez-keera I'm glad you like it. You should ask the original author since he's the sole who can merge this pull request. |
I like the idea, but I have not been able to try it yet. Does it work with the latest version of scholar.py? |
As you can see from the date of my last comment, it has been a while since last time I tried it. |
Added an handy option to automatically retrieve the list of articles that cites the first article returned by the query.
For instance, if you want a list of articles that cite the first article returned by this query:
$ ./scholar.py -c 1 --author "albert einstein" --phrase "quantum theory"
use the --citations-only option
$ ./scholar.py --citations-only -c 1 --author "albert einstein" --phrase "quantum theory"
and it will print this: