Skip to content
This repository has been archived by the owner on Apr 30, 2023. It is now read-only.

Traceback (most recent call last): — Authenticate, Login, _feed… dozen more #38

Open
JWhiteUX opened this issue Jul 3, 2022 · 5 comments

Comments

@JWhiteUX
Copy link

JWhiteUX commented Jul 3, 2022

Not sure if I borked something here, but I modified the requirements.txt to resolve the conflicts with urlib3 and requests

I'm able to run the script, but as soon as I enter the email prefix (e.g. lastfirst) The following output is presented

[*] Select a prefix for e-mail generation (auto,full,firstlast,firstmlast,flast,firstl,first.last,fmlast,lastfirst,first):
firstlast

Traceback (most recent call last):
  File "/Users/USERNAME/repos/LinkedInt/LinkedInt.py", line 335, in authenticate
    a = login()
  File "/Users/USERNAME/repos/LinkedInt/LinkedInt.py", line 55, in login
    p = BeautifulSoup(rv.content, "html.parser")
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/bs4/__init__.py", line 228, in __init__
    self._feed()
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/bs4/__init__.py", line 289, in _feed
    self.builder.feed(self.markup)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/bs4/builder/_htmlparser.py", line 215, in feed
    parser.feed(markup)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/html/parser.py", line 110, in feed
    self.goahead(0)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/html/parser.py", line 178, in goahead
    k = self.parse_html_declaration(i)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/html/parser.py", line 269, in parse_html_declaration
    self.handle_decl(rawdata[i+2:gtpos])
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/bs4/builder/_htmlparser.py", line 160, in handle_decl
    self.soup.endData(Doctype)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/bs4/__init__.py", line 365, in endData
    self.object_was_parsed(o)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/bs4/__init__.py", line 370, in object_was_parsed
    previous_element = most_recent_element or self._most_recent_element
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/bs4/element.py", line 1054, in __getattr__
    return self.find(tag)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/bs4/element.py", line 1292, in find
    l = self.find_all(name, attrs, recursive, text, 1, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/bs4/element.py", line 1313, in find_all
    return self._find_all(name, attrs, text, limit, generator, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/bs4/element.py", line 528, in _find_all
    strainer = SoupStrainer(name, attrs, text, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/bs4/element.py", line 1610, in __init__
    self.text = self._normalize_search_value(text)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/bs4/element.py", line 1615, in _normalize_search_value
    if (isinstance(value, str) or isinstance(value, collections.Callable) or hasattr(value, 'match')
AttributeError: module 'collections' has no attribute 'Callable'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/USERNAME/repos/LinkedInt/LinkedInt.py", line 450, in <module>
    cookies = authenticate()
  File "/Users/USERNAME/repos/LinkedInt/LinkedInt.py", line 342, in authenticate
    sys.exit("[!] Could not authenticate to linkedin. %s" % e)
NameError: name 'e' is not defined. Did you mean: 're'?
@bakedmuffinman
Copy link

I am getting something similiar

@misfun
Copy link

misfun commented Jul 20, 2022

Same here :(

@jianni20
Copy link

Found that this problem is related to BeautifulSoup and Python 3.10. Creating a venv using 3.9 solved the problem for me.

@MikJagger
Copy link

Had the same error, ran it succesfull with 'sudo python3.9 Linkedin.py' on a Kali 2022.3 version

@bmilliron67
Copy link

Python 3.9 is no longer included in Kali repos. The issue remains.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants