Why am I getting a slice index error when I try to run scholar.py?

Keywords: python github beautifulsoup google-scholar


I downloaded scholar.py from GitHub and I'm trying to run it from Terminal. Every time I use the example line from Github, I get this:

~/Desktop/scholar.py-master/scholar.py -c 1 --author "albert einstein" --phrase "quantum theory" Traceback (most recent call last): File "/Users/juliasterling/Desktop/scholar.py-master/scholar.py", line 1310, in sys.exit(main()) File "/Users/juliasterling/Desktop/scholar.py-master/scholar.py", line 1293, in main querier.send_query(query) File "/Users/juliasterling/Desktop/scholar.py-master/scholar.py", line 1027, in send_query self.parse(html) File "/Users/juliasterling/Desktop/scholar.py-master/scholar.py", line 1055, in parse parser.parse(html) File "/Users/juliasterling/Desktop/scholar.py-master/scholar.py", line 397, in parse self._parse_article(div) File "/Users/juliasterling/Desktop/scholar.py-master/scholar.py", line 571, in _parse_article if tag.find('div', {'class': 'gs_ttss'}): TypeError: slice indices must be integers or None or have an index method

I haven't edited the code or anything and I'm still new to BeautifulSoup so I don't know why this is happening.