summarylogtreecommitdiffstats
path: root/0001-ds-scanlators.patch
blob: 204904a2349d02c816ba9627f3ed19ecc8fe7c6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From 6793aed75f6d29f5b6fdcfd91d333b1a225f97dd Mon Sep 17 00:00:00 2001
From: Hamuko <hamuko@burakku.com>
Date: Wed, 9 Sep 2015 08:00:03 +0300
Subject: [PATCH] Handle DynastyScans chapters that have no scanlators.

---
 cum/scrapers/dynastyscans.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/cum/scrapers/dynastyscans.py b/cum/scrapers/dynastyscans.py
index 1e5c7a1..8d95392 100644
--- a/cum/scrapers/dynastyscans.py
+++ b/cum/scrapers/dynastyscans.py
@@ -74,7 +74,11 @@ class DynastyScansChapter(BaseChapter):
     def get_groups(self):
         r = requests.get(self.url)
         soup = BeautifulSoup(r.text, config.html_parser)
-        links = soup.find('span', class_='scanlators').find_all('a')
+        scanlators = soup.find('span', class_='scanlators')
+        if scanlators:
+            links = scanlators.find_all('a')
+        else:
+            links = []
         groups = []
         for link in links:
             r = requests.get(urljoin(self.url, link.get('href')))
-- 
2.5.2