I have one xpath and I need to use same logic in beautifulsoup
XPATH = .//li/a[@class="js-pagination"][text()!="Next"]
I need to write something like this
pg = soup.find_all('li').findNext('a',attrs={"class":"js-pagination:"})
I don't know what to do next help me to do it