Created
November 20, 2013 02:55
-
-
Save elyase/7556900 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
l = [] | |
for th in d.items('.borderless td:nth-child(1)'): | |
left = th.text() | |
right = th.next().text() | |
tr = th.parent() | |
tbody = tr.parent() | |
title = tbody('th:first').text() # first element | |
if title == 'NUANS Reports & Preliminary Searches' and right in ['Active', 'Inactive']: | |
l.append([left, right]) | |
1 loops, best of 3: 199 ms per loop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment