---
id: ilcorsaroblu
name: Il Corsaro Blu
description: "il CorSaRo Blu is an ITALIAN Semi-Private site for TV / MOVIES / GENERAL"
language: it-IT
type: semi-private
encoding: UTF-8
links:
  - https://ilcorsaroblu.org/
legacylinks:
  - http://ilcorsaroblu.org/
  - https://www.ilcorsaroblu.info/
  - https://www.ilcorsaroblu.org/
  - https://ilcorsaroblu.online/

caps:
  categorymappings:
    # Adult
    - {id: 12, cat: XXX, desc: "Adult"}
    # Applicazioni
    - {id: 5, cat: PC/Mobile-Android, desc: "Android"}
    - {id: 30, cat: PC/Mobile-iOS, desc: "iOS / iPhone"}
    - {id: 7, cat: PC/0day, desc: "Windows"}
    - {id: 8, cat: PC, desc: "Linux"}
    - {id: 9, cat: PC/Mac, desc: "Mac"}
    - {id: 40, cat: PC, desc: "Emulatori"}
    - {id: 34, cat: PC, desc: "Student's Office"}
    # Books
    - {id: 6, cat: Books/EBook, desc: "Books"}
    - {id: 45, cat: Books/Comics, desc: "Fumetti"}
    - {id: 51, cat: Books/EBook, desc: "Pdf"}
    - {id: 33, cat: Books/EBook, desc: "Romanzi"}
    - {id: 26, cat: Books/Mags, desc: "Edicola: Giornali/Quotidiani"}
    # Games
    - {id: 3, cat: PC/Games, desc: "Games PC"}
    - {id: 27, cat: Console, desc: "Games Console"}
    - {id: 41, cat: Console/XBox, desc: "Games Xbox360"}
    - {id: 43, cat: Console, desc: "Games Retro"}
    - {id: 47, cat: Console/NDS, desc: "Games Nintendo"}
    # Music
    - {id: 2, cat: Audio, desc: "Music"}
    - {id: 48, cat: Audio/MP3, desc: "Music MP3"}
    - {id: 49, cat: Audio, desc: "Radio Trasmissioni"}
    # Movies
    - {id: 17, cat: Movies/HD, desc: "Movie BDRip"}
    - {id: 39, cat: Movies/HD, desc: "Movie BDRip TNT"}
    - {id: 21, cat: Movies/Other, desc: "Movie Films"}
    - {id: 11, cat: Movies/DVD, desc: "Movie DVD-R"}
    - {id: 14, cat: Movies/HD, desc: "Movie 720p"}
    - {id: 13, cat: Movies/HD, desc: "Movie 1080p"}
    - {id: 15, cat: Movies/3D, desc: "Movie 3D"}
    - {id: 25, cat: Movies/UHD, desc: "Movie UHD"}
    - {id: 36, cat: Movies, desc: "Movie TNT"}
    - {id: 24, cat: TV/SD, desc: "TV Show Standard"}
    - {id: 19, cat: TV/HD, desc: "TV Show 1080p"}
    - {id: 20, cat: TV/HD, desc: "TV Show 720"}
    - {id: 50, cat: TV, desc: "TV Show TNT"}
    - {id: 28, cat: TV/Anime, desc: "Anime"}
    - {id: 29, cat: TV, desc: "Cartoons"}
    - {id: 37, cat: TV/Sport, desc: "Sport"}
    - {id: 35, cat: TV/Documentary, desc: "Documentari"}
    - {id: 38, cat: Movies, desc: "Commedia"}
    - {id: 46, cat: Movies, desc: "Movie Parodie"}
    # Various
    - {id: 4, cat: Other, desc: "Other"}
    - {id: 23, cat: Other, desc: "Archive"}
    - {id: 42, cat: Other, desc: "Disegni e Modelli"}
    - {id: 16, cat: Other, desc: "V.I.P."}
    - {id: 32, cat: Other, desc: "Premium"}

  modes:
    search: [q]
    tv-search: [q, season, ep]
    movie-search: [q]
    music-search: [q]
    book-search: [q]

settings:
  - name: username
    type: text
    label: Username
  - name: password
    type: password
    label: Password
  - name: freeleech
    type: checkbox
    label: Filter freeleech only
    default: false
  - name: info_flaresolverr
    type: info_flaresolverr
  - name: sort
    type: select
    label: Sort requested from site
    default: 3
    options:
      3: created
      5: seeders
      4: size
      2: title
  - name: type
    type: select
    label: Order requested from site
    default: 2
    options:
      2: desc
      1: asc
  - name: info
    type: info
    label: Results Per Page
    default: For best results, change the <b>Torrents per page:</b> setting to <b>100</b> on your account profile.

login:
  path: index.php?page=login&returnto=index.php
  method: form
  form: form[name="login"]
  inputs:
    uid: "{{ .Config.username }}"
    pwd: "{{ .Config.password }}"
  error:
    - selector: span[style="color:#FF0000;"]
  test:
    path: index.php
    selector: a[href="logout.php"]

search:
  paths:
    - path: index.php
  keywordsfilters:
    - name: diacritics
      args: replace
    - name: re_replace # S01 to 1
      args: ["(?i)\\bS0*(\\d+)\\b", "$1"]
    - name: re_replace # S01E01 to 1 1
      args: ["(?i)\\bS0*(\\d+)E0*(\\d+)\\b", "$1 $2"]
  #  https://www.ilcorsaroblu.org/index.php?page=torrents&search=&category=0&options=0&active=0
  inputs:
    page: torrents
    search: "{{ .Keywords }}"
    category: "{{ if .Categories }}{{ range .Categories }}{{.}};{{end}}{{ else }}0{{ end }}"
    # 0 title, 1 title & descr, 2 descr, 3 uploaders, 5 gold, 6 silver, 7 bronze
    # note the options are exclusive, so searching for gold means the search keywords are ignored
    options: 0
    # 0 all, 1 activeonly, 2 deadonly
    active: 0
    order: "{{ .Config.sort }}"
    by: "{{ .Config.type }}"
    # does not support imdbid searches and does not return imdb link in results

  rows:
    selector: "div.b-content > table > tbody > tr > td > table.lista > tbody > tr:has(a[href^=\"index.php?page=torrents&category=\"]){{ if .Config.freeleech }}:has(img[src$=\"gold.gif\"]){{ else }}{{ end }}"
    filters:
      - name: andmatch

  fields:
    category:
      selector: a[href^="index.php?page=torrents&category="]
      attribute: href
      filters:
        - name: querystring
          args: category
    title:
      selector: td:nth-child(2) > a
      filters:
        - name: re_replace # replace special characters with " " (space)
          args: ["[\\[!\"#$%&'()*+,\\-.\\/:;<=>?@[\\]^_`{|}~]", " "]
        - name: diacritics
          args: replace
        - name: re_replace # replace multiple spaces
          args: ["[ ]{2,}", " "]
        # normalize to SXXEYY format
        - name: re_replace # S01 E01 to S01E01
          args: ["(?i)\\bS(\\d+)\\sE(\\d+)\\b", "S$1E$2"]
        - name: re_replace # 01x01 to S01E01
          args: ["(?i)(\\d{2})x(\\d+)", "S$1E$2"]
        - name: re_replace # 1x01 to S01E01
          args: ["(?i)\\b(\\d{1})x(\\d+)", "S0$1E$2"]
        - name: re_replace # Stagione X --> S0X
          args: ["(?i)\\bStagion[ei]\\s?(\\d{1})\\b|\\bSeason'?s?\\s?(\\d{1})\\b", "S0$1$2"]
        - name: re_replace # Stagione XX --> SXX
          args: ["(?i)\\bStagion[ei]\\s?(\\d{2,})\\b|\\bSeason'?s?\\s?(\\d{2,})\\b", "S$1$2"]
        - name: re_replace # Episodio 4 to E4
          args: ["(?i)\\b(?:[\\/\\|]?Episodio\\s?(\\d+)|Puntata\\s?(\\d+))", "E$1$2"]
        - name: re_replace # Episodi 4 5 to E04-05
          args: ["(?i)\\b(?:Puntate\\s*)(\\d+)\\s?(\\d+)", "E0$1-0$2"]
        - name: re_replace # rimozioni varie
          args: ["(?i)(Serie completa|Completat?a?|in pausa)", ""]
        # cleanup for Sonarr
        - name: re_replace # EP 3 4 to E3-4
          args: ["(?i)\\sEP\\s(\\d{1,2})\\s(E?\\s?\\d{1,2})\\s", " E$1-$2 "]
        - name: re_replace # S02E04 05 to S02E04-05
          args: ["(?i)\\sS(\\d{1,2})\\s?E\\s?(\\d{1,2})\\s(E?\\s?\\d{1,2})\\s", " S$1E$2-$3 "]
        - name: re_replace
          args: ["(?i)AC3\\s?(\\d)\\s(\\d)", "AC3 $1.$2"]
        - name: re_replace
          args: ["(?i) DD\\s?(\\d)\\s(\\d)", " DD $1.$2"]
        - name: re_replace
          args: ["(?i) DDP\\s?(\\d)\\s(\\d)", " DDP $1.$2"]
        - name: re_replace
          args: ["(?i)\\sE\\s?AC3", " EAC3"]
        - name: re_replace
          args: ["(?i)WEB\\sDL", "WEB-DL"]
        - name: re_replace
          args: ["(?i)HDTVRIP", "HDTV"]
    details:
      selector: td:nth-child(2) > a
      attribute: href
    download:
      optional: true
      selector: a[href^="download.php?id="]
      attribute: href
      filters:
        - name: querystring
          args: id
        - name: toupper
        - name: prepend
          args: http://itorrents.org/torrent/
        - name: append
          args: ".torrent"
    infohash:
      optional: true
      selector: a[href^="download.php?id="]
      attribute: href
      filters:
        - name: querystring
          args: id
    magnet:
      optional: true
      selector: a[href^="magnet:?xt="]
      attribute: href
    size:
      selector: td:nth-last-child(2)
    date_ago:
      selector: td:nth-last-child(7):contains('ago')
      # auto adjusted by site account profile
      optional: true
      filters:
        - name: timeago
    date_year:
      selector: td:nth-last-child(7):contains('/')
      # auto adjusted by site account profile
      optional: true
      filters:
        - name: dateparse
          args: "dd/MM/yyyy"
    date:
      text: "{{ if or .Result.date_ago .Result.date_year }}{{ or .Result.date_ago .Result.date_year }}{{ else }}now{{ end }}"
    grabs:
      selector: td:nth-last-child(4)
    seeders:
      selector: td:nth-last-child(6)
    leechers:
      selector: td:nth-last-child(5)
    downloadvolumefactor:
      case:
        img[src="images/gold.gif"]: 0
        img[src="images/silver.gif"]: 0.5
        img[src="images/bronze.gif"]: 0.75
        "*": 1
    uploadvolumefactor:
      text: 1
# minimumratio: appears to be ratioless
# xbtit
