Python beautifulsoup iterate over table?

You're starting at the top level of your document each time you use find() or find_all() so when you ask for, for example, all the "td"` tags you're getting all the "td" tags in the document not just those in the table and row you have searched for. You might as well not search for those because they're not being used the way your code is written.

The problem is that every time you're trying to narrow down your search (get the first td in this tr, etc) you're instead just calling back to soup. Soup is the top-level object -- it represents the entire document. You only need to call soup once, and then use the result of that in place of soup for the next step.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions