Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _search_citation_soup(soup):
"""Generator that returns Author objects from the author search page"""
while True:
for row in soup.find_all('div', 'gsc_1usr'):
yield Author(row)
next_button = soup.find(class_='gs_btnPR gs_in_ib gs_btn_half gs_btn_lsb gs_btn_srt gsc_pgn_pnx')
if next_button and 'disabled' not in next_button.attrs:
url = next_button['onclick'][17:-1]
url = codecs.getdecoder("unicode_escape")(url)[0]
soup = _get_soup(_HOST+url)
else:
break