samuel / python-scrubber

A whitelisting HTML sanitizer for Python
http://samuel.github.com/python-scrubber/
BSD 3-Clause "New" or "Revised" License
21 stars 8 forks source link

Python3 Support #4

Open brotatos opened 10 years ago

brotatos commented 10 years ago

I'm attempting to install scrubber via pip.

Downloading/unpacking scrubber (from -r requirements.txt (line 47))
  Downloading scrubber-1.6.1.tar.gz
  Running setup.py (path:/home/robin/github/ieee/venv/build/scrubber/setup.py) egg_info for package scrubber
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/home/robin/github/ieee/venv/build/scrubber/setup.py", line 13, in <module>
        from scrubber import __version__ as version
      File "/home/robin/github/ieee/venv/build/scrubber/scrubber/__init__.py", line 15, in <module>
        from urlparse import urljoin
    ImportError: No module named 'urlparse'
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/home/robin/github/ieee/venv/build/scrubber/setup.py", line 13, in <module>

    from scrubber import __version__ as version

  File "/home/robin/github/ieee/venv/build/scrubber/scrubber/__init__.py", line 15, in <module>

    from urlparse import urljoin

ImportError: No module named 'urlparse'

This error occurs because (in python3) urljoin is obtained via from urllib.parse import urljoin.

ptmono commented 8 years ago

I had same problem.

Fixed code is