Skip to content

Commit

Permalink
fix(Some Madra Sites Use src Instead of data-src): 🐛
Browse files Browse the repository at this point in the history
  • Loading branch information
thezak48 committed Nov 23, 2023
1 parent a1284eb commit b4f2040
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions manga_dl/utilities/sites/madraNew.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,14 @@ def get_chapter_images(self, chapter_url):
nodes = soup.find_all("div", {"class": "reading-content"})
images = []

for node in nodes:
url = node.img["data-src"]
images.append(url)
try:
for node in nodes:
url = node.img["data-src"]
images.append(url)
except (TypeError, KeyError):
for node in nodes:
url = node.img["src"]
images.append(url)

return images

Expand Down

0 comments on commit b4f2040

Please sign in to comment.