def open_url(self, sender): text = clipboard.get() try: verify_url(text) except: input = '' else: input = text url = console.input_alert('直接打开url', '', input) try: verify_url(url) except: console.hud_alert('URL错误', 'error') else: galleryview(url)
import os import sys from parse.exhentaiparser import CONFIGPATH, COOKIE_FILE from core.welcome import welcome from core.utility import get_latest_version if __name__ == '__main__': get_latest_version() if not os.path.exists(CONFIGPATH) or not os.path.exists(COOKIE_FILE): welcome() else: import conf.global_variables as glv from core.galleryview import galleryview from core.listview import listview glv.init() if len(sys.argv) > 1: gallery_url = sys.argv[1] galleryview(gallery_url) else: listview()
def open_gallery(self, sender): galleryview(self.url)