jessicatysu/quora

AttributeError

Closed this issue · 1 comments

Greetings
when i executed that same code on my laptop using Lupyter,i got the following error-

AttributeError Traceback (most recent call last)
in
129 # form cycles)
130 excludedPages = filter(isInternalNode, getChildren("http://www.quora.com/directory"))
--> 131 excludedPages.append("http://www.quora.com")
132 excludedPages.append("http://www.quora.com#")
133 excludedPages.append("http://www.quora.com/")

AttributeError: 'filter' object has no attribute 'append'

Please can you help me resolve it? i tried to search about it on google,stackoverflow etc,but got wasnt able to resolve it

Thank you

I haven't looked into it, but it might be related to the behavior of the filter function in python2 vs. python3. In that case, the fix would be to either make this code python3 compatible, or run the code using python2. https://stackoverflow.com/questions/41666977/python-2-vs-python-3-difference-in-behavior-of-filter

Even so, the code hasn't been updated or run in 7 years, so it probably doesn't work anymore anyway. Quora may have changed their site design or their anti-scraping techniques may have become more robust or something.