deibit / cansina

Web Content Discovery Tool
GNU General Public License v3.0
888 stars 237 forks source link

Full path error #26

Closed gwen001 closed 7 years ago

gwen001 commented 7 years ago

Hi,

With the option --full-path, the printer displays a wrong path, example:

http://www.example.com/ -> http://www.example.com/test_dir http://www.example.com/xxxx/ -> http://www.example.com/xxxx/xxxx/test_dir

The path segment of the full url is printed twice.

Fixed this way in core/printer.py line 119:

        # User wants to see full path
        if Console.show_full_path:
            t_encode = task.get_complete_target() 
        else:
            t_encode = target

        if sys.version_info[0] != 3:
            t_encode = t_encode.encode('utf-8')

Best regards,

Gwen

deibit commented 7 years ago

Thanks, fixed in https://github.com/deibit/cansina/commit/5a541ae8d2363982951977ed957ea7648f6d65ab