Skip to content

Commit

Permalink
Merge pull request #214 from vn-ki/animehaven
Browse files Browse the repository at this point in the history
feat: add turkanime
  • Loading branch information
vn-ki committed Jul 17, 2019
2 parents 3907d76 + 0a0fb9c commit 1535c1e
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 13 deletions.
14 changes: 2 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,11 @@ Yeah. Me too! That's why this tool exists.
- AnimePahe
- Anistream
- Animeflv (Latin)
- Masterani.me [cloudlfare] (site shut down)

**Note:** To download from sites marked [cloudflare], anime-downloader has to be installed with cloudflare support (see below).
- Masterani.me [cloudlfare] (site shut down**

## Installation

You can install the stable release from PyPI:
```bash
$ pip install anime-downloader
```

To install the dev version:
```bash
$ pip install -U git+https://github.com/vn-ki/anime-downloader.git
```
[**Installation instructions***](https://github.com/vn-ki/anime-downloader/wiki/Installation)

If you have trouble installing, see extended installation instructions [here](https://github.com/vn-ki/anime-downloader/wiki/Installation) or join the [discord server](https://discord.gg/Qn2nWGm) for help.

Expand Down
2 changes: 2 additions & 0 deletions anime_downloader/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ def _read_config(self):
def _write_default_config(self):
if util.check_in_path('aria2c'):
DEFAULT_CONFIG['dl']['external_downloader'] = '{aria2}'
else:
raise("Aria2 is not in path. Please follow installation instructions: https://github.com/vn-ki/anime-downloader/wiki/Installation")
self._write_config(DEFAULT_CONFIG)


Expand Down
2 changes: 1 addition & 1 deletion anime_downloader/sites/anime.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Anime:
title = ''
meta = dict()
subclasses = {}
QUALITIES = []
QUALITIES = ['360p', '480p', '720p', '1080p']

@classmethod
def search(cls, query):
Expand Down
1 change: 1 addition & 0 deletions anime_downloader/sites/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
('animepahe', 'animepahe', 'AnimePahe'),
('anistream', 'anistream', 'Anistream'),
('animeflv', 'animeflv', 'Animeflv'),
('itsaturday', 'itsaturday', 'Itsaturday'),
]


Expand Down
32 changes: 32 additions & 0 deletions anime_downloader/sites/itsaturday.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
from anime_downloader.sites.anime import Anime, AnimeEpisode, SearchResult
from anime_downloader.sites import helpers

class Itsaturday(Anime, sitename='itsaturday'):
sitename = 'itsaturday'
DOMAIN = 'http://itsaturday.com'

@classmethod
def search(cls, query):
soup = helpers.soupify(helpers.get(f"{cls.DOMAIN}/search/", params={'q': query}))
results = [
SearchResult(title=t.text, url=cls.DOMAIN + t.attrs['href'], poster=t.img.attrs.get('data-src', None))
for t in soup.select('.preview > a')
]
return results

def _scrape_episodes(self):
soup = helpers.soupify(helpers.get(self.url))
ret = [
(t.text, self.DOMAIN + t.attrs['href'])
for t in soup.select('a.link-group-item')
]
return ret


class ItsaturdayEpisode(AnimeEpisode, sitename='itsaturday'):
def _get_sources(self):
return [
('no_extractor',
self._parent.DOMAIN + helpers.soupify(helpers.get(self.url)).select_one('source').attrs['src'])
]

0 comments on commit 1535c1e

Please sign in to comment.