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

This is a python scraper to read torrent files for metadata. #358

Merged
merged 2 commits into from
Feb 18, 2021

Conversation

Tweeticoats
Copy link
Contributor

This is a python scraper to read torrent files for metadata.
If the title field contains the filename of a file downloaded or a .torrent file.
It will look through the configured path for torrent files and see if there are metadata tags for description, tags etc.

This uses https://github.com/7sDream/torrent_parser under the MIT licence (included as torrent_parser.py)

If the title field contains the filename of a file downloaded or a .torrent file.
It will look through the configured path for torrent files and see if there are metadata tags for description, tags etc.

This uses https://github.com/7sDream/torrent_parser under the MIT licence (included as torrent_parser.py)
@bnkai
Copy link
Collaborator

bnkai commented Feb 4, 2021

I haven't tested yet is there though a specific reason you chose title over filename ? If i am not mistaken scene by fragment scrapers should have access to that.
yeah sorry not supported

@bnkai bnkai added the script Scraper executes a script label Feb 6, 2021
@bnkai
Copy link
Collaborator

bnkai commented Feb 7, 2021

It should be noted that this works for torrents from a specific tracker
Most torrents that i have available only have a comment section usually with a url (or a please seed text ) and a created by / creation date for metadata

@dLCarbonX
Copy link
Contributor

dLCarbonX commented Feb 9, 2021

How does this work exactly? I am getting errors when using in the UI.

I assume from CLI you're expecting python(3) torrent.py query < [filepath]

@Tweeticoats
Copy link
Contributor Author

Yes, you give it a json map with a title key with ether the name of a .torrent file or a filename and it will look through torrent files in the directory for the torrent that file came from.
echo '{"title":"test.torrent"}'| python3 torrent.py query

If there are comments, tags or other metadata it can return results but I need to add more error handling and have it return valid json to standard out when something goes wrong.

@bnkai
Copy link
Collaborator

bnkai commented Feb 18, 2021

Merging this. @Tweeticoats Feel free to make a new PR if you need to make any changes.

@bnkai bnkai merged commit b1f508a into stashapp:master Feb 18, 2021
jackchack pushed a commit to jackchack/CommunityScrapers that referenced this pull request Mar 5, 2022
litcum22 pushed a commit to litcum22/CommunityScrapers that referenced this pull request Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
script Scraper executes a script
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants