diff --git a/webcomix/comic.py b/webcomix/comic.py
index 54bb578..e135208 100644
--- a/webcomix/comic.py
+++ b/webcomix/comic.py
@@ -1,5 +1,6 @@
 import os
 from typing import List, Mapping
+from urllib.parse import urlparse
 from zipfile import ZipFile, BadZipFile
 
 import click
@@ -153,10 +154,13 @@ class Comic:
         if url.count(".") <= 1:
             # No file extension (only dot in url is domain name)
             return str(page)
-        elif title_present:
-            return "{}-{}{}".format(comic_name, page, url[url.rindex(".") :])
+
+        parsed_filepath = urlparse(url).path
+        file_extension = parsed_filepath[parsed_filepath.rindex(".") :]
+        if title_present:
+            return "{}-{}{}".format(comic_name, page, file_extension)
         else:
-            return "{}{}".format(page, url[url.rindex(".") :])
+            return "{}{}".format(page, file_extension)
 
     @staticmethod
     def save_alt_text_location(page: int, directory_name: str = "") -> str:
diff --git a/webcomix/supported_comics.py b/webcomix/supported_comics.py
index b4e76e7..8c62ded 100644
--- a/webcomix/supported_comics.py
+++ b/webcomix/supported_comics.py
@@ -75,4 +75,9 @@ supported_comics = {
         "//img[@class='comicnormal']/@src",
         "//a[img[contains(@src, 'next')]]/@href",
     ),
+    "SchlockMercenary": (
+        "https://www.schlockmercenary.com/2000-06-12",
+        "//div[@class='strip-images']//img/@src",
+        "//a[@class='next-strip']/@href",
+    ),
 }

Enhancement Schlock Mercenary 
Is it possible to add https://www.schlockmercenary.com/ to the list of supported comics?
diff --git a/webcomix/tests/test_comic.py b/webcomix/tests/test_comic.py
index f11a01c..7fdb46c 100644
--- a/webcomix/tests/test_comic.py
+++ b/webcomix/tests/test_comic.py
@@ -66,6 +66,12 @@ def test_save_image_location():
         == "foo/1.jpg"
     )
     assert Comic.save_image_location("", 1, "bar") == "bar/1"
+    assert (
+        Comic.save_image_location(
+            "http://imgs.xkcd.com/comics/barrel_cropped_(1).jpg?q=123", 1, "foo"
+        )
+        == "foo/1.jpg"
+    )
 
 
 def test_save_image_filename_with_title_present():

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest pytest-cov pytest-mock
apt-get update apt-get install -y gcc
3.9
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs==25.3.0
Automat==24.8.1
certifi==2025.1.31
cffi==1.17.1
cfgv==3.4.0
charset-normalizer==3.4.1
click==8.1.8
constantly==23.10.4
coverage==7.8.0
coveralls==4.0.1
cryptography==44.0.2
cssselect==1.3.0
defusedxml==0.7.1
distlib==0.3.9
docopt==0.6.2
exceptiongroup==1.2.2
fake-useragent==2.1.0
filelock==3.18.0
hyperlink==21.0.0
identify==2.6.9
idna==3.10
importlib_resources==6.5.2
incremental==24.7.2
iniconfig==2.1.0
itemadapter==0.11.0
itemloaders==1.3.2
jmespath==1.0.1
lxml==5.3.1
mypy==1.15.0
mypy-extensions==1.0.0
nodeenv==1.9.1
packaging==24.2
parsel==1.10.0
platformdirs==4.3.7
pluggy==1.5.0
pre_commit==4.2.0
Protego==0.4.0
pyasn1==0.6.1
pyasn1_modules==0.4.2
pycparser==2.22
PyDispatcher==2.0.7
pyOpenSSL==25.0.0
pytest==8.3.5
pytest-cov==2.5.1
pytest-mock==3.14.0
PyYAML==6.0.2
queuelib==1.8.0
requests==2.32.3
requests-file==2.1.0
Scrapy==2.12.0
scrapy-splash==0.11.1
service-identity==24.2.0
six==1.17.0
tldextract==5.1.3
tomli==2.2.1
tqdm==4.67.1
Twisted==24.11.0
typing_extensions==4.13.0
urllib3==2.3.0
virtualenv==20.29.3
w3lib==2.3.1
-e git+https://github.com/J-CPelletier/webcomix.git@9476ff995ba90d3b810c4f38e5337b868ca09c97#egg=webcomix
zipp==3.21.0
zope.interface==7.2

name: webcomix
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - attrs==25.3.0
      - automat==24.8.1
      - certifi==2025.1.31
      - cffi==1.17.1
      - cfgv==3.4.0
      - charset-normalizer==3.4.1
      - click==8.1.8
      - constantly==23.10.4
      - coverage==7.8.0
      - coveralls==4.0.1
      - cryptography==44.0.2
      - cssselect==1.3.0
      - defusedxml==0.7.1
      - distlib==0.3.9
      - docopt==0.6.2
      - exceptiongroup==1.2.2
      - fake-useragent==2.1.0
      - filelock==3.18.0
      - hyperlink==21.0.0
      - identify==2.6.9
      - idna==3.10
      - importlib-resources==6.5.2
      - incremental==24.7.2
      - iniconfig==2.1.0
      - itemadapter==0.11.0
      - itemloaders==1.3.2
      - jmespath==1.0.1
      - lxml==5.3.1
      - mypy==1.15.0
      - mypy-extensions==1.0.0
      - nodeenv==1.9.1
      - packaging==24.2
      - parsel==1.10.0
      - platformdirs==4.3.7
      - pluggy==1.5.0
      - pre-commit==4.2.0
      - protego==0.4.0
      - pyasn1==0.6.1
      - pyasn1-modules==0.4.2
      - pycparser==2.22
      - pydispatcher==2.0.7
      - pyopenssl==25.0.0
      - pytest==8.3.5
      - pytest-cov==2.5.1
      - pytest-mock==3.14.0
      - pyyaml==6.0.2
      - queuelib==1.8.0
      - requests==2.32.3
      - requests-file==2.1.0
      - scrapy==2.12.0
      - scrapy-splash==0.11.1
      - service-identity==24.2.0
      - six==1.17.0
      - tldextract==5.1.3
      - tomli==2.2.1
      - tqdm==4.67.1
      - twisted==24.11.0
      - typing-extensions==4.13.0
      - urllib3==2.3.0
      - virtualenv==20.29.3
      - w3lib==2.3.1
      - zipp==3.21.0
      - zope-interface==7.2
prefix: /opt/conda/envs/webcomix

webcomix/tests/test_comic.py::test_save_image_location
webcomix/tests/test_comic.py::test_download_saves_the_files webcomix/tests/test_comic.py::test_download_with_alt_text_saves_the_text webcomix/tests/test_comic.py::test_convert_to_cbz_adds_all_files_to_cbz webcomix/tests/test_comic.py::test_verify_xpath webcomix/tests/test_comic.py::test_verify_xpath_with_alt_text
webcomix/tests/test_comic.py::test_save_image_filename_with_title_present webcomix/tests/test_comic.py::test_make_cbz webcomix/tests/test_comic.py::test_make_cbz_corrupted_archive webcomix/tests/test_comic.py::test_download_runs_the_worker webcomix/tests/test_comic.py::test_download_does_not_add_crawlers_in_main_process webcomix/tests/test_comic.py::test_verify_xpath_only_verifies_one_page_with_single_page webcomix/tests/test_comic.py::test_download_will_run_javascript_settings_if_javascript webcomix/tests/test_comic.py::test_download_will_not_run_javascript_settings_if_not_javascript webcomix/tests/test_comic.py::test_verify_xpath_will_run_javascript_settings_if_javascript webcomix/tests/test_comic.py::test_verify_xpath_will_not_run_javascript_settings_if_not_javascript
webcomix/supported_comics.py webcomix/comic.py
webcomix/supported_comics.py webcomix/comic.py