Skip to content

Instantly share code, notes, and snippets.

@scambra
Last active February 8, 2017 13:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scambra/287321c56c7c8fe57704dead4b12268c to your computer and use it in GitHub Desktop.
Save scambra/287321c56c7c8fe57704dead4b12268c to your computer and use it in GitHub Desktop.
definition for torrentz2 parsing html for cardigann
---
site: torrentz2-html
name: Torrentz2-html
language: en-us
links:
- https://torrentz2.eu/
caps:
categories:
"Video Tv": TV
"Video": Movies
"Video Movie HD": Movies/HD
modes:
search: [q]
tv-search: [q, season, ep]
search:
path: search
inputs:
f: "{{ .Query.Keywords }}"
rows:
selector: "html body #wrap .results dl"
fields:
title:
selector: dt a
download:
selector: dt a
attribute: href
category:
selector: dt
filters:
- name: regexp
args: "» (.*)"
date:
selector: dd span:nth-child(2)
filters:
- name: append
args: ' ago'
- name: timeago
size:
selector: dd span:nth-child(3)
seeders:
selector: dd span:nth-child(4)
leechers:
selector: dd span:nth-child(5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment