In [1]: from bs4 import BeautifulSoupIn [2]: mystr = """${blogDetail.nextBlogPermalink}/">${blogDetail.nextBlogTitle|escape}"""In [3]: soup = BeautifulSoup(mystr)In [4]: print soup.find(attrs={"class":"pright thide"})${blogDetail.nextBlogPermalink}/">${blogDetail.nextBlogTitle|escape}
你这个在我这里是正确的。
如果解决了您的问题请采纳!如果未解决请继续追问!