79455131

Date: 2025-02-20 16:12:35
Score: 1.5
Natty:
Report link

According to the documentation, the first argument of the find_previous_sibling function can be a list.

Have you tried this ?

heading = div.find_previous_sibling(['h1', 'h2', 'h3', 'h4', 'h5', 'h6'])
Reasons:
  • Whitelisted phrase (-1): Have you tried
  • Low length (0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (0.5):
Posted by: Arthur Boucher