CSS选择器不解析Python Webscrape中的任何内容

CSS选择器不解析Python Webscrape中的任何内容,python,css,web-scraping,Python,Css,Web Scraping,我正在尝试webscrape这个网站:使用Python和CSS选择器,但是我使用的CSS选择器在DOM树中找不到任何要解析的内容。我已经设法用网页垃圾处理工具和服(Kimono)把它擦掉了,它也使用CSS选择器,所以我知道它们是正确的。代码在下面,我使用的CSS选择器用于网站中每个表的第二列-body>table>tbody>tr>td:nth child(2)。我从中获取了CSS抓取代码 没有由浏览器添加的tbody,您需要body>table>tr>td:n子项(2): 随着这一变化: In

我正在尝试webscrape这个网站:使用Python和CSS选择器,但是我使用的CSS选择器在DOM树中找不到任何要解析的内容。我已经设法用网页垃圾处理工具和服(Kimono)把它擦掉了,它也使用CSS选择器,所以我知道它们是正确的。代码在下面,我使用的CSS选择器用于网站中每个表的第二列-body>table>tbody>tr>td:nth child(2)。我从中获取了CSS抓取代码


没有由浏览器添加的tbody,您需要
body>table>tr>td:n子项(2)

随着这一变化:

In [1]: import lxml.html   
In [2]: import requests

In [3]: r = requests.get('http://canoeracing.org.uk/marathon/results/burton2016.htm')

In [4]: tree = lxml.html.fromstring(r.text)

In [5]: results = tree.cssselect('body > table > tr > td:nth-child(2)')

In [6]: print results
[<Element td at 0x7f1cb1334100>, <Element td at 0x7f1cb1334260>, <Element td at 0x7f1cb13342b8>, <Element td at 0x7f1cb1334470>, <Element td at 0x7f1cb1334368>, <Element td at 0x7f1cb13344c8>, <Element td at 0x7f1cb1334578>, <Element td at 0x7f1cb1334628>, <Element td at 0x7f1cb1334aa0>, <Element td at 0x7f1cb1334788>, <Element td at 0x7f1cb13347e0>, <Element td at 0x7f1cb1334940>, <Element td at 0x7f1cb1334a48>, <Element td at 0x7f1cb1334af8>, <Element td at 0x7f1cb1328310>, <Element td at 0x7f1cb1328788>, <Element td at 0x7f1cb1328158>, <Element td at 0x7f1cb1328260>, <Element td at 0x7f1cb1328470>, <Element td at 0x7f1cb1328578>, <Element td at 0x7f1cb1328628>, <Element td at 0x7f1cb1328aa0>, <Element td at 0x7f1cb13288e8>, <Element td at 0x7f1cb1328940>, <Element td at 0x7f1cb1328a48>, <Element td at 0x7f1cb1328e10>, <Element td at 0x7f1cb1328c58>, <Element td at 0x7f1cb1328c00>, <Element td at 0x7f1cb1328db8>, <Element td at 0x7f1cb1328ec0>, <Element td at 0x7f1cb1328f70>, <Element td at 0x7f1cb1328af8>, <Element td at 0x7f1cb13282b8>, <Element td at 0x7f1cb1328cb0>, <Element td at 0x7f1cb132e100>, <Element td at 0x7f1cb132e0a8>, <Element td at 0x7f1cb132e368>, <Element td at 0x7f1cb132e680>, <Element td at 0x7f1cb1343730>, <Element td at 0x7f1cb1343680>, <Element td at 0x7f1cb1343628>, <Element td at 0x7f1cb13435d0>, <Element td at 0x7f1cb1343578>, <Element td at 0x7f1cb13434c8>, <Element td at 0x7f1cb1343470>, <Element td at 0x7f1cb13436d8>, <Element td at 0x7f1cb1343368>, <Element td at 0x7f1cb13432b8>, <Element td at 0x7f1cb1343158>, <Element td at 0x7f1cb13430a8>, <Element td at 0x7f1cb13433c0>, <Element td at 0x7f1cb1343788>, <Element td at 0x7f1cb13437e0>, <Element td at 0x7f1cb1343838>, <Element td at 0x7f1cb1343890>, <Element td at 0x7f1cb13438e8>, <Element td at 0x7f1cb1343940>, <Element td at 0x7f1cb1343998>, <Element td at 0x7f1cb13439f0>, <Element td at 0x7f1cb1343a48>, <Element td at 0x7f1cb1343aa0>, <Element td at 0x7f1cb1343af8>, <Element td at 0x7f1cb1343b50>, <Element td at 0x7f1cb1343ba8>, <Element td at 0x7f1cb1343c00>, <Element td at 0x7f1cb1343c58>, <Element td at 0x7f1cb1343cb0>, <Element td at 0x7f1cb1343d08>, <Element td at 0x7f1cb1343d60>, <Element td at 0x7f1cb1343db8>, <Element td at 0x7f1cb1343e10>, <Element td at 0x7f1cb1343e68>, <Element td at 0x7f1cb1343ec0>, <Element td at 0x7f1cb1343f18>, <Element td at 0x7f1cb1343f70>, <Element td at 0x7f1cb1343fc8>, <Element td at 0x7f1cb134b050>, <Element td at 0x7f1cb134b0a8>, <Element td at 0x7f1cb134b100>, <Element td at 0x7f1cb134b158>, <Element td at 0x7f1cb134b1b0>, <Element td at 0x7f1cb134b208>, <Element td at 0x7f1cb134b260>, <Element td at 0x7f1cb134b2b8>, <Element td at 0x7f1cb134b310>, <Element td at 0x7f1cb134b368>, <Element td at 0x7f1cb134b3c0>, <Element td at 0x7f1cb134b418>, <Element td at 0x7f1cb134b470>, <Element td at 0x7f1cb134b4c8>, <Element td at 0x7f1cb134b520>, <Element td at 0x7f1cb134b578>, <Element td at 0x7f1cb134b5d0>, <Element td at 0x7f1cb134b628>, <Element td at 0x7f1cb134b680>, <Element td at 0x7f1cb134b6d8>, <Element td at 0x7f1cb134b730>, <Element td at 0x7f1cb134b788>, <Element td at 0x7f1cb134b7e0>, <Element td at 0x7f1cb134b838>, <Element td at 0x7f1cb134b890>, <Element td at 0x7f1cb134b8e8>, <Element td at 0x7f1cb134b940>, <Element td at 0x7f1cb134b998>, <Element td at 0x7f1cb134b9f0>, <Element td at 0x7f1cb134ba48>, <Element td at 0x7f1cb134baa0>, <Element td at 0x7f1cb134baf8>, <Element td at 0x7f1cb134bb50>, <Element td at 0x7f1cb134bba8>, <Element td at 0x7f1cb134bc00>, <Element td at 0x7f1cb134bc58>, <Element td at 0x7f1cb134bcb0>, <Element td at 0x7f1cb134bd08>, <Element td at 0x7f1cb134bd60>, <Element td at 0x7f1cb134bdb8>, <Element td at 0x7f1cb134be10>, <Element td at 0x7f1cb134be68>, <Element td at 0x7f1cb134bec0>, <Element td at 0x7f1cb134bf18>, <Element td at 0x7f1cb134bf70>, <Element td at 0x7f1cb134bfc8>, <Element td at 0x7f1cb134c050>, <Element td at 0x7f1cb134c0a8>, <Element td at 0x7f1cb134c100>, <Element td at 0x7f1cb134c158>, <Element td at 0x7f1cb134c1b0>, <Element td at 0x7f1cb134c208>, <Element td at 0x7f1cb134c260>, <Element td at 0x7f1cb134c2b8>, <Element td at 0x7f1cb134c310>, <Element td at 0x7f1cb134c368>, <Element td at 0x7f1cb134c3c0>, <Element td at 0x7f1cb134c418>, <Element td at 0x7f1cb134c470>, <Element td at 0x7f1cb134c4c8>, <Element td at 0x7f1cb134c520>, <Element td at 0x7f1cb134c578>, <Element td at 0x7f1cb134c5d0>, <Element td at 0x7f1cb134c628>, <Element td at 0x7f1cb134c680>, <Element td at 0x7f1cb134c6d8>, <Element td at 0x7f1cb134c730>, <Element td at 0x7f1cb134c788>, <Element td at 0x7f1cb134c7e0>, <Element td at 0x7f1cb134c838>, <Element td at 0x7f1cb134c890>, <Element td at 0x7f1cb134c8e8>, <Element td at 0x7f1cb134c940>, <Element td at 0x7f1cb134c998>, <Element td at 0x7f1cb134c9f0>, <Element td at 0x7f1cb134ca48>, <Element td at 0x7f1cb134caa0>, <Element td at 0x7f1cb134caf8>, <Element td at 0x7f1cb134cb50>, <Element td at 0x7f1cb134cba8>, <Element td at 0x7f1cb134cc00>, <Element td at 0x7f1cb134cc58>, <Element td at 0x7f1cb134ccb0>, <Element td at 0x7f1cb134cd08>, <Element td at 0x7f1cb134cd60>, <Element td at 0x7f1cb134cdb8>, <Element td at 0x7f1cb134ce10>, <Element td at 0x7f1cb134ce68>, <Element td at 0x7f1cb134cec0>, <Element td at 0x7f1cb134cf18>, <Element td at 0x7f1cb134cf70>, <Element td at 0x7f1cb134cfc8>, <Element td at 0x7f1cb134d050>, <Element td at 0x7f1cb134d0a8>, <Element td at 0x7f1cb134d100>]

In [7]: match = results[0]

In [8]: print lxml.html.tostring(match)
<td>CONNOR PETERS</td>


In [9]: print match.get('href')
None

In [10]: print match.text
CONNOR PETERS

In [11]: data = [result.text for result in results]

In [12]: print(data)
['CONNOR PETERS', 'NICKY CRESSER', 'MARK WILKES', 'MATT PARKES', 'ALEX ABRAHAM', 'JOE FITZPATRICK', 'RICHARD ROGERS', 'DANNY BEAZLEY', 'JAMES SMYTHE', 'JAMIE CHRISTIE', 'JAMES HINVES', 'DAVID BELBIN', 'TOM DIAPER', 'PETER DEBOER', 'MARTIN RINVOLUCRI', 'LEE HOWSON', 'DAMON GRIMSEY', 'MATTHEW OLIVER', 'JOSHUA BEST', 'CHRIS CARTER', 'DUNCAN OUGHTON', 'HOWARD BLACKMAN', 'PATRICK MONGAN', 'JAMES DORAN', 'MICHAEL FITZSIMONS', 'SHUNA NEAVE', 'GUY PETERS', 'WILLIAM DOUGHTY', 'MICK NADAL', 'BILL LAWRENSON', 'MARK WEVILL', 'JOHN ASTBURY', 'JACOB HUBNER', 'SEB SHAW', 'TONY BATES', 'PETER MIETUS', 'CHRISTOPHER SKELLERN', 'GEORGE RANDALL', 'NEVILLE COLLEY', 'COLIN CHUDLEY', 'DAVE RICKETTS', 'LEWIS SMITH', 'ALASKA SIMPSON', 'DAVID CUDDINGTON', 'BEN BEDDARD', 'DAVID GLOVER', 'DEBORAH QUITTENTON', 'NEIL ORME', 'KASIA CHMIEL', 'RICHARD HUMPHREYS', 'MARCIN KRUCZYNSKI', 'IMRE KUCSKA', 'JOSHUA SMITH', 'DAVE HADLEY', 'LAURENCE FOWKES', 'AMELIA DINGLEY', 'MICHELLE BUTLER', 'LYNDA OUGHTON', 'LUCY GUEST', 'GARETH FERGUSSON', 'TOMASZ CHLIPALA', 'TONY SPENCER', 'KATIE BROOKES', 'HAYDYN COOKE-BAYLEY', 'DAVID WALTERS', 'STEPHEN KITSON', 'BEN ASTON', "ANGUS O'CONNOR", 'KEVIN LACK', 'MOLLY LEVER', 'MAX BEDDARD', 'CALLUM ADAIR', 'EMMA WILKINSON', 'DAVE CIANCHI', 'STEPHEN HALL', 'NAT KEMP', 'ANDREW LEGGATT', 'JACK ROUNSLEY', 'KATE MCMANUS', 'RICHARD MONGAN', 'LYNETTE SHAHMORADIAN', 'ALAN WILLIAMS', 'SIMON LEWIS', 'OLIVER 1 COOK', 'SARAH MILLEST', 'ALEXANDRA FARMER', 'RAY SIMMONS', 'CATHERINE CATON', 'KARL ZAREMBA', 'PHIL ROBERTS', 'CLAIRE COOPER', 'EMMA SMITHSON', 'HELEN RANDALL', 'SAM MARSH', 'LIAM NELSON', 'KATH NADAL', 'ADAM PRICE', 'AMANDA MYLETT', 'SAM DARLING', 'JULIA MIETUS', 'LINDSEY LACK', 'STEVE SAUNDERS', 'PHILL BURGESS', 'PENNY GLOVER', 'PETER KILLEY', 'EDWARD SHAW', 'JESS PROCTOR', 'JULIANNE WALTERS', 'JESSICA STEWART', 'KERRY CHRISTIE', 'ANDY COOK', 'LIAM HALL', 'KEITH NEWBOLD', 'JANET HICKMAN', 'ELLIOT COOPS', 'TEIFION ROGERS', 'JUSTIN ROE', 'ABBIE FISHER', 'EMMA CHRISTIE', 'ZARA MONTGOMERY', 'TESNI MILES', 'LEWIS ANDREWS', 'CONOR SIMMONS', 'IGGY ROGERS', 'MATTHEW COOK', 'ARCHIE LEVER', 'CHARLIE MAYNE', 'MCKENZIE MILES', 'LIBBY MAYNE', 'ROSS ORME', 'BRUCE BLACKMAN', 'STEPHEN BALL', 'SIMON RICKETTS', 'ALISON CHMIEL', 'PATRICK ALLINSON', 'PASCAL BAUER', 'MICHEAL WALTERS', 'JONATHAN CAVE', 'ANDREW NEVITT', 'MICK MORAN', 'STANI CHMIEL', 'MICHAEL FUDGER', 'LEE CHAMP', 'ROB KIRBY', 'KAY SPENCER', 'JANE MILLAR', 'THOMAS GILL', 'LOUISE CLIVE', 'BECKY FARMER', 'DAVID TARBUCK', 'OSCAR HUISSOON', 'ELLIE LAWLEY', 'ALLISON MILES', 'NICOLA RUDGE', 'EMMA CHRISTIE', 'LEWIS ANDREWS', '01:27:25.46', '01:34:13.50', '01:07:30.70', '01:12:06.66', '01:16:39.34', '00:33:38.65', '00:35:38.33', '00:37:39.45', '00:39:39.12', '01:02:58.03', '01:07:30.70', '01:12:06.66', '00:32:38.65', '00:35:38.33', '00:37:39.45']
[1]中的
:导入lxml.html
在[2]中:导入请求
在[3]中:r=requests.get('http://canoeracing.org.uk/marathon/results/burton2016.htm')
在[4]中:tree=lxml.html.fromstring(r.text)
在[5]中:results=tree.cssselect('body>table>tr>td:nth child(2)'
在[6]中:打印结果
[, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ]
在[7]中:匹配=结果[0]
在[8]中:打印lxml.html.tostring(匹配)
康纳·彼得斯
在[9]中:打印match.get('href')
没有一个
在[10]中:打印match.text
康纳·彼得斯
在[11]中:数据=[result.text代表结果输入结果]
In[12]:打印(数据)
['CONNOR PETERS','NICKY CRESSER','MARK WILKES','MATT PARKES','ALEX ABRAHAM','JOE FITZPATRICK','RICHARD ROGERS','DANNY BEAZLEY','JAMES SMYTHE','JAMIE CHRISTIE','JAMES Hinfes','DAVID BELBIN','TOM Dipper','PETER DEBOER','MARTIN RINVOLUCRI','LEE HOWSON','DAMON GRIMSEY','MATTHEW OLIVER','JOSHUA BEST','CHRIS CARTER',',霍华德·布莱克曼、帕特里克·蒙根、詹姆斯·多兰、迈克尔·菲茨西蒙斯、舒娜·尼夫、盖·彼得斯、威廉·多尔蒂、米克·纳达尔、比尔·劳伦森、马克·韦维尔、约翰·阿斯特伯里、雅各布·哈伯纳、塞布·肖、托尼·贝茨、彼得·密特斯、克里斯托弗·斯凯伦、乔治·兰德尔、内维尔·科利、科林·查德利、戴夫·里克茨、刘易斯·斯密特H、阿拉斯加州辛普森、大卫·库丁顿、本·贝达德、大卫·格洛弗、黛博拉·奎滕顿、尼尔·奥姆、卡西亚·奇米尔、理查德·汉弗莱斯、马辛·克鲁钦斯基、伊姆尔·库斯卡、约书亚·史密斯、戴夫·哈德利、劳伦斯·福克斯、阿米莉亚·丁利、米歇尔·巴特勒、林达·奥顿、露西·盖斯特、加雷斯·弗格斯、托马斯·克利帕拉、托尼·斯佩克“呃”,“凯蒂·布鲁克斯”,“海顿·库克·贝利”,“大卫·沃尔特斯”,“斯蒂芬·基特森”,“本·阿斯顿”,“安格斯·奥康纳”“凯文·莱克”、“莫莉·利弗”、“马克斯·贝达德”、“卡勒姆·阿代尔”、“艾玛·威尔金森”、“戴夫·齐安奇”、“斯蒂芬·霍尔”、“纳特·坎普”、“安德鲁·莱格特”、“杰克·鲁恩斯利”、“凯特·麦克马纳斯”、“理查德·蒙根”、“勒奈特·沙莫拉迪安”、“艾伦·威廉姆斯”、“西蒙·刘易斯”、“奥利弗一号厨师”、“萨拉·米勒斯特”、“亚历山德拉·法默”、“雷·西蒙斯”、“凯瑟琳·卡顿”、“卡尔·扎伦布”A、菲尔·罗伯茨、克莱尔·库珀、艾玛·史密森、海伦·兰德尔、萨姆·马什、利亚姆·纳尔逊、凯丝·纳达尔、亚当·普莱斯、阿曼达·梅利特、萨姆·达林、茱莉亚·米特斯、林赛·莱克、史蒂夫·桑德斯、菲尔·伯吉斯、佩妮·格洛弗、彼得·基利、爱德华·肖、杰西卡·普罗克托、朱丽安·沃尔特斯、杰西卡·斯图尔特、克里·克里斯蒂、安迪库克、利亚姆·霍尔、基思·纽伯德、珍妮特·希克曼、艾略特·库普斯、泰菲恩·罗杰斯、贾斯汀·罗伊、艾比·费舍尔、艾玛·克里斯蒂、扎拉·蒙哥马利、特斯尼·迈尔斯、刘易斯·安德鲁斯、康纳·西蒙斯、伊吉·罗杰斯、马修·库克、阿尔奇·勒夫、查理·梅恩、麦肯齐·迈尔斯、利比·梅恩、罗斯·奥姆、布鲁斯·布莱克曼、斯蒂芬·鲍尔、,“西蒙·里克茨”、“艾莉森·奇米尔”、“帕特里克·阿林森”、“帕斯卡·鲍尔”、“迈克尔·沃尔特斯”、“乔纳森·卡夫”、“安德鲁·内维特”、“米克·莫兰”、“斯坦尼·奇米尔”、“迈克尔·福杰”、“李·尚普”、“罗伯·柯比”、“凯·斯宾塞”、“简·米勒”、“托马斯·吉尔”、“路易斯·克莱夫”、“贝基·法默”、“大卫·塔巴克”、“奥斯卡·惠森”、“艾莉·劳利”、“艾莉森·迈尔斯”、“尼科”《拉鲁奇》、《艾玛·克里斯蒂》、《刘易斯·安德鲁斯》、《01:27:25.46》、《01:34:13.50》、《01:07:30.70》、《01:12:06.66》、《01:16:39.34》、《00:33:38.65》、《00:35:38.33》、《00:37:39.45》、《00:39:39.12》、《01:07:30.70》、《01:12:06.66》、《00:32:38.65》、《00:35:38.33》、《00:39.45》]
在第一个或我认为任何td中也没有href属性,因此不确定应该得到什么

In [1]: import lxml.html   
In [2]: import requests

In [3]: r = requests.get('http://canoeracing.org.uk/marathon/results/burton2016.htm')

In [4]: tree = lxml.html.fromstring(r.text)

In [5]: results = tree.cssselect('body > table > tr > td:nth-child(2)')

In [6]: print results
[<Element td at 0x7f1cb1334100>, <Element td at 0x7f1cb1334260>, <Element td at 0x7f1cb13342b8>, <Element td at 0x7f1cb1334470>, <Element td at 0x7f1cb1334368>, <Element td at 0x7f1cb13344c8>, <Element td at 0x7f1cb1334578>, <Element td at 0x7f1cb1334628>, <Element td at 0x7f1cb1334aa0>, <Element td at 0x7f1cb1334788>, <Element td at 0x7f1cb13347e0>, <Element td at 0x7f1cb1334940>, <Element td at 0x7f1cb1334a48>, <Element td at 0x7f1cb1334af8>, <Element td at 0x7f1cb1328310>, <Element td at 0x7f1cb1328788>, <Element td at 0x7f1cb1328158>, <Element td at 0x7f1cb1328260>, <Element td at 0x7f1cb1328470>, <Element td at 0x7f1cb1328578>, <Element td at 0x7f1cb1328628>, <Element td at 0x7f1cb1328aa0>, <Element td at 0x7f1cb13288e8>, <Element td at 0x7f1cb1328940>, <Element td at 0x7f1cb1328a48>, <Element td at 0x7f1cb1328e10>, <Element td at 0x7f1cb1328c58>, <Element td at 0x7f1cb1328c00>, <Element td at 0x7f1cb1328db8>, <Element td at 0x7f1cb1328ec0>, <Element td at 0x7f1cb1328f70>, <Element td at 0x7f1cb1328af8>, <Element td at 0x7f1cb13282b8>, <Element td at 0x7f1cb1328cb0>, <Element td at 0x7f1cb132e100>, <Element td at 0x7f1cb132e0a8>, <Element td at 0x7f1cb132e368>, <Element td at 0x7f1cb132e680>, <Element td at 0x7f1cb1343730>, <Element td at 0x7f1cb1343680>, <Element td at 0x7f1cb1343628>, <Element td at 0x7f1cb13435d0>, <Element td at 0x7f1cb1343578>, <Element td at 0x7f1cb13434c8>, <Element td at 0x7f1cb1343470>, <Element td at 0x7f1cb13436d8>, <Element td at 0x7f1cb1343368>, <Element td at 0x7f1cb13432b8>, <Element td at 0x7f1cb1343158>, <Element td at 0x7f1cb13430a8>, <Element td at 0x7f1cb13433c0>, <Element td at 0x7f1cb1343788>, <Element td at 0x7f1cb13437e0>, <Element td at 0x7f1cb1343838>, <Element td at 0x7f1cb1343890>, <Element td at 0x7f1cb13438e8>, <Element td at 0x7f1cb1343940>, <Element td at 0x7f1cb1343998>, <Element td at 0x7f1cb13439f0>, <Element td at 0x7f1cb1343a48>, <Element td at 0x7f1cb1343aa0>, <Element td at 0x7f1cb1343af8>, <Element td at 0x7f1cb1343b50>, <Element td at 0x7f1cb1343ba8>, <Element td at 0x7f1cb1343c00>, <Element td at 0x7f1cb1343c58>, <Element td at 0x7f1cb1343cb0>, <Element td at 0x7f1cb1343d08>, <Element td at 0x7f1cb1343d60>, <Element td at 0x7f1cb1343db8>, <Element td at 0x7f1cb1343e10>, <Element td at 0x7f1cb1343e68>, <Element td at 0x7f1cb1343ec0>, <Element td at 0x7f1cb1343f18>, <Element td at 0x7f1cb1343f70>, <Element td at 0x7f1cb1343fc8>, <Element td at 0x7f1cb134b050>, <Element td at 0x7f1cb134b0a8>, <Element td at 0x7f1cb134b100>, <Element td at 0x7f1cb134b158>, <Element td at 0x7f1cb134b1b0>, <Element td at 0x7f1cb134b208>, <Element td at 0x7f1cb134b260>, <Element td at 0x7f1cb134b2b8>, <Element td at 0x7f1cb134b310>, <Element td at 0x7f1cb134b368>, <Element td at 0x7f1cb134b3c0>, <Element td at 0x7f1cb134b418>, <Element td at 0x7f1cb134b470>, <Element td at 0x7f1cb134b4c8>, <Element td at 0x7f1cb134b520>, <Element td at 0x7f1cb134b578>, <Element td at 0x7f1cb134b5d0>, <Element td at 0x7f1cb134b628>, <Element td at 0x7f1cb134b680>, <Element td at 0x7f1cb134b6d8>, <Element td at 0x7f1cb134b730>, <Element td at 0x7f1cb134b788>, <Element td at 0x7f1cb134b7e0>, <Element td at 0x7f1cb134b838>, <Element td at 0x7f1cb134b890>, <Element td at 0x7f1cb134b8e8>, <Element td at 0x7f1cb134b940>, <Element td at 0x7f1cb134b998>, <Element td at 0x7f1cb134b9f0>, <Element td at 0x7f1cb134ba48>, <Element td at 0x7f1cb134baa0>, <Element td at 0x7f1cb134baf8>, <Element td at 0x7f1cb134bb50>, <Element td at 0x7f1cb134bba8>, <Element td at 0x7f1cb134bc00>, <Element td at 0x7f1cb134bc58>, <Element td at 0x7f1cb134bcb0>, <Element td at 0x7f1cb134bd08>, <Element td at 0x7f1cb134bd60>, <Element td at 0x7f1cb134bdb8>, <Element td at 0x7f1cb134be10>, <Element td at 0x7f1cb134be68>, <Element td at 0x7f1cb134bec0>, <Element td at 0x7f1cb134bf18>, <Element td at 0x7f1cb134bf70>, <Element td at 0x7f1cb134bfc8>, <Element td at 0x7f1cb134c050>, <Element td at 0x7f1cb134c0a8>, <Element td at 0x7f1cb134c100>, <Element td at 0x7f1cb134c158>, <Element td at 0x7f1cb134c1b0>, <Element td at 0x7f1cb134c208>, <Element td at 0x7f1cb134c260>, <Element td at 0x7f1cb134c2b8>, <Element td at 0x7f1cb134c310>, <Element td at 0x7f1cb134c368>, <Element td at 0x7f1cb134c3c0>, <Element td at 0x7f1cb134c418>, <Element td at 0x7f1cb134c470>, <Element td at 0x7f1cb134c4c8>, <Element td at 0x7f1cb134c520>, <Element td at 0x7f1cb134c578>, <Element td at 0x7f1cb134c5d0>, <Element td at 0x7f1cb134c628>, <Element td at 0x7f1cb134c680>, <Element td at 0x7f1cb134c6d8>, <Element td at 0x7f1cb134c730>, <Element td at 0x7f1cb134c788>, <Element td at 0x7f1cb134c7e0>, <Element td at 0x7f1cb134c838>, <Element td at 0x7f1cb134c890>, <Element td at 0x7f1cb134c8e8>, <Element td at 0x7f1cb134c940>, <Element td at 0x7f1cb134c998>, <Element td at 0x7f1cb134c9f0>, <Element td at 0x7f1cb134ca48>, <Element td at 0x7f1cb134caa0>, <Element td at 0x7f1cb134caf8>, <Element td at 0x7f1cb134cb50>, <Element td at 0x7f1cb134cba8>, <Element td at 0x7f1cb134cc00>, <Element td at 0x7f1cb134cc58>, <Element td at 0x7f1cb134ccb0>, <Element td at 0x7f1cb134cd08>, <Element td at 0x7f1cb134cd60>, <Element td at 0x7f1cb134cdb8>, <Element td at 0x7f1cb134ce10>, <Element td at 0x7f1cb134ce68>, <Element td at 0x7f1cb134cec0>, <Element td at 0x7f1cb134cf18>, <Element td at 0x7f1cb134cf70>, <Element td at 0x7f1cb134cfc8>, <Element td at 0x7f1cb134d050>, <Element td at 0x7f1cb134d0a8>, <Element td at 0x7f1cb134d100>]

In [7]: match = results[0]

In [8]: print lxml.html.tostring(match)
<td>CONNOR PETERS</td>


In [9]: print match.get('href')
None

In [10]: print match.text
CONNOR PETERS

In [11]: data = [result.text for result in results]

In [12]: print(data)
['CONNOR PETERS', 'NICKY CRESSER', 'MARK WILKES', 'MATT PARKES', 'ALEX ABRAHAM', 'JOE FITZPATRICK', 'RICHARD ROGERS', 'DANNY BEAZLEY', 'JAMES SMYTHE', 'JAMIE CHRISTIE', 'JAMES HINVES', 'DAVID BELBIN', 'TOM DIAPER', 'PETER DEBOER', 'MARTIN RINVOLUCRI', 'LEE HOWSON', 'DAMON GRIMSEY', 'MATTHEW OLIVER', 'JOSHUA BEST', 'CHRIS CARTER', 'DUNCAN OUGHTON', 'HOWARD BLACKMAN', 'PATRICK MONGAN', 'JAMES DORAN', 'MICHAEL FITZSIMONS', 'SHUNA NEAVE', 'GUY PETERS', 'WILLIAM DOUGHTY', 'MICK NADAL', 'BILL LAWRENSON', 'MARK WEVILL', 'JOHN ASTBURY', 'JACOB HUBNER', 'SEB SHAW', 'TONY BATES', 'PETER MIETUS', 'CHRISTOPHER SKELLERN', 'GEORGE RANDALL', 'NEVILLE COLLEY', 'COLIN CHUDLEY', 'DAVE RICKETTS', 'LEWIS SMITH', 'ALASKA SIMPSON', 'DAVID CUDDINGTON', 'BEN BEDDARD', 'DAVID GLOVER', 'DEBORAH QUITTENTON', 'NEIL ORME', 'KASIA CHMIEL', 'RICHARD HUMPHREYS', 'MARCIN KRUCZYNSKI', 'IMRE KUCSKA', 'JOSHUA SMITH', 'DAVE HADLEY', 'LAURENCE FOWKES', 'AMELIA DINGLEY', 'MICHELLE BUTLER', 'LYNDA OUGHTON', 'LUCY GUEST', 'GARETH FERGUSSON', 'TOMASZ CHLIPALA', 'TONY SPENCER', 'KATIE BROOKES', 'HAYDYN COOKE-BAYLEY', 'DAVID WALTERS', 'STEPHEN KITSON', 'BEN ASTON', "ANGUS O'CONNOR", 'KEVIN LACK', 'MOLLY LEVER', 'MAX BEDDARD', 'CALLUM ADAIR', 'EMMA WILKINSON', 'DAVE CIANCHI', 'STEPHEN HALL', 'NAT KEMP', 'ANDREW LEGGATT', 'JACK ROUNSLEY', 'KATE MCMANUS', 'RICHARD MONGAN', 'LYNETTE SHAHMORADIAN', 'ALAN WILLIAMS', 'SIMON LEWIS', 'OLIVER 1 COOK', 'SARAH MILLEST', 'ALEXANDRA FARMER', 'RAY SIMMONS', 'CATHERINE CATON', 'KARL ZAREMBA', 'PHIL ROBERTS', 'CLAIRE COOPER', 'EMMA SMITHSON', 'HELEN RANDALL', 'SAM MARSH', 'LIAM NELSON', 'KATH NADAL', 'ADAM PRICE', 'AMANDA MYLETT', 'SAM DARLING', 'JULIA MIETUS', 'LINDSEY LACK', 'STEVE SAUNDERS', 'PHILL BURGESS', 'PENNY GLOVER', 'PETER KILLEY', 'EDWARD SHAW', 'JESS PROCTOR', 'JULIANNE WALTERS', 'JESSICA STEWART', 'KERRY CHRISTIE', 'ANDY COOK', 'LIAM HALL', 'KEITH NEWBOLD', 'JANET HICKMAN', 'ELLIOT COOPS', 'TEIFION ROGERS', 'JUSTIN ROE', 'ABBIE FISHER', 'EMMA CHRISTIE', 'ZARA MONTGOMERY', 'TESNI MILES', 'LEWIS ANDREWS', 'CONOR SIMMONS', 'IGGY ROGERS', 'MATTHEW COOK', 'ARCHIE LEVER', 'CHARLIE MAYNE', 'MCKENZIE MILES', 'LIBBY MAYNE', 'ROSS ORME', 'BRUCE BLACKMAN', 'STEPHEN BALL', 'SIMON RICKETTS', 'ALISON CHMIEL', 'PATRICK ALLINSON', 'PASCAL BAUER', 'MICHEAL WALTERS', 'JONATHAN CAVE', 'ANDREW NEVITT', 'MICK MORAN', 'STANI CHMIEL', 'MICHAEL FUDGER', 'LEE CHAMP', 'ROB KIRBY', 'KAY SPENCER', 'JANE MILLAR', 'THOMAS GILL', 'LOUISE CLIVE', 'BECKY FARMER', 'DAVID TARBUCK', 'OSCAR HUISSOON', 'ELLIE LAWLEY', 'ALLISON MILES', 'NICOLA RUDGE', 'EMMA CHRISTIE', 'LEWIS ANDREWS', '01:27:25.46', '01:34:13.50', '01:07:30.70', '01:12:06.66', '01:16:39.34', '00:33:38.65', '00:35:38.33', '00:37:39.45', '00:39:39.12', '01:02:58.03', '01:07:30.70', '01:12:06.66', '00:32:38.65', '00:35:38.33', '00:37:39.45']