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

Fix douyin download failed. #3012

Closed
wants to merge 3 commits into from
Closed

Fix douyin download failed. #3012

wants to merge 3 commits into from

Conversation

savvym
Copy link

@savvym savvym commented Jun 29, 2023

Due to the old method and API being unable to download Douyin videos, a new method has been developed to download them.

befor fix:

# you-get 'https://v.douyin.com/iRfsLb5' -c douyin_cookies.txt
you-get: [error] oops, something went wrong.
you-get: don't panic, c'est la vie. please try the following steps:
you-get:   (1) Rule out any network problem.
you-get:   (2) Make sure you-get is up-to-date.
you-get:   (3) Check if the issue is already known, on
you-get:         https://github.com/soimort/you-get/wiki/Known-Bugs
you-get:         https://github.com/soimort/you-get/issues
you-get:   (4) Run the command with '--debug' option,
you-get:       and report this issue with the full output.

after:

# you-get 'https://v.douyin.com/iRfsLb5' -c douyin_cookies.txt
Site:       douyin.com
Title:      小小转一下 m0NESY 你们觉得今年会是top几呢?
#csgo #m0NESY #G2 #niko #m0nesy名场面
Type:       MPEG-4 video (video/mp4)
Size:       85.64 MiB (89801608 Bytes)

Downloading 小小转一下 m0NESY 你们觉得今年会是top几呢?
#csgo #m0NESY #G2 #niko #m0nesy名场面.mp4 ...
 100% ( 85.6/ 85.6MB) ├███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████┤[1/1]   17 MB/s

In addtion, when obtain Douyin cookies through Chrome extensions (such as Get Cookies.txt locally), I suggest modifying the expire time of __ac_nonce to be the same as that of __ac_signature. Otherwise, the cookies will expire quickly.

@soimort-bot
Copy link
Collaborator

Hello @savvym,
Thanks for the Pull Request. We ❤️ our contributors!
Please wait for one of our human maintainers to review your patches. This may take a few days to weeks. Also, please understand that although your Pull Request may or may not be eventually merged, we value all contributions equally.

祝您健康!

@HamiguaLu
Copy link

Due to the old method and API being unable to download Douyin videos, a new method has been developed to download them.

befor fix:

# you-get 'https://v.douyin.com/iRfsLb5' -c douyin_cookies.txt
you-get: [error] oops, something went wrong.
you-get: don't panic, c'est la vie. please try the following steps:
you-get:   (1) Rule out any network problem.
you-get:   (2) Make sure you-get is up-to-date.
you-get:   (3) Check if the issue is already known, on
you-get:         https://github.com/soimort/you-get/wiki/Known-Bugs
you-get:         https://github.com/soimort/you-get/issues
you-get:   (4) Run the command with '--debug' option,
you-get:       and report this issue with the full output.

after:

# you-get 'https://v.douyin.com/iRfsLb5' -c douyin_cookies.txt
Site:       douyin.com
Title:      小小转一下 m0NESY 你们觉得今年会是top几呢?
#csgo #m0NESY #G2 #niko #m0nesy名场面
Type:       MPEG-4 video (video/mp4)
Size:       85.64 MiB (89801608 Bytes)

Downloading 小小转一下 m0NESY 你们觉得今年会是top几呢?
#csgo #m0NESY #G2 #niko #m0nesy名场面.mp4 ...
 100% ( 85.6/ 85.6MB) ├███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████┤[1/1]   17 MB/s

Thanks very much, it works for me

@HamiguaLu
Copy link

By the way, is there any tools to export the cookies from chrome or firefox automaticallly? I know there are chrome extensions can do this but I want to get it from python or command line
Thanks in advance

@savvym
Copy link
Author

savvym commented Jul 7, 2023

@HamiguaLu I also use chrome extension to export. In addtion, when obtain Douyin cookies through Chrome extensions (such as Get Cookies.txt locally), I suggest modifying the expire time of __ac_nonce to be the same as that of __ac_signature. Otherwise, the cookies will expire quickly.

@HamiguaLu
Copy link

@HamiguaLu I also use chrome extension to export. In addtion, when obtain Douyin cookies through Chrome extensions (such as Get Cookies.txt locally), I suggest modifying the expire time of __ac_nonce to be the same as that of __ac_signature. Otherwise, the cookies will expire quickly.

Thanks very much for the hint,

@kongratana21
Copy link

Due to the old method and API being unable to download Douyin videos, a new method has been developed to download them.
befor fix:

# you-get 'https://v.douyin.com/iRfsLb5' -c douyin_cookies.txt
you-get: [error] oops, something went wrong.
you-get: don't panic, c'est la vie. please try the following steps:
you-get:   (1) Rule out any network problem.
you-get:   (2) Make sure you-get is up-to-date.
you-get:   (3) Check if the issue is already known, on
you-get:         https://github.com/soimort/you-get/wiki/Known-Bugs
you-get:         https://github.com/soimort/you-get/issues
you-get:   (4) Run the command with '--debug' option,
you-get:       and report this issue with the full output.

after:

# you-get 'https://v.douyin.com/iRfsLb5' -c douyin_cookies.txt
Site:       douyin.com
Title:      小小转一下 m0NESY 你们觉得今年会是top几呢?
#csgo #m0NESY #G2 #niko #m0nesy名场面
Type:       MPEG-4 video (video/mp4)
Size:       85.64 MiB (89801608 Bytes)

Downloading 小小转一下 m0NESY 你们觉得今年会是top几呢?
#csgo #m0NESY #G2 #niko #m0nesy名场面.mp4 ...
 100% ( 85.6/ 85.6MB) ├███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████┤[1/1]   17 MB/s

Thanks very much, it works for me

Hi sir. this you-get can download from kuaishou?

@kongratana21
Copy link

h for the hint,

hello sir, how to download from kuaishou?

@savvym savvym closed this Sep 3, 2023
@RallyQ
Copy link

RallyQ commented Sep 12, 2023

Use this [fix douyin.py] yesterday was normal download, today is not good, please check and confirm,thank you!
@savvym

@RallyQ
Copy link

RallyQ commented Sep 18, 2023

Did the you-get author give up? It hasn't been updated in almost a year

@54514382
Copy link

how to get douyin_cookies.txt ? thanks !

@54514382
Copy link

image douyin always failed , why ?

@savvym
Copy link
Author

savvym commented Oct 11, 2023

@54514382 Now douyin uses msToken and X-Bogus parameters to prevent web crawlers, which is currently quite troublesome.

@54514382
Copy link

@54514382 Now douyin uses msToken and X-Bogus parameters to prevent web crawlers, which is currently quite troublesome.

so, currently you-get not work for douyin, right ? thanks for your reply!

@RallyQ
Copy link

RallyQ commented Oct 17, 2023

@54514382 Now douyin uses msToken and X-Bogus parameters to prevent web crawlers, which is currently quite troublesome.

TikTokDownloader can be downloaded, I wonder if it is helpful
Still want to download douyin with you-get

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

Successfully merging this pull request may close these issues.

6 participants