Skip to content
This repository has been archived by the owner on Mar 5, 2022. It is now read-only.

Commit

Permalink
Merge pull request #393 from amlatyrngom/master
Browse files Browse the repository at this point in the history
Fix html class of result nodes
  • Loading branch information
jarun authored Jan 21, 2021
2 parents 1617284 + faa6360 commit 10d945d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion googler
Original file line number Diff line number Diff line change
Expand Up @@ -2369,7 +2369,11 @@ class GoogleParser(object):
# Note that a filetype tag (e.g. PDF) is now pretty
# damn hard to parse with confidence (that it'll
# survive the slighest further change), so we don't.
title_node, details_node, *_ = div_g.select_all('div.rc > div')

# As of January 15th 2021, the html class is not rc anymore, it's tF2Cxc.
# This approach is not very resilient to changes by Google, but it works for now.
# title_node, details_node, *_ = div_g.select_all('div.rc > div')
title_node, details_node, *_ = div_g.select_all('div.tF2Cxc > div')
if 'yuRUbf' not in title_node.classes:
logger.debug('unexpected title node class(es): expected %r, got %r',
'yuRUbf', ' '.join(title_node.classes))
Expand Down

0 comments on commit 10d945d

Please sign in to comment.