Open sreejithmangattil opened 7 years ago
Same issue for me!
Yo, I think this is the fix you're looking for. It took me ages to figure this out, and this is the first time I've ever written any code that someone else might use, so I'd be pretty chuffed if it helps.
import scholar querier = scholar.ScholarQuerier() settings = scholar.ScholarSettings() querier.apply_settings(settings) query = scholar.SearchScholarQuery()
def searchScholar(searchphrase): query.set_words(searchphrase) query.get_url() querier.send_query(query) print scholar.csv(querier)
searchScholar('Evaluating technologies for education')
What does this code have to do with scholar.py? Is it supposed to be inserted in it, or an entirely separate file?
This is for use in a seperate file in order to script scholar.py activity in other projects.
On 27 Nov 2017, at 01:52, Max Quirk notifications@github.com wrote:
What does this code have to do with scholar.py? Is it supposed to be inserted in it, or an entirely separate file?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
Which is the proper way to use code from within Python(instead of command line)? I tried with the following line of code, but its giving me an empty array.
import scholar querier = scholar.ScholarQuerier() settings = scholar.ScholarSettings() querier.apply_settings(settings)
def searchScholar(searchphrase): query = scholar.SearchScholarQuery() query.set_words(searchphrase) querier.send_query(query) print(len(querier.articles))
searchScholar('Evaluating technologies for education')