Skip to content

Instantly share code, notes, and snippets.

@elyase
Last active December 28, 2015 20:19
Show Gist options
  • Save elyase/7556908 to your computer and use it in GitHub Desktop.
Save elyase/7556908 to your computer and use it in GitHub Desktop.
row_gen = ( [td.text(), td.next().text()] # left, right element
for table in d('.borderless').items()
for td in table('td:nth-child(1)').items() # left column
if table('th:first').text() == 'NUANS Reports & Preliminary Searches' and
td.next().text() in ('Active', 'Inactive') )
10 loops, best of 3: 172 ms per loop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment