From 8495247349da79acf01fbfcc0aacc1c0dd2d3e54 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 1 Jul 2022 23:48:05 +0200 Subject: Mangatown: use referer header to fix permission issue when downloading images --- README.md | 4 +++- plugins/mangatown.py | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f0b9a8b..a2ea121 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # AutoMedia -Automatically track new releases of media and download them. Currently works with rss for torrent sites (`nyaa.si`) and a for these manga sites: `manganelo.com`, `manganelos.com`, `mangatown.com`, `mangakakalot.com`, `mangakatana.com`, `lhtranslation.net`, `readm.org`, `mangaplus.shueisha.co.jp` and `mangadex.org`. +Automatically track new releases of media and download them. Currently works with rss for torrent sites (`nyaa.si`) and for these manga sites: `manganelo.com`, `manganelos.com`, `mangatown.com`, `mangakakalot.com`, `mangakatana.com`, `lhtranslation.net`, `readm.org`, `mangaplus.shueisha.co.jp` and `mangadex.org`. A notification is shown on the screen when a download finishes (if notify-send is installed). ## Installation @@ -14,6 +14,8 @@ It is recommended to create a new directory specifically for automedia sync, oth Run automedia without any options to see all options. If `$HOME/.config/automedia/download_finished.sh` exists then it's called when a download finishes. The first argument is either `html` or `rss` and the second argument is the full path to the rss file (anime episode video) or html directory (manga chapter). + +An easy way to track manga is to use [QuickMedia](https://git.dec05eba.com/QuickMedia/about/) and pressing `Ctrl+T` in any of the manga plugins when selecting a manga and chapter. # Requirements ## System curl, transmission-cli, notify-send (optional) diff --git a/plugins/mangatown.py b/plugins/mangatown.py index 29a58ab..fe000f9 100755 --- a/plugins/mangatown.py +++ b/plugins/mangatown.py @@ -9,7 +9,8 @@ import json from lxml import etree headers = { - 'User-Agent': "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36" + 'User-Agent': "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36", + 'Referer': "https://www.mangatown.com/" } def usage(): -- cgit v1.2.3