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

--dateafter Not Working With PH #28173

Closed
seniorm0ment opened this issue Feb 15, 2021 · 1 comment
Closed

--dateafter Not Working With PH #28173

seniorm0ment opened this issue Feb 15, 2021 · 1 comment

Comments

@seniorm0ment
Copy link

Command: youtube-dl --add-metadata --embed-thumbnail -c --yes-playlist -v -i --dateafter now-10months "https://pornhub.com/pornstar/indigo-white/videos/"

It starts by grabbing all the pages, then says 1/304 videos, and starts downloading the videos from video 1.

Looked in the docs, didn't see any way to "grab all videos created after this link" so I can just link a video, then it grabs all videos made after that. Seems like it'd work more universal than relying on dateafter which seems like it might only work on some websites, unless I'm doing something wrong?

@dirkf
Copy link
Contributor

dirkf commented Oct 2, 2024

--dateafter ... works, or it does now, but each playlist video has to be extracted to find its upload_date and decide whether to download it.

(WIP version)

$ python -m youtube_dl -v --test -c --yes-playlist --dateafter 'now-2months' "https://pornhub.com/pornstar/savannah-bond/videos/"
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'--test', u'-c', u'--yes-playlist', u'--dateafter', u'now-2months', u'https://pornhub.com/pornstar/savannah-bond/videos/']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2021.12.17
[debug] Git HEAD: a4d4bbdb0
[debug] Python 2.7.15 (CPython i686 32bit) - Linux-6.1.0-25-686-pae-i686-with-debian-12.7 - OpenSSL 1.1.1a  20 Nov 2018 - glibc 2.1.3
[debug] exe versions: ffmpeg 5.1.6-0, ffprobe 5.1.6-0
[debug] Proxy map: {}
[download] Downloading playlist: pornstar/savannah-bond/videos
[PornHubPagedVideoList] pornstar/savannah-bond/videos: Downloading page 1
[PornHubPagedVideoList] pornstar/savannah-bond/videos: Downloading page 2
[PornHubPagedVideoList] pornstar/savannah-bond/videos: Downloading page 3
[PornHubPagedVideoList] pornstar/savannah-bond/videos: Downloading page 4
[PornHubPagedVideoList] pornstar/savannah-bond/videos: Downloading page 5
[PornHubPagedVideoList] pornstar/savannah-bond/videos: Downloading page 6
[PornHubPagedVideoList] pornstar/savannah-bond/videos: Downloading page 7
[PornHubPagedVideoList] pornstar/savannah-bond/videos: Downloading page 8
[PornHubPagedVideoList] playlist pornstar/savannah-bond/videos: Downloading 280 videos
[download] Downloading video 1 of 280
[PornHub] 669aee66b428c: Downloading webpage
[PornHub] 669aee66b428c: Downloading webpage
[PornHub] 669aee66b428c: Downloading pc webpage
[PornHub] 669aee66b428c: Downloading m3u8 information
[PornHub] 669aee66b428c: Downloading m3u8 information
[PornHub] 669aee66b428c: Downloading m3u8 information
[PornHub] 669aee66b428c: Downloading m3u8 information
[PornHub] 669aee66b428c: Downloading JSON metadata
[debug] Default format spec: bestvideo+bestaudio/best
[download] 2024-07-19 upload date is not in range 2024-08-03 - 9999-12-31
[download] Downloading video 2 of 280
...

In case a playlist is sorted so that the newest item is at one end, you can use the playlist index options to get the most recent items.

To get items more recent than a known video, you could use a shell/batch script with a tool like jq to extract the known video's upload_date from its Info-JSON (that you also saved) and passing that as the --dateafter parameter.

Also consider using the --download-archive ... feature.

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

No branches or pull requests

2 participants