From 79971745a28886ca283e87d93260f3ed8696b718 Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Thu, 11 Sep 2014 11:46:44 -0500 Subject: [PATCH] Fix for AO3 story list URLs that already have a '?' in them. --- fanficdownloader/geturls.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fanficdownloader/geturls.py b/fanficdownloader/geturls.py index ed567a1..67c37f6 100644 --- a/fanficdownloader/geturls.py +++ b/fanficdownloader/geturls.py @@ -43,7 +43,10 @@ def get_urls_from_page(url,configuration=None,normalize=False): if 'archiveofourown.org' in url: if adapter.getConfig("username"): if adapter.getConfig("is_adult"): - addurl = "?view_adult=true" + if '?' in url: + addurl = "&view_adult=true" + else: + addurl = "?view_adult=true" else: addurl="" # just to get an authenticity_token.