我使用以下PHP上传脚本上传图像并将其存储到目录中。
我现在希望脚本识别上传图片的类型,如果不是from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium import webdriver
import time
# Start the WebDriver and load the page
wd = webdriver.Firefox()
wd.get("https://www.leforem.be/particuliers/offres-emploi-recherche-par-criteres.html?exParfullText=&exPar_search_=true& exParGeographyEdi=true")
# Wait for the dynamically loaded elements to show up
time.sleep(5)
# And grab the page HTML source
html_page = wd.page_source
wd.quit()
# Now you can use html_page as you like
print(html_page)
,则脚本会自动将图片转换为JPEG 存储之前的格式>格式。
有人能告诉我如何实现这个目标吗?
image/jpeg
答案 0 :(得分:0)
将此放在move_uploaded_file之前。
(y2k38-now)/(60*1000)