LinkFinder icon indicating copy to clipboard operation
LinkFinder copied to clipboard

html.escape not found in python2

Open Bankde opened this issue 6 years ago • 5 comments
trafficstars

Error message:

Traceback (most recent call last):
  File "linkfinder.py", line 375, in <module>
    url = html.escape(endpoint["link"])
AttributeError: 'module' object has no attribute 'escape'

Last time I fixed this issue, it turns out that LinkFinder worked on my machine because I silently have "future" package installed. Any machine running python2 without that package will fail.

Thank you Vishal for reporting this to me.

Here is the point of this issue. Should I still fix it as python2 support ? Fixing it will take just few minutes but it will make the code bit messier and python2 will be deprecated in 4 months anyway.

@EdOverflow What is your opinion ?

Bankde avatar Aug 08 '19 15:08 Bankde

From Vishal opinion, he's ok with using python3 and agree that python2 won't be helpful soon. Also, most people might (or should start) use python3 now. If you agree with us both, we will just have to update readme to support only python3.

Bankde avatar Aug 08 '19 15:08 Bankde

Thank you for bringing this to my attention, @Bankde. I personally prefer sticking to Python 3 since Python 2 will retire soon. This does mean we should probably update the README.md file to make this clear to anyone using LinkFinder.

EdOverflow avatar Aug 08 '19 15:08 EdOverflow

Yes we should. Could you please update few lines ? In readme.txt LinkFinder supports Python 2 & 3.

In linkfinder.py Line 2: # Python 2.7.x - 3.6.x So I don't have to create PR.

I have noticed some messes that (possibly!?) come from supporting python2 such in Line 16-26. This might take some time to figure out what happens there so I will create PR later.

Thank you.

Bankde avatar Aug 08 '19 15:08 Bankde

Updated accordingly. Let me know if that works for you, @Bankde.

EdOverflow avatar Aug 08 '19 18:08 EdOverflow

They look good. Thanks.

Bankde avatar Aug 09 '19 08:08 Bankde