data = """
<p data-js="1, 2, 3">some text..</p><p data-js="5">some 1 text</p><p data-js="4"> some 2 text. </p>
"""
soup = BeautifulSoup(data)
print([elm['data-js'] for elm in soup.find_all(attrs={'data-js': True})])
Get attribute values by BeautifulSoup