Fix image handler

This commit is contained in:
Klaus-Uwe Mitterer 2016-08-07 17:39:42 +02:00
parent be09282609
commit 258a192b6a
2 changed files with 3 additions and 3 deletions

View file

@ -5,7 +5,7 @@ from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.common.exceptions import NoSuchElementException
import urllib.request, urllib.error, urllib.parse, time, os
import dbtools, setuptools
import dbtools, phototools, setuptools
currentRun = []
@ -86,7 +86,7 @@ def pageHandler(driver, db = dbtools.dbHelper()):
mid = messageID(data[2].find("a")["href"])
date = data[3].string
if not db.checkID(mid):
if mode == 1:
if mode == 0:
messageHandler(user, setuptools.user(), mid, date, driver, mode, db)
else:
messageHandler(setuptools.user(), user, mid, date, driver, mode, db)

View file

@ -36,7 +36,7 @@ def processURL(url, sender = False, geturls = False, verbose = False, shutup = F
except ValueError as e:
log("Notice: %s. Skipping." % e, shutup)
else:
if purl == urlparse(url):
if purl == url:
log("Warning: You may have copied the image URL rather than the link URL from the message window. Use the link URL instead!", shutup)
if geturls:
print(purl)