BeautifulSoup4 support

Prefer version 4 but fallback to version 3