Skip to main content

Download videos from toutiao.com

Installation

python3 -m pip install toutiao-video

Usage

Use in CMD

toutiao --help

# download videos from user feed
toutiao feed -u xxxxx -t xxxxx
toutiao feed -u xxxxx -t xxxxx -O output
toutiao feed -u xxxxx -t xxxxx -l 5
toutiao feed -u xxxxx -t xxxxx -l 1 -d 1080p
toutiao feed -u xxxxx -t xxxxx -l 10 --dryrun

# download video from video url
toutiao video -t xxxxx <video_url>
toutiao video -t xxxxx <video_url> -d 1080p
toutiao video -t xxxxx <video_url> -d 1080p -O output
toutiao video -t xxxxx <video_url> -d 1080p -O output --dryrun

Use in Python

# download videos from user feed
from toutiao.core import TouTiao

toutiao = TouTiao(user_id='user_id', tt_webid='tt_webid')

for n, item in enumerate(toutiao.list_user_feed(), 1):
    if n > 5:
        break()
    print(item)       

# download video from video url
from toutiao.video import ToutiaoVideo
video = ToutiaoVideo(url='<your_video_url>', ttwid='<your_ttwid>')
initial_video = video.get_initial_video()
print(initial_video)
# video.download()

Help

  • tt-webid and ttwid you can get the value from Network > Request Headers > Cookie or Application > Cookies on your browser.

Metadata

Release files for toutiao-video 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for toutiao-video 1.0.1
File Size Uploaded
toutiao-video-1.0.1.tar.gz 5.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for toutiao-video 1.0.1
File Interpreter ABI Platform
toutiao_video-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 11.5 kB

Release files / toutiao-video-1.0.1.tar.gz

Download URL toutiao-video-1.0.1.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
9c6ef144af8425c28f3983c321e52e542a1f874ec65f51fd73d22d1301ef1d76
BLAKE2b-256 checksum
How to use checksums
fd7200ad1444cb491b89e999f1b042bdeff3edb32882dc07947e69f2137ee552
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.8

Release files / toutiao_video-1.0.1-py3-none-any.whl

Download URL toutiao_video-1.0.1-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fff3a3f53837278a8e5c1d0f4407191953f2d68cd8087c2c2dabcfdf394dc44a
BLAKE2b-256 checksum
How to use checksums
2457d066250f9c99d61b0aa450d3a93310d2ebaf306fdf95e141d1950e5f0be2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.8

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page