When using Beautiful Soup find_all() and looping over the results, I can't access the element.
<html>
...
<article post-id="123">Article 1</article>
<article post-id="456">Article 2</article>
<article post-id="789">Article 3</article>
...
</html>
articles = soup.find_all('article')
for a in articles:
post_id = a.find('article', {'post-id':True})
print(post_id)
returns None
Based on previous answers I've found on here, I thought the post-id value 123, 456, etc. could be accessed using post_id['post-id']
When I print a inside the for loop I see the <article...> element.
What is the correct way to access the post-id value?