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 ixigua download failed #3001

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/you_get/extractors/ixigua.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def ixigua_download(url, output_dir='.', merge=True, info_only=False, stream_id=
_cookies.append(c.strip().split(' ')[0])
headers['cookie'] += ' '.join(_cookies)

match_txt = match1(html, r"<script id=\"SSR_HYDRATED_DATA\">window._SSR_HYDRATED_DATA=(.*?)<\/script>")
match_txt = match1(html, r"<script id=\"SSR_HYDRATED_DATA\" nonce=.*?>window._SSR_HYDRATED_DATA=(.*?)<\/script>")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It just works ! Thank you !

if not match_txt:
log.e("Get video info from url failed, url: {}".format(url))
return
Expand Down
6 changes: 5 additions & 1 deletion tests/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
soundcloud,
tiktok,
twitter,
miaopai
miaopai,
ixigua
)


Expand Down Expand Up @@ -65,6 +66,9 @@ def test_twitter(self):

def test_weibo(self):
miaopai.download('https://video.weibo.com/show?fid=1034:4825403706245135', info_only=True)

def test_ixigua(self):
ixigua.download('https://www.ixigua.com/7205081515355537957', info_only=True)

if __name__ == '__main__':
unittest.main()