HoloArchivists / twspace-dl

A python module to download twitter spaces.
GNU General Public License v2.0
473 stars 78 forks source link

macOS issues #61

Open aboutmydreams opened 2 years ago

aboutmydreams commented 2 years ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce python3 ./twspace_dl/__main__.py -i https://twitter.com/i/spaces/1MYxNnkdkPPxw -v

Expected behavior begin to download the space audio.

Output If applicable, add the output of the command to help explain your problem.


2022-06-18 02:27:50,086 [DEBUG] Starting new HTTPS connection (1): api.twitter.com:443
2022-06-18 02:27:50,718 [DEBUG] https://api.twitter.com:443 "POST /1.1/guest/activate.json HTTP/1.1" 200 62
2022-06-18 02:27:50,727 [DEBUG] Starting new HTTPS connection (1): twitter.com:443
2022-06-18 02:27:51,452 [DEBUG] https://twitter.com:443 "POST /i/api/1.1/onboarding/task.json?flow_name=login HTTP/1.1" 200 246
2022-06-18 02:27:51,665 [DEBUG] https://twitter.com:443 "POST /i/api/1.1/onboarding/task.json HTTP/1.1" 200 786
2022-06-18 02:27:51,856 [DEBUG] https://twitter.com:443 "POST /i/api/1.1/onboarding/task.json HTTP/1.1" 400 76
Traceback (most recent call last):
  File "./twspace_dl/__main__.py", line 726, in login
    self.flow_token = request_flow.json()["flow_token"]
KeyError: 'flow_token'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "./twspace_dl/__main__.py", line 1009, in <module>
    main()
  File "./twspace_dl/__main__.py", line 1004, in main
    args.func(args)
  File "./twspace_dl/__main__.py", line 849, in space
    auth_token = Login(args.username, args.password,
  File "./twspace_dl/__main__.py", line 728, in login
    raise RuntimeError("Error identifying user:",
RuntimeError: ('Error identifying user:', {'errors': [{'code': 366, 'message': 'Missing data.'}]})

Desktop (please complete the following information):

Additional context when I use poetry or pip:

poetry run twspace-dl -i https://twitter.com/i/spaces/1MYxNnkdkPPxw

  FileNotFoundError

  [Errno 2] No such file or directory: b'/Users/diven/.rvm/bin/twspace-dl'

twspace-dl is not in command, so I run it in source code lib

Ryu1845 commented 2 years ago

I can't reproduce. You installed it using pip install twspace-dl, right?

aboutmydreams commented 2 years ago

I can't reproduce. You installed it using pip install twspace-dl, right?

Yes, command can't find twspace-dl after install

Ryu1845 commented 2 years ago

Try adding PATH=$PATH:~/Library/Python/3.8/bin to ~/.bashrc

aboutmydreams commented 2 years ago

Try adding PATH=$PATH:~/Library/Python/3.8/bin to ~/.bashrc

hi, I use the zsh in my macbook, and the python3 is in the path

Is .bashrc necessary for the command ?

Ryu1845 commented 2 years ago

I'm more worried the twspace-dl isn't in your PATH actually

Ryu1845 commented 2 years ago

Could you try python3 -m twspace-dl -h?

aboutmydreams commented 2 years ago

I'm more worried the twspace-dl isn't in your PATH actually

Yes, it is. If use pip install in MBP, and run twspace_dl -i xxx it will return command not found: twspace_dl

And when I fix the path problem, it will return api.twitter.com:443 as same as the issue content showed. I use the GUI in my friend's Windows 10 computer without login twiter account. here is same problem(api.twitter.com:443)

Ryu1845 commented 2 years ago

I have to say I don't have a clue of how you got the result you had with the command you entered. I'll add a help needed tag and let this open.