Deleted duplicate codes, calling new functions from old ones
New Tests for Function get_element_by_attribute() + get_elements_by_class() + get_elements_by_attribute() + Bug fixing of functions
Review as requested by dstftw
changes as requested
Checked with flake8
Since Python 3.6, invalid escape sequences are deprecated. It's likely
that there are invalid escape sequences somewhere on the webpage, so
instead of unescaping the whole webpage, just unescape the URL.
See https://bugs.python.org/issue27364. That change was designed for
string literals, while it affects the 'unicode_escape' encoding as well.
The code path is:
str.decode('unicode_escape')
codecs.unicode_escape_decode()
PyUnicode_DecodeUnicodeEscape()