Extract upload date for 1337x results#16
Open
anandghegde wants to merge 1 commit into
Open
Conversation
Parse the "Date uploaded" field from 1337x torrent detail pages and populate TorrentResult.added, matching the other sources. The detail page is already fetched to resolve the magnet, so no extra requests are made. Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
1337x search results were the only source missing the
added(upload date) field — every other source populates it, and the UI already renders an "Added" column / detail row when the data is present.This parses the Date uploaded field from the 1337x torrent detail page and populates
TorrentResult.added. The detail page is already fetched to resolve the magnet link, so this adds no extra network requests.Details
parseUploadDate()parses 1337x'sMon. Dayth 'YYformat (e.g.Jun. 26th '26) into a UTC unix timestamp (seconds), matching the convention used by other sources.detailMagnet→detailInfo, now returning both the magnet and the parsed date from the single detail-page fetch.Testing
src/sources/x1337.test.ts): date format, ordinal variants (1st/2nd/3rd/22nd), single-digit days, and missing/unparseable cases.tsc --noEmit: clean.x1337Movies.search("matrix")against live mirrors — 8/8 results returned correctly-parsed upload dates.