utility class added
자료 저장 구조 고민중...
This commit is contained in:
@@ -5,26 +5,15 @@ from selenium.webdriver.support import expected_conditions as EC
|
||||
from selenium.common.exceptions import TimeoutException
|
||||
from bs4 import BeautifulSoup
|
||||
|
||||
|
||||
class MangaMetaInfo:
|
||||
def __init__(self, title, url, lang, manType, *tags):
|
||||
self.title = title
|
||||
self.url = url
|
||||
self.lang = lang
|
||||
self.manType = manType
|
||||
self.tags = tags
|
||||
pass
|
||||
|
||||
#series
|
||||
#type
|
||||
#languages
|
||||
#tags
|
||||
|
||||
import UtilPack as util
|
||||
|
||||
listResult = []
|
||||
|
||||
def GetSearchResult(searchWord):
|
||||
url = getSiteUrl() + searchWord
|
||||
url = getSiteUrl(searchWord)
|
||||
|
||||
util.DbgOut("Hitomi : " + url)
|
||||
|
||||
driver = webdriver.Chrome()
|
||||
driver.get(url)
|
||||
|
||||
@@ -34,7 +23,7 @@ def GetSearchResult(searchWord):
|
||||
EC.presence_of_element_located((By.CLASS_NAME, 'lillie'))
|
||||
)
|
||||
except TimeoutException:
|
||||
print("페이지가 로드되지 않았거나 요소를 찾을 수 없습니다.")
|
||||
util.DbgOut("페이지가 로드되지 않았거나 요소를 찾을 수 없습니다.")
|
||||
driver.quit()
|
||||
return
|
||||
|
||||
@@ -46,8 +35,11 @@ def GetSearchResult(searchWord):
|
||||
pass
|
||||
|
||||
#
|
||||
def getSiteUrl():
|
||||
strRet = "https://hitomi.la/search.html?"
|
||||
def getSiteUrl(searchWord):
|
||||
strRet = "https://hitomi.la/"
|
||||
|
||||
if False == util.IsEmptyStr(searchWord):
|
||||
strRet = strRet + "search.html?" + searchWord
|
||||
|
||||
return strRet
|
||||
|
||||
|
||||
Reference in New Issue
Block a user