79206481

Date: 2024-11-20 09:14:40
Score: 1
Natty:
Report link
for element in soup.descendants:

means that you will iterate through all elements recursively. And text between brackets is children of "a" element, so it gets your paragraph twice. If you want to avoid this behavior, you could try to use

for element in soup.children:

instead

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Neverever