Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

make a dict from td scrape

headers = [header.text_content() for header in table.cssselect("thead tr th")]
results = [{headers[i]: cell.text_content() for i, cell in enumerate(row.cssselect("td"))} for row in table.cssselect("tbody tr")]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #dict #td #scrape
ADD COMMENT
Topic
Name
4+5 =