ckreibich / scholar.py

A parser for Google Scholar, written in Python
2.11k stars 777 forks source link

It doesn't work #121

Open kirk86 opened 5 years ago

kirk86 commented 5 years ago

It seems that this script doesn't work as it returns not results what so ever. No matter what query I choose, I've tried all examples in the readme and it always shows no results.

hack-r commented 5 years ago

@kirk86 You'll probably need to provide detailed info. Details on your system, Python version, code, output if any, etc.

kirk86 commented 5 years ago

Details on your system, Python version, code, output if any,

OS X 10.14.4 python 3.7 usage: scholar.py -c 1 --author "albert einstein" --phrase "quantum theory" output: None

ishanSrt commented 5 years ago

I can confirm this

peterzjx commented 5 years ago

I've made my own fork fixing a couple of previously mentioned issues (bibtex citation and this. ) Also, the "no results" return is likely due to Google actively blocking bots by showing reCAPTCHAs. So always use a cookie file exported from your browser.

kirk86 commented 5 years ago

@peterzjx what kind of file and structure are we talking here? Can you provide an example? For instance if use a .txt file with the cookie value inside will that work?

peterzjx commented 5 years ago

@kirk86 Yes. I'm using a Chrome plugin called cookies.txt and just copy the content in a .txt file, refer the file in the program (--cookie_file in terminal, or ScholarConf.COOKIE_JAR_FILE in python) it works fine.

However, there are still very harsh limits on the number and frequency of queries. I was validating ~100 citations in google scholar by hand and it cut me off about 5 times. So even a couple of test runs may disable the function for a while.

kirk86 commented 5 years ago

@peterzjx thanks I'll give it a try, if you don't mind me asking have your changes been incorporated as PR in this repo?

peterzjx commented 5 years ago

@kirk86 It seems there has been no incorporation of PR for the past 2 years on this repo... and I haven't tested the previous suggestions to fix #102 (I didn't apply their patch yet but it seems working fine for me already) so there are gonna be some conflicts.