Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cookies should already be parsed and available when going through main #2

Closed
otongS opened this issue Sep 11, 2021 · 7 comments
Closed
Assignees

Comments

@otongS
Copy link

otongS commented Sep 11, 2021

Heya, trying to test this out and downloading playlist that are private, got this line error code.

Traceback (most recent call last): File "D:\p_pl_dl-main\p_pl_dl_main.py", line 88, in main dExtractors[sSite].run(sUrl, sCookieSource=None) # Cookies should already be parsed and available when going through main File "D:\p_pl_dl-main\p_pl_dl_xv.py", line 21, in run raise ConnectionError(f"403 Forbidden! Please check if cookies are required! Private videos/playlists cannot be accessed without cookies!") ConnectionError: 403 Forbidden! Please check if cookies are required! Private videos/playlists cannot be accessed without cookies!

I wonder what's wrong with the cookies.txt? I logged in the xvideos and used getcookies extension for chrome.

@ppldl ppldl self-assigned this Sep 12, 2021
@ppldl
Copy link
Owner

ppldl commented Sep 12, 2021

I'm not able to reproduce the problem.

If you were in incognito mode, can you try getting cookies using normal mode instead?

Is this the extension you used?
https://chrome.google.com/webstore/detail/get-cookiestxt/bgaddhkoddajcdgocldbbfleckgcbcid

Within the cookies text file it generates, there should be a session_token entry like so:

.xvideos.com TRUE / FALSE 1234567891 session_token 0a1b2c3d4e5f6g7h8i...

@otongS
Copy link
Author

otongS commented Sep 14, 2021

Yeah that's the one I used. I didnt use incognito when I try to download the cookie.

Yep it looks like that

image

Hmm cant seem to send file via github. I can send you the cookie txt for you to check, along with the URL to try.

@ppldl
Copy link
Owner

ppldl commented Sep 16, 2021

How are you passing in cookies? Your cookies file is "xvideos.com_cookies.txt", so the program call should be like:

python p_pl_dl_main.py.py -i "C:\MyFolder\urls.txt" -c "C:\MyCookieFolder\xvideos.com_cookies.txt" -d "F:\DownloadDestination"

It should also print all the cookies files it parses when the program starts. Do you see a message that says it is parsing "xvideos.com_cookies.txt"?

@otongS
Copy link
Author

otongS commented Sep 21, 2021

Ah, it's not parsing cookies at all.

C:\Users\Laptop>python D:\p_pl_dl-main\p_pl_dl_main.py -i "D:\p_pl_dl-main\url.txt" -c "D:\p_pl_dl-main\xvideos.com_cookies.txt" -d "D:\p_pl_dl-main\test"
Working download directory: D:\p_pl_dl-main\test
Cookies source: D:\p_pl_dl-main\xvideos.com_cookies.txt
Using the following input source: D:\p_pl_dl-main\url.txt
URL: https://www.xvideos.com/favorite/25818561/bjs
Detected websites:
{
"lewdthots": false,
"pornhub": false,
"porntrex": false,
"spankbang": false,
"xhamster": false,
"xvideos": true,
"youporn": false
}

Running xvideos extractor for https://www.xvideos.com/favorite/25818561/bjs

Initial connection status: 403

Traceback (most recent call last):
File "D:\p_pl_dl-main\p_pl_dl_main.py", line 88, in main
dExtractors[sSite].run(sUrl, sCookieSource=None) # Cookies should already be parsed and available when going through main
File "D:\p_pl_dl-main\p_pl_dl_xv.py", line 21, in run
raise ConnectionError(f"403 Forbidden! Please check if cookies are required! Private videos/playlists cannot be accessed without cookies!")
ConnectionError: 403 Forbidden! Please check if cookies are required! Private videos/playlists cannot be accessed without cookies!

The same if I use powershell. The one above is using command prompt

@ppldl
Copy link
Owner

ppldl commented Oct 3, 2021

Sorry, I am unable to reproduce this at all. A possible workaround is to make your xvideos playlist public so that a login is not required.

Going back to the cookies, below is what my xvideos cookies file looks like, which has differences compared against yours. The numbers after the TRUE/FALSE columns are all zero in mine, where as you have some number like 1632198587. You also have two extra rows for wpn_ad_cookie and last_subs_check. Last difference is that all of mine are TRUE/FALSE, whereas you have a TRUE/TRUE for your session_token.

Try editing your cookies to resemble mine, or generate them using a different method. I use Firefox with this extension: https://addons.mozilla.org/en-US/firefox/addon/cookies-txt/

image

@ppldl
Copy link
Owner

ppldl commented Nov 7, 2021

Closing due to lack of activity. Open a new issue if you have more info. :)

@ppldl ppldl closed this as completed Nov 7, 2021
@otongS
Copy link
Author

otongS commented Jan 11, 2022

yep sorry forgot to reply back, all set :)

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

No branches or pull requests

2 participants