import requests, re
def get_data():from selenium import webdriver
from selenium.webdriver.chrome.options importOptionsfrom bs4 importBeautifulSoup
options =Options()
options.add_argument("--headless")
options.add_argument('--disable-gpu')
options.add_argument('--no-sandbox')
options.add_argument('--log-level=3')
prefs ={"profile.default_content_setting_values":{"images":2,"plugins":2,"popups":2,"notifications":2,"media_stream":2,}}
options.add_experimental_option("prefs", prefs)
drive = webdriver.Chrome(options = options)
drive.get ("https://world-weather.info/")
html = drive.page_source
my_headers ={"user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36"}# the_response = requests.get( headers= my_headers)# if the_response.ok:
his_soup =BeautifulSoup(html,"html.parser")
resor = his_soup.find_all('div', id ="list")print(resor)
drive.quit()
get_data()
23040:25080:0916/112333.676:ERROR:gpu\command_buffer\service\gles2_cmd_decoder_passthrough.cc:1100] [GroupMarkerNotSet(crbug.com/242999)!:A0802B00545B0000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader (about:flags#enable-unsafe-swiftshader) flag to opt in to lower security guarantees for trusted content.
السؤال
Badi Explorer
23040:25080:0916/112333.676:ERROR:gpu\command_buffer\service\gles2_cmd_decoder_passthrough.cc:1100] [GroupMarkerNotSet(crbug.com/242999)!:A0802B00545B0000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader (about:flags#enable-unsafe-swiftshader) flag to opt in to lower security guarantees for trusted content.
تم التعديل في بواسطة Badi Explorer3 أجوبة على هذا السؤال
Recommended Posts
انضم إلى النقاش
يمكنك أن تنشر الآن وتسجل لاحقًا. إذا كان لديك حساب، فسجل الدخول الآن لتنشر باسم حسابك.