Fix for YggTorrent shitty URL management. Thanks to @xfouloux for this. Fixes #4504

This commit is contained in:
romain.lecat
2019-01-23 14:27:29 +01:00
parent 15049a4efb
commit 9bf9ec7029

View File

@@ -1,4 +1,4 @@
--- ---
site: yggtorrent site: yggtorrent
name: YGGtorrent name: YGGtorrent
description: "YGGTorrent is a FRENCH Semi-Private Torrent Tracker for 0DAY / GENERAL" description: "YGGTorrent is a FRENCH Semi-Private Torrent Tracker for 0DAY / GENERAL"
@@ -7,7 +7,7 @@
encoding: UTF-8 encoding: UTF-8
followredirect: true followredirect: true
links: links:
- https://www2.yggtorrent.gg/ - https://yggtorrent.gg/
legacylinks: legacylinks:
- https://yggtorrent.com/ - https://yggtorrent.com/
- https://ww1.yggtorrent.com/ - https://ww1.yggtorrent.com/
@@ -25,7 +25,6 @@
- https://ygg.to/ - https://ygg.to/
- https://www.ygg.to/ - https://www.ygg.to/
- https://ww3.yggtorrent.gg/ - https://ww3.yggtorrent.gg/
- https://www.yggtorrent.gg/
caps: caps:
categorymappings: categorymappings:
@@ -88,6 +87,10 @@
movie-search: [q] movie-search: [q]
settings: settings:
- name: searchanddlurl
label: Search and download URL
type: text
default: ww2.yggtorrent.gg
- name: username - name: username
type: text type: text
label: Username label: Username
@@ -147,12 +150,13 @@
- selector: "#login_msg_pass[style=\"\"][style] > center" - selector: "#login_msg_pass[style=\"\"][style] > center"
test: test:
path: / path: /
selector: a[href$="/user/logout"] selector: div#top_panel:contains("Déconnexion")
search: search:
followredirect: true
paths: paths:
- path: "/engine/search?category={{ .Config.category }}&name={{if .Config.enhancedAnime}}{{ re_replace .Keywords \"([\\.\\s\\[\\-])(\\d+)$\" \"$1e$2\" }}{{else}}{{ .Keywords }}{{end}}&description=&file=&uploader=&sub_category=&do=search&order=desc&sort=publish_date" - path: "https://{{ .Config.searchanddlurl }}/engine/search?category={{ .Config.category }}&name={{if .Config.enhancedAnime}}{{ re_replace .Keywords \"([\\.\\s\\[\\-])(\\d+)$\" \"$1e$2\" }}{{else}}{{ .Keywords }}{{end}}&description=&file=&uploader=&sub_category=&do=search&order=desc&sort=publish_date"
- path: "/engine/search?category={{ .Config.category }}&name={{if .Config.enhancedAnime}}{{ re_replace .Keywords \"([\\.\\s\\[\\-])(\\d+)$\" \"$1e$2\" }}{{else}}{{ .Keywords }}{{end}}&description=&file=&uploader=&sub_category=&do=search&order=desc&sort=publish_date&page=50" - path: "https://{{ .Config.searchanddlurl }}/engine/search?category={{ .Config.category }}&name={{if .Config.enhancedAnime}}{{ re_replace .Keywords \"([\\.\\s\\[\\-])(\\d+)$\" \"$1e$2\" }}{{else}}{{ .Keywords }}{{end}}&description=&file=&uploader=&sub_category=&do=search&order=desc&sort=publish_date&page=50"
rows: rows:
selector: "table.table > tbody > tr" selector: "table.table > tbody > tr"
@@ -249,7 +253,7 @@
selector: "td:nth-child(1) > a[href$=\"#comments\"]" selector: "td:nth-child(1) > a[href$=\"#comments\"]"
attribute: href attribute: href
download: download:
text: "/engine/download_torrent?id={{ .Result._id }}" text: "https://{{ .Config.searchanddlurl }}/engine/download_torrent?id={{ .Result._id }}"
date: date:
selector: "td:nth-child(5)" selector: "td:nth-child(5)"
filters: filters:
@@ -290,7 +294,7 @@
leechers: leechers:
text: 0 text: 0
leechers: leechers:
selector: "td:nth-child(*)" selector: "td:nth-child(9)"
optional: true optional: true
downloadvolumefactor: downloadvolumefactor:
text: "1" text: "1"