HoloArchivists / fc2-live-dl

Tool to download FC2 live streams
https://pypi.org/project/fc2-live-dl/
MIT License
113 stars 11 forks source link

Server disconnected: 4507 (Login required) #36

Open Soitora opened 1 year ago

Soitora commented 1 year ago

Hey

I checked the other two issues regarding this 4507 error, so I grabbed my cookies using [Get cookies.txt](https://chrome.google.com/webstore/detail/get-cookiestxt/bgaddhkoddajcdgocldbbfleckgcbcid

I named the cookies file "cookies.txt" and used --cookies "C:\Users\NAME\Videos\FC2\cookies.txt"

Using --log-level trace I could see that it correctly filled the orz with the cookies token, but it still went to "Using anonymous account" and then failing due to not being logged in

Not sure what parts of the trace logs I can share that isn't including sensitive information

hizkifw commented 1 year ago

I just tested using the latest version from git, login required streams still work. I'm using Firefox with this extension.

In your --log-level trace logs, you should see the following:

[main] Using options: {
  ...
  "cookies": "/path/to/your/fc2-cookies.txt",
  ...
} 

And also a

[fc2] Loading cookies from /path/to/your/fc2-cookies.txt

Your cookies.txt should also look something like this:

# Netscape HTTP Cookie File
# https://curl.haxx.se/rfc/cookie_spec.html
# This is a generated file! Do not edit.

live.fc2.com    FALSE   /   FALSE   1679835119  age_check   ...
#HttpOnly_.live.fc2.com TRUE    /   FALSE   0   PHPSESSID   ...
.fc2.com    TRUE    /   FALSE   1678104140  language    ...
#HttpOnly_.fc2.com  TRUE    /   TRUE    1680609789  __fc2id_rct ...
#HttpOnly_.fc2.com  TRUE    /   FALSE   1709553789  fgcv    ...
#HttpOnly_.fc2.com  TRUE    /   TRUE    1680696207  fcta    ...
#HttpOnly_.fc2.com  TRUE    /   FALSE   0   fcu ...
#HttpOnly_.fc2.com  TRUE    /   TRUE    0   fcus    ...
.fc2.com    TRUE    /   FALSE   1694088207  FC2_GDPR    ...
.live.fc2.com   TRUE    /   FALSE   0   lang    ...
live.fc2.com    FALSE   /   FALSE   1683374615  ab_test_logined_flg ...
.live.fc2.com   TRUE    /   FALSE   1678104251  LoginSession    ...
.fc2.com    TRUE    /   FALSE   1709554073  fclo    ...
live.fc2.com    FALSE   /   FALSE   1680610084  js-player_size  ...
Soitora commented 1 year ago

Terminal

❯ fc2-live-dl --cookies "C:\Users\NAME\Videos\FC2\cookies.txt" https://live.fc2.com/%ID
[main] fc2-live-dl v2.1.1
[fc2] Loading cookies from C:\Users\NAME\Videos\FC2\cookies.txt
[fc2 %ID] Fetching stream info
[fc2 %ID] Found websocket url
[fc2 %ID] Server disconnected: 4507 (Login required)

Trace

[main] Using options: {
  ...
  "cookies": "C:\\Users\\NAME\\Videos\\FC2\\cookies.txt",
  ...
}

This is what I get on Chrome/Opera/Firefox

# Netscape HTTP Cookie File
# https://curl.haxx.se/rfc/cookie_spec.html
# This is a generated file! Do not edit.

live.fc2.com    FALSE   /api    FALSE   ... l_ortkn ...
live.fc2.com    FALSE   /   FALSE   ... age_check   1
live.fc2.com    FALSE   /   FALSE   ... ab_test_logined_flg 1
live.fc2.com    FALSE   /   FALSE   ... top_filter_1_1_type 1
live.fc2.com    FALSE   /   FALSE   ... top_filter_1_1_fee  1
live.fc2.com    FALSE   /   FALSE   ... top_filter_1_1_view 2
live.fc2.com    FALSE   /   FALSE   ... top_filter_0_0_fee  1
live.fc2.com    FALSE   /   FALSE   ... top_filter_0_1_fee  1
live.fc2.com    FALSE   /   FALSE   ... js-player_size  1
.live.fc2.com   TRUE    /   FALSE       PHPSESSID   ...
live.fc2.com    FALSE   /   FALSE   ... _pk_ses.1.e2de  *
.live.fc2.com   TRUE    /   FALSE       lang    en
.live.fc2.com   TRUE    /   FALSE   ... LoginSession    ...
live.fc2.com    FALSE   /   FALSE   ... _pk_id.1.e2de   ...x...x...x...x...x