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
name: YGGtorrent
description: "YGGTorrent is a FRENCH Semi-Private Torrent Tracker for 0DAY / GENERAL"
@@ -7,7 +7,7 @@
encoding: UTF-8
followredirect: true
links:
- https://www2.yggtorrent.gg/
- https://yggtorrent.gg/
legacylinks:
- https://yggtorrent.com/
- https://ww1.yggtorrent.com/
@@ -25,7 +25,6 @@
- https://ygg.to/
- https://www.ygg.to/
- https://ww3.yggtorrent.gg/
- https://www.yggtorrent.gg/
caps:
categorymappings:
@@ -88,6 +87,10 @@
movie-search: [q]
settings:
- name: searchanddlurl
label: Search and download URL
type: text
default: ww2.yggtorrent.gg
- name: username
type: text
label: Username
@@ -147,12 +150,13 @@
- selector: "#login_msg_pass[style=\"\"][style] > center"
test:
path: /
selector: a[href$="/user/logout"]
selector: div#top_panel:contains("Déconnexion")
search:
followredirect: true
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: "/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"
- 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:
selector: "table.table > tbody > tr"
@@ -249,7 +253,7 @@
selector: "td:nth-child(1) > a[href$=\"#comments\"]"
attribute: href
download:
text: "/engine/download_torrent?id={{ .Result._id }}"
text: "https://{{ .Config.searchanddlurl }}/engine/download_torrent?id={{ .Result._id }}"
date:
selector: "td:nth-child(5)"
filters:
@@ -290,7 +294,7 @@
leechers:
text: 0
leechers:
selector: "td:nth-child(*)"
selector: "td:nth-child(9)"
optional: true
downloadvolumefactor:
text: "1"