python - Find all links inside a table -


my html page has:

... <table class="t1" ..> <tr><td> ... <a href="">...</a> ... <a href="">..</a> </table>  ... 

i have:

html = beautifulsoup(page)  links = html.findall('a', ?????????) 

how can find links inside table?

find table (by class in case), find links within it.

html = beautifulsoup(page) table = html.find('table', 't1') links = table.findall('a') 

Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -