# -*- coding: utf-8 -*-12# Copyright 2014-2019 Mike Fährmann3#4# This program is free software; you can redistribute it and/or modify5# it under the terms of the GNU General Public License version 2 as6# published by the Free Software Foundation.78"""Downloader module for text: URLs"""910from .common import DownloaderBase111213class TextDownloader(DownloaderBase):14scheme = "text"1516def download(self, url, pathfmt):17if self.part:18pathfmt.part_enable(self.partdir)19self.out.start(pathfmt.path)20with pathfmt.open("wb") as fp:21fp.write(url.encode()[5:])22return True232425__downloader__ = TextDownloader262728