0

I try to find a link with the text "next >" like:

next = soup.find('a', href=True, text='next ›')
print next['href']

But with ">" I getting this error:

SyntaxError: Non-ASCII character '\x9b'

How to parse special characters?

Bellerofont
  • 1,081
  • 18
  • 17
  • 16
fteinz
  • 1,085
  • 5
  • 15
  • 30

0 Answers0