Use comicapi for all urllib3 items
This commit is contained in:
parent
af059b8775
commit
c311b8e351
@ -33,6 +33,7 @@ from comicfn2dict import comicfn2dict
|
||||
import comicapi.data
|
||||
from comicapi import filenamelexer, filenameparser
|
||||
|
||||
from ._url import LocationParseError as LocationParseError # noqa: F401
|
||||
from ._url import Url as Url
|
||||
from ._url import parse_url as parse_url
|
||||
|
||||
|
@ -30,9 +30,7 @@ from typing import Any, Callable
|
||||
|
||||
import natsort
|
||||
import settngs
|
||||
import urllib3.util
|
||||
from PyQt5 import QtCore, QtGui, QtNetwork, QtWidgets, uic
|
||||
from urllib3.util.url import LocationParseError
|
||||
|
||||
import comictaggerlib.ui
|
||||
from comicapi import utils
|
||||
@ -1000,7 +998,7 @@ class TaggerWindow(QtWidgets.QMainWindow):
|
||||
md.scan_info = utils.xlate(self.leScanInfo.text())
|
||||
md.series_groups = utils.split(self.leSeriesGroup.text(), ",")
|
||||
md.alternate_series = self.leAltSeries.text()
|
||||
md.web_links = [urllib3.util.parse_url(self.leWebLink.item(i).text()) for i in range(self.leWebLink.count())]
|
||||
md.web_links = [utils.parse_url(self.leWebLink.item(i).text()) for i in range(self.leWebLink.count())]
|
||||
md.characters = set(utils.split(self.teCharacters.toPlainText(), "\n"))
|
||||
md.teams = set(utils.split(self.teTeams.toPlainText(), "\n"))
|
||||
md.locations = set(utils.split(self.teLocations.toPlainText(), "\n"))
|
||||
@ -1383,9 +1381,9 @@ class TaggerWindow(QtWidgets.QMainWindow):
|
||||
row = 0
|
||||
web_link = self.leWebLink.item(row).text()
|
||||
try:
|
||||
urllib3.util.parse_url(web_link)
|
||||
utils.parse_url(web_link)
|
||||
webbrowser.open_new_tab(web_link)
|
||||
except LocationParseError:
|
||||
except utils.LocationParseError:
|
||||
QtWidgets.QMessageBox.warning(self, "Web Link", "Web Link is invalid.")
|
||||
|
||||
def show_settings(self) -> None:
|
||||
|
@ -29,12 +29,11 @@ import requests
|
||||
import settngs
|
||||
from pyrate_limiter import Limiter, RequestRate
|
||||
from typing_extensions import Required, TypedDict
|
||||
from urllib3.exceptions import LocationParseError
|
||||
from urllib3.util import parse_url
|
||||
|
||||
from comicapi import utils
|
||||
from comicapi.genericmetadata import ComicSeries, GenericMetadata, TagOrigin
|
||||
from comicapi.issuestring import IssueString
|
||||
from comicapi.utils import LocationParseError, parse_url
|
||||
from comictalker import talker_utils
|
||||
from comictalker.comiccacher import ComicCacher, Issue, Series
|
||||
from comictalker.comictalker import ComicTalker, TalkerDataError, TalkerNetworkError
|
||||
|
Loading…
Reference in New Issue
Block a user