Advertisement
Guest User

Untitled

a guest
May 22nd, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 6.02 KB | None | 0 0
  1. ---
  2.   site: ilcorsaroblu
  3.   name: Il Corsaro Blu
  4.   description: "Il Corsaro Blu is an ITALIAN Public site for TV / MOVIES / GENERAL"
  5.   language: it-it
  6.   type: public
  7.   encoding: UTF-8
  8.   links:
  9.    - https://www.ilcorsaroblu.org/
  10.   legacylinks:
  11.    - https://ilcorsaroblu.org/
  12.     - http://ilcorsaroblu.org/
  13.  
  14.   caps:
  15.     categorymappings:
  16.      # Adult
  17.        - {id: 12, cat: XXX, desc: "Adult"}
  18.       # Applicazioni
  19.        - {id: 5, cat: PC/Phone-Android, desc: "Android"}
  20.       # Books
  21.        - {id: 6, cat: Books, desc: "Books"}
  22.       # Games
  23.        - {id: 3, cat: Other, desc: "Games"}
  24.       # Music
  25.        - {id: 2, cat: Audio, desc: "Music"}
  26.       # Movies
  27.        - {id: 17, cat: Movies/SD, desc: "Movie BDRip"}
  28.        - {id: 21, cat: Movies/Other, desc: "Movies - Films"}
  29.        - {id: 11, cat: Movies/DVD, desc: "DVD-R"}
  30.        - {id: 14, cat: Movies/HD, desc: "Movie 720p"}
  31.        - {id: 13, cat: Movies/HD, desc: "Movie 1080p"}
  32.        - {id: 15, cat: Movies/3D, desc: "Movie 3D"}
  33.        - {id: 24, cat: TV/OTHER, desc: "TV Show Standard"}
  34.        - {id: 19, cat: TV/HD, desc: "Tv Show 1080p"}
  35.        - {id: 20, cat: TV/HD, desc: "Tv Show 720"}
  36.       # Various
  37.        - {id: 4, cat: Other, desc: "Other"}
  38.        - {id: 7, cat: PC, desc: "Windows"}
  39.        - {id: 8, cat: Other, desc: "Linux"}
  40.        - {id: 9, cat: PC/Mac, desc: "Mac"}
  41.        - {id: 23, cat: Other, desc: "Archive"}
  42.  
  43.     modes:
  44.       search: [q]
  45.       tv-search: [q, season, ep]
  46.       movie-search: [q]
  47.  
  48.   search:
  49.     paths:
  50.       - path: /index.php
  51.     keywordsfilters:
  52.       - name: re_replace
  53.         args: ["S[0-9]{2}([^E]|$)", ""] # remove season tag without episode (search doesn't support it)
  54.       - name: diacritics
  55.         args: replace
  56.       # most ITA TV torrents are in XXxYY format, so we search without S/E prefixes and filter later
  57.       - name: re_replace
  58.         args: ["S0?(\\d{1,2})", " $1 "]
  59.       - name: re_replace
  60.         args: ["E(\\d{2,3})", " $1 "]
  61.     inputs:
  62.       search: "{{ .Keywords }}"
  63.       category: "{{range .Categories}}{{.}};{{end}}"
  64.       page: torrents
  65.       active: 0
  66.     rows:
  67.       selector: div.b-content > table > tbody > tr > td > table.lista > tbody > tr:has(a[onmouseover])
  68.     fields:
  69.       title:
  70.         selector: td:nth-child(2) > a
  71.         # normalize to SXXEYY format
  72.         filters:
  73.           - name: re_replace # replace special characters with " " (space)
  74.             args: ["[^a-zA-Z0-9]|\\.", " "]
  75.           # normalize to SXXEYY format
  76.           - name: re_replace
  77.             args: ["(\\d{2})x(\\d{2})", "S$1E$2"]
  78.           - name: re_replace
  79.             args: ["(\\d{1})x(\\d{2})", "S0$1E$2"]
  80.           - name: re_replace #Stagione X --> S0X
  81.             args: ["Stagione (\\d{0,1}\\s)", "S0$1"]
  82.           - name: re_replace #Stagione XX --> SXX
  83.             args: ["Stagione (\\d{2}\\s)", "S$1"]
  84.           - name: re_replace #/ Episodio [YY-YY --> EYY-YY
  85.             args: ["(\\s\\/\\sEpisodio|\\s\\/\\sEpisodi|\\sEpisodio|\\s\\|\\sEpisodio|\\sEpisodi)\\s\\[", "E"]
  86.           - name: re_replace #/ Completa [episodi  YY-YY --> EYY-YY
  87.             args: ["(\\s\\/\\sCompleta\\s\\[episodi\\s)", "E"]
  88.           - name: re_replace #remove  di YY] | remove /YY]
  89.             args: ["(\\sdi\\s\\d{1,2}|\\/\\d{1,2})\\]", " "]
  90.           - name: re_replace #remove various
  91.             args: ["(Serie completa|Completa|\\[in pausa\\])", ""]
  92.           # fine prova
  93.       download: # handle torrents with normal torrent file download
  94.         optional: true
  95.         selector: a[href^="download.php?id="]
  96.         attribute: href
  97.         filters:
  98.           - name: querystring
  99.             args: id
  100.           - name: toupper
  101.           - name: prepend
  102.             args: http://itorrents.org/torrent/
  103.           - name: append
  104.             args: ".torrent"
  105.       _magnetfilename: # convert title to valid magnet filename
  106.         text: "{{ .Result.title }}"
  107.         filters:
  108.           - name: validfilename
  109.           - name: urlencode
  110.       magnet: # generate magnet link from download link
  111.         optional: true
  112.         selector: a[href^="download.php?id="]
  113.         attribute: href
  114.         filters:
  115.           - name: querystring
  116.             args: id
  117.           - name: prepend
  118.             args: "magnet:?xt=urn:btih:"
  119.           - name: append
  120.             args: "&dn={{ .Result._magnetfilename }}.torrent"
  121.           - name: append # add some well known public trackers
  122.             args: "&tr=udp://tracker.openbittorrent.com:80/announce&tr=udp://tracker.opentrackr.org:1337/announce"
  123.       magnet: # in case a direct magnet link is provided use it
  124.         optional: true
  125.         selector: a[href^="magnet:?xt="]
  126.         attribute: href
  127.       category:
  128.         selector: a[href^="index.php?page=torrents&category="]
  129.         attribute: href
  130.         filters:
  131.           - name: querystring
  132.             args: category
  133.       details:
  134.         selector: td:nth-child(2) a
  135.         attribute: href
  136.       banner:
  137.         optional: true
  138.         selector: a[href^="index.php?page=torrent-details&id="][onmouseover]
  139.         attribute: onmouseover
  140.         filters:
  141.           - name: regexp
  142.             args: "src=(.+?) "
  143.       size:
  144.         selector: td:nth-child(9)
  145.       date:
  146.         selector: td:nth-child(5)
  147.         filters:
  148.           - name: dateparse
  149.             args: "02/01/2006"
  150.       grabs:
  151.         selector: td:nth-child(8)
  152.         filters:
  153.           - name: replace
  154.             args: ["---", "0"]
  155.       seeders:
  156.         selector: td:nth-child(6)
  157.       leechers:
  158.         selector: td:nth-child(7)
  159.       downloadvolumefactor:
  160.         case:
  161.           img[alt="Free Leech"]: "0"
  162.           img[alt="Gold 100% Free"]: "0"
  163.           img[alt="Silver 50% Free"]: "0.5"
  164.           img[alt="Bronze 25% Free"]: "0.75"
  165.           "*": "1"
  166.       uploadvolumefactor:
  167.         text: "1"
  168.       uploadvolumefactor:
  169.         optional: true
  170.         selector: img[alt$="x Upload Multiplier"]
  171.         attribute: alt
  172.         filters:
  173.           - name: replace
  174.             args: ["x Upload Multiplier", ""]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement