Git Product home page Git Product logo

Comments (8)

renyijiu avatar renyijiu commented on May 26, 2024

可以按照错误提示自己搜索下,如果代码有问题,欢迎提交你的解决方案

from douyin_downloader.

S1U avatar S1U commented on May 26, 2024

不知道对这个空 list 从何入手,请教下是哪方面可能有问题?

from douyin_downloader.

renyijiu avatar renyijiu commented on May 26, 2024

最简单的你直接重试运行,出错的话你可以看输出日志的最后一行提示搜索一下,应该请求网页数据出现了问题

from douyin_downloader.

eromoe avatar eromoe commented on May 26, 2024

Similar error here .

retry...
get empty list, {'cursor': 10, 'status_code': 0, 'has_more': 1, 'aweme_list': []}
retry...
get empty list, {'cursor': 10, 'status_code': 0, 'has_more': 1, 'aweme_list': []}
retry...
Traceback (most recent call last):
  File "douyin.py", line 574, in <module>
    CrawlerScheduler(content, favorite)
  File "douyin.py", line 370, in __init__
    self.scheduling(favorite)
  File "douyin.py", line 379, in scheduling
    self.download_user_videos(user_id, favorite)
  File "douyin.py", line 397, in download_user_videos
    self.push_download_job(uid, dytk, 0, favorite)
  File "douyin.py", line 408, in push_download_job
    list_json = get_list_by_uid(user_id, dytk, cursor, favorite)
  File "douyin.py", line 138, in get_list_by_uid
    r.html.render()
  File "/home/kasim/miniconda3/envs/douyin/lib/python3.6/site-packages/requests_html.py", line 598, in render
    content, result, page = self.session.loop.run_until_complete(self._async_render(url=self.url, script=script, sleep=sleep, wait=wait, content=self.html, reload=reload, scrolldown=scrolldown, timeout=timeout, keep_page=keep_page))
  File "/home/kasim/miniconda3/envs/douyin/lib/python3.6/asyncio/base_events.py", line 488, in run_until_complete
    return future.result()
  File "/home/kasim/miniconda3/envs/douyin/lib/python3.6/site-packages/requests_html.py", line 505, in _async_render
    page = await self.browser.newPage()
  File "/home/kasim/miniconda3/envs/douyin/lib/python3.6/site-packages/pyppeteer/browser.py", line 192, in newPage
    return await self._defaultContext.newPage()
  File "/home/kasim/miniconda3/envs/douyin/lib/python3.6/site-packages/pyppeteer/browser.py", line 329, in newPage
    return await self._browser._createPageInContext(self._id)
  File "/home/kasim/miniconda3/envs/douyin/lib/python3.6/site-packages/pyppeteer/browser.py", line 200, in _createPageInContext
    'Target.createTarget', options)).get('targetId')
pyppeteer.errors.NetworkError: Protocol error Target.createTarget: Target closed.

Sometimes got

Traceback (most recent call last):
  File "douyin.py", line 574, in <module>
    CrawlerScheduler(content, favorite)
  File "douyin.py", line 370, in __init__
    self.scheduling(favorite)
  File "douyin.py", line 379, in scheduling
    self.download_user_videos(user_id, favorite)
  File "douyin.py", line 396, in download_user_videos
    uid, dytk = get_user_info(user_id)
  File "douyin.py", line 78, in get_user_info
    uid = r.html.search('uid: "{uid}"')['uid']
TypeError: 'NoneType' object is not subscriptable

Sometimes

exit Thread!
exit Thread!
exit Thread!
exit Thread!
exit Thread!
exit Thread!
exit Thread!
exit Thread!
exit Thread!
exit Thread!
successful downloaded!

or

get empty list, {'status_code': 0, 'has_more': True, 'aweme_list': []}
retry...
get empty list, {'status_code': 0, 'has_more': True, 'aweme_list': []}
retry...
list data save success!
exit Thread!
exit Thread!
exit Thread!
exit Thread!
exit Thread!
exit Thread!
exit Thread!
exit Thread!
exit Thread!
exit Thread!
successful downloaded!

No video downloaded .

from douyin_downloader.

eromoe avatar eromoe commented on May 26, 2024

Found solution for pyppeteer.errors.NetworkError: Protocol error Target.createTarget: Target closed.

pip install websockets==6

@renyijiu assign in requirements.txt would be good .

So, the left problem is endless empty list ... I have no idea for now .

from douyin_downloader.

renyijiu avatar renyijiu commented on May 26, 2024

@eromoeIf you test and find that the code is working properly, welcome to submit your code. A new PR is great

from douyin_downloader.

eromoe avatar eromoe commented on May 26, 2024

image

Webpage is empty in chrome mobile mode , even empty in mobile browser . So there may be a special UA or something called signature you mention in other threads .
That is really hard , unless somebody inside tiktok can leak detail to us .

from douyin_downloader.

renyijiu avatar renyijiu commented on May 26, 2024

@eromoe Sorry, i have not tried. you may use the project to replace the signature and try download the video, if it works perfectly, welcome to sumbit your code to optimize this project

from douyin_downloader.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.