173만명의 커뮤니티!! 함께 토론해봐요.
미해결
실습으로 끝장내는 웹 크롤링과 웹 페이지 자동화 & 실전 활용
쓱닷컴 이벤트 주소는 아래와같습니다. https://shinsegaemall.ssg.com/event/eventMain.ssg?Sgnb=event 문제는 이벤트 페이지가 1, 2 이렇게 2개 존재합니다. 문제는 1 페이지를 클릭하던 2페이지를 클릭하던, 주소가 모두 같습니다. 1페이지 클릭시 -> https://shinsegaemall.ssg.com/event/eventMain.ssg?Sgnb=event 2페이지 클릭시-> https://shinsegaemall.ssg.com/event/eventMain.ssg?Sgnb=event 이럴때는 어떻게 해야하나요? 셀레니움이 답일까요?
python 웹-크롤링 selenium beautifulsoup
가후
2023-06-20T13:42:41.700Z
댓글 1
좋아요 0
조회수 317
미해결
따라하며 배우는 리액트 A-Z[19버전 반영]
안녕하세요. banner.js에서 질문이 있습니다 이 부분에서 왜 async await를 사용하셨는지 궁금합니다! const fetchData = async () => { // 현재 상영중인 영화 정보를 가져오기(여러 영화) const request = await axios.get(requests.fetchNowPlaying); // 여러 영화 중 영화 하나의 ID를 가져오기 const movieId = request.data.results[ Math.floor(Math.random() * request.data.results.length) ].id; // 특정 영화의 더 상세한 정보를 가져오기(비디오 정보도 포함) const { data : movieDetail } = await axios.get(`movie/${movieId}`, { params: {append_to_response: "videos"}, }); setMovie(movieDetail); }
react redux tdd typescript next.js 소프트웨어-테스트
puding0712
2023-06-20T07:42:35.813Z
댓글 1
좋아요 0
조회수 372
해결됨
[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)
안녕하세요, 강사님 지금 강의실에 보면 섹션8에 작업형3, 가설검정 콘텐츠 제작중입니다 라고 뜨고 섹션 10.에 5회 기출유형(작업형1) 강의가 업로드 되지 않았습니다. 계속 강의가 업데이트 중 인가요? 감사합니다.
python 머신러닝 빅데이터 pandas 빅데이터분석기사
2023-06-15T09:52:05.736Z
댓글 1
좋아요 0
조회수 320
해결됨
파이썬/장고로 웹채팅 서비스 만들기 (Feat. Channels) - 기본편
안녕하세요 로비 채팅 구현 강의를 들으면서 구현 중인데 redis 서버도 정상적으로 잘 작동하고 스크립트도 정확하게 썼는데 계속 채팅을 입력하고 엔터를 누르면 새로고침(초기화)이 되네요 ㅠㅠ 어떤게 문제일까요? 아무리 문제를 해결해봐도 이상한점은 찾아볼수가 없네요
python django django-channels
오창인
2023-06-12T16:27:28.476Z
댓글 1
좋아요 0
조회수 306
미해결
[자동화 완전 정복] 인스타그램 휴대폰, 웹 자동화 프로그램 개발
actions.key_down(Keys.CONTROL).send_keys('v').key_up(Keys.CONTROL).perform() # id_input.send_keys(data.id) time.sleep(5) pw_selector = "#loginForm > div > div:nth-child(2) > div > label > input" pw_input = driver.find_element(By.CSS_SELECTOR,pw_selector) pw_input.click() time.sleep(5) actions = ActionChains(driver) # ctrl + c 동작 pyperclip.copy(data.pw) # ctrl + v 동작 actions.key_down(Keys.CONTROL).send_keys('v').key_up(Keys.CONTROL).perform()
김기솔
2023-06-12T09:06:25.852Z
댓글 2
좋아요 1
조회수 342
미해결
[신규 개정판] 이것이 진짜 엑셀자동화다 - 기본편
좋은강의 감사드립니다. 덕분에 파이참설치했다가 Vscode로 갈아탔습니다. 다만 인터넷이 안되는 회사PC에서 업무자동화를 구현하려고 다양한 방법으로 pip install pyautogui를 설치하려고 해보았는데요 pip install pyautogui 를 실행하면 아래(이미지1)같이 뜨구요(아마 인터넷안되서 그런거아닌가 싶습니다만) 이미지1) 그래서 인터넷되는 피씨에서 pip install pyautogui 실행후 whl를 다운받아서 복사를 해놔도 import pyautogui가 실행이 되지는 않았구요 아래(이미지2)처럼 압축파일을 실행해도 작동하지는 않습니다. 이미지2 아래(이미지3)처럼 pip install 압축파일 을 실행해도 안되었습니다. 이미지2) 인터넷이 안되는곳에서 설치를 불가능한 것일까요?
intenet1
2023-06-12T05:56:12.485Z
댓글 2
좋아요 0
조회수 1282
미해결
파이썬/장고 웹서비스 개발 완벽 가이드 with 리액트
안녕하세요 api 인증키를 발급받기 위해 sendgrid를 가입하려고 하는데 가입이 되지 않아서 질문남깁니다!!
chlendyd7
2023-06-10T02:41:07.474Z
댓글 3
좋아요 1
조회수 1127
해결됨
실전 프로젝트로 배우는 데이터 앱 만들기 with Python & Streamlit
안녕하세요 강의자료에는 requirements.txt가 안보이는 것 같은데 혹시 어디서 다운받을 수 있을까요? 버전 충돌이 발생해서요ㅠ
이시현
2023-06-08T05:53:26.241Z
댓글 1
좋아요 0
조회수 476
미해결
파이썬 셀레니움 고급편 (python selenium - 크롤링, 크롤러)
User Agent Data 변경하는 법 강의에서 아래처럼 계속 오류가 생깁니다.. 코드는 동일하게 입력한 것 같은데.. 왜 그런 걸까요..? selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: Invalid parameters (Session info: chrome=114.0.5735.110) import requests from user_agents import parse from selenium import webdriver from selenium.webdriver.chrome.options import Options import chromedriver_autoinstaller import random, time, os chromedriver_autoinstaller.install() def make_user_agent(ua, is_mobile): user_agent = parse(ua) model = user_agent.device.model platform = user_agent.os.family platform_version = user_agent.os.version_string + ".0.0" # 모바일 기준이다 version = user_agent.browser.version[0] print('version: ', version) ua_full_version = user_agent.browser.version_string print('ua_full_version: ', ua_full_version) architecture = "x86" print(platform, ' platform') if is_mobile: platform_info = "Linux armv8l" else: # Window platform_info = "Win32" RET_USER_AGENT = { "appVersion" : ua.replace("Mozilla/", ""), "userAgent" : ua, "platform" : f"{platform_info}", "acceptLanguage": "ko-KR, kr, en-US, en", "userAgentMetadata": { "brands" : [ {'brand': 'Not.A/Brand', 'version': '8'}, {'brand': 'Chromium', 'version': '114'}, {'brand': 'Google Chrome', 'version':'114'} ], "fullVersion": f"{ua_full_version}", "platform" : platform, "platformVersion": platform_version, "architecture" : architecture, "model": model, "mobile": is_mobile } } return RET_USER_AGENT pc_device = ["1920,1440","1920,1200","1920,1080","1600,1200","1600,900", "1536,864", "1440,1080","1440,900","1360,768" ] mo_device = [ "360,640", "360,740", "375,667", "375,812", "412,732", "412,846", "412,869", "412,892", "412,915" ] width, height = random.choice(pc_device).split(",") UA = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36" options = Options() UA_Data = make_user_agent(UA, True) # 랜덤 쿠키 생성하기 # ** 1~100의 숫자 이름의 폴더 밑에 쿠키를 생성해서 저장한다 rand_user_folder = random.randrange(1, 100) userCookieDir = os.path.abspath(f"./cookies/{rand_user_folder }") if os.path.exists(userCookieDir) == False: print(userCookieDir, "폴더가 없어서 생성함") os.mkdir(userCookieDir) options.add_argument(f"user-data-dir={userCookieDir}") options.add_argument(f'--user-agent={UA}') options.add_argument(f'--window-size={width}, {height}') driver = webdriver.Chrome(options=options) driver.execute_cdp_cmd("Network.setUserAgentOverride", UA_Data) driver.get('https://google.com') driver.set_window_position(500, 500) input()
packet
2023-06-07T09:06:59.038Z
댓글 2
좋아요 1
조회수 2392
해결됨
따라하며 배우는 리액트 네이티브 기초
import {createBottomTabNavigator} from '@react-navigation/bottom-tabs'; import {createNativeStackNavigator} from '@react-navigation/native-stack'; import React from 'react'; import Home from './src/screens/Home'; import Search from './src/screens/Search'; import Profile from './src/screens/Profile'; import Activity from './src/screens/Activity'; import {NavigationContainer} from '@react-navigation/native'; import Status from './src/screens/Status'; import FriendProfile from './src/screens/FriendProfile'; import EditProfile from './src/screens/EditProfile'; const App = () => { const Stack = createNativeStackNavigator(); const Tab = createBottomTabNavigator(); const BottomTabScreen = () => { return ( <Tab.Navigator screenOptions={() => ({ tabBarHideOnKeyboard: true, // tabBarShowLabel: false, headerShown: false, tabBarStyle: { height: 70, }, })}> <Tab.Screen name="Home" component={Home} /> <Tab.Screen name="Search" component={Search} /> <Tab.Screen name="Activity" component={Activity} /> <Tab.Screen name="Profile" component={Profile} /> </Tab.Navigator> ); }; return ( <NavigationContainer> <Stack.Navigator screenOptions={{headerShown: false}}> <Stack.Screen name="Bottom" component={BottomTabScreen} /> <Stack.Screen name="Status" component={Status} /> <Stack.Screen name="FriendProfile" component={FriendProfile} /> <Stack.Screen name="EditProfile" component={EditProfile} /> </Stack.Navigator> </NavigationContainer> ); }; export default App; 강의 내용과 같이 App 컴포넌트 안에서 BottomTabScreen 컴포넌트를 선언하면 "Do not define components during render." 라는 경고문이 뜹니다. 그래서 아래와 같이 코드를 수정하였는데 App 컴포넌트 바깥에서 이렇게 선언해도 문제가 없는건가요? import {createBottomTabNavigator} from '@react-navigation/bottom-tabs'; import {createNativeStackNavigator} from '@react-navigation/native-stack'; import React from 'react'; import Home from './src/screens/Home'; import Search from './src/screens/Search'; import Profile from './src/screens/Profile'; import Activity from './src/screens/Activity'; import {NavigationContainer} from '@react-navigation/native'; import Status from './src/screens/Status'; import FriendProfile from './src/screens/FriendProfile'; import EditProfile from './src/screens/EditProfile'; const Stack = createNativeStackNavigator(); const Tab = createBottomTabNavigator(); const BottomTabScreen = () => { return ( <Tab.Navigator screenOptions={() => ({ tabBarHideOnKeyboard: true, // tabBarShowLabel: false, headerShown: false, tabBarStyle: { height: 70, }, })}> <Tab.Screen name="Home" component={Home} /> <Tab.Screen name="Search" component={Search} /> <Tab.Screen name="Activity" component={Activity} /> <Tab.Screen name="Profile" component={Profile} /> </Tab.Navigator> ); }; const App = () => { return ( <NavigationContainer> <Stack.Navigator screenOptions={{headerShown: false}}> <Stack.Screen name="Bottom" component={BottomTabScreen} /> <Stack.Screen name="Status" component={Status} /> <Stack.Screen name="FriendProfile" component={FriendProfile} /> <Stack.Screen name="EditProfile" component={EditProfile} /> </Stack.Navigator> </NavigationContainer> ); }; export default App;
2023-06-07T04:18:12.190Z
댓글 3
좋아요 1
조회수 613
미해결
[자동화 완전 정복] 인스타그램 휴대폰, 웹 자동화 프로그램 개발
안녕하세요! 선생님 혹시 에러가 나는데 봐주실 수 있을까요 ㅠㅠ 기본적으로 로그인부터 안됩니다 ㅠㅠ 에러 DevTools listening on ws://127.0.0.1:51221/devtools/browser/d2c4970f-37a8-4257-ad60-95407a9b0e45 cannot access local variable 'actions' where it is not associated with a value [에러] insta_web_login > 에러 발생 Traceback (most recent call last): File "c:\Users\문소희\Desktop\project\insta_auto\main.py", line 25, in <module> insta_web.insta_web_work(driver,keyword,count) File "c:\Users\문소희\Desktop\project\insta_auto\insta_web.py", line 117, in insta_web_work insta_web_link_extract(driver,count) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "c:\Users\문소희\Desktop\project\insta_auto\insta_web.py", line 75, in insta_web_link_extract WebDriverWait(driver, 10).until(EC.presence_of_element_located( File "C:\Users\문소희\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\support\wait.py", line 95, in until raise TimeoutException(message, screen, stacktrace) selenium.common.exceptions.TimeoutException: Message: Stacktrace: Backtrace: GetHandleVerifier [0x01086E73+48323] (No symbol) [0x01019661] (No symbol) [0x00F25308] (No symbol) [0x00F50B45] (No symbol) [0x00F50CDB] (No symbol) [0x00F7E3D2] (No symbol) [0x00F6A924] (No symbol) [0x00F7CAC2] (No symbol) [0x00F6A6D6] (No symbol) [0x00F4847C] (No symbol) [0x00F4957D] GetHandleVerifier [0x012EFD5D+2575277] GetHandleVerifier [0x0132F86E+2836158] GetHandleVerifier [0x013296DC+2811180] GetHandleVerifier [0x011141B0+626688] (No symbol) [0x0102314C] (No symbol) [0x0101F4B8] (No symbol) [0x0101F59B] (No symbol) [0x010121B7] BaseThreadInitThunk [0x76A100C9+25] RtlGetAppContainerNamedObjectPath [0x77907B4E+286] RtlGetAppContainerNamedObjectPath [0x77907B1E+238] main import time import uiautomator2 as u2 from selenium import webdriver import insta_web import insta_mobile serial = "ce031713db01712d02" device = u2.connect(serial) options = webdriver.ChromeOptions() options.add_argument('--user-agent= Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36') options.add_argument("--disanble-logging") options.add_experimental_option("useAutomationExtension",False) options.add_experimental_option('excludeSwitches',["enable-auttomation"]) driver = webdriver.Chrome(options=options) keyword_list = ["골린이", "골프사랑", "골프중독","골프스윙", "골프레슨"] for keyword in keyword_list: keyword = keyword.replace(" ","") count = 1000 insta_web.insta_web_work(driver,keyword,count) insta_mobile.insta_mobile_work(device) insta_web import time, data import chromedriver_autoinstaller chromedriver_autoinstaller.install() from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.keys import Keys from selenium.webdriver import ActionChains import pyperclip def insta_web_login(driver): try: driver.get("https://www.instagram.com/") # time.sleep(2) id_selector = "#loginForm > div > div:nth-child(1) > div > label > input" WebDriverWait(driver, 10).until(EC.presence_of_element_located( (By.CSS_SELECTOR, id_selector) )) id_input = driver.find_element(By.CSS_SELECTOR,id_selector) id_input.click() time.sleep(5) # ctrl + c 동작 pyperclip.copy(data.id) # ctrl + v 동작 actions.key_down(Keys.CONTROL).send_keys('v').key_up(Keys.CONTROL).perform() # id_input.send_keys(data.id) time.sleep(5) pw_selector = "#loginForm > div > div:nth-child(2) > div > label > input" pw_input = driver.find_element(By.CSS_SELECTOR,pw_selector) pw_input.click() time.sleep(5) actions = ActionChains(driver) # ctrl + c 동작 pyperclip.copy(data.pw) # ctrl + v 동작 actions.key_down(Keys.CONTROL).send_keys('v').key_up(Keys.CONTROL).perform() time.sleep(5) login_btn_selector = "#loginForm > div > div:nth-child(3) > button" login_btn = driver.find_element(By.CSS_SELECTOR, login_btn_selector) login_btn.click(5) except Exception as e: print(e) print('[에러] insta_web_login > 에러 발생') def insta_web_hashtag_search(driver,keyword): try: time.sleep(50) from urllib import parse keyword = "골프사랑" keyword = parse.quote(keyword) driver.get(f"https://www.instagram.com/explore/tags/{keyword}/") except Exception as e: print(e) print["[에러] insta_web_hashtag_search > 해시태그 검색중 에러 발생"] def insta_web_link_extract(driver, count=100): time.sleep(5) all_posting_sel = "div[id^='mount_0_0'] > div > div > div.x9f619.x1n2onr6.x1ja2u2z > div > div > div > div.x78zum5.xdt5ytf.x10cihs4.x1t2pt76.x1n2onr6.x1ja2u2z > div.x9f619.xnz67gz.x78zum5.x168nmei.x13lgxp2.x5pf9jr.xo71vjh.x1uhb9sk.x1plvlek.xryxfnj.x1c4vz4f.x2lah0s.x1q0g3np.xqjyukv.x1qjc9v5.x1oa3qoh.x1qughib > div.xh8yej3.x1gryazu.x10o80wk.x14k21rp.x1porb0y.x17snn68.x6osk4m > section > main > article > div:nth-child(3) > div" WebDriverWait(driver, 10).until(EC.presence_of_element_located( (By.CSS_SELECTOR, all_posting_sel) )) all_posting_box = driver.find_element(By.CSS_SELECTOR, all_posting_sel) time.sleep(5) '''링크 100개 추출''' links = [] while len(links) < count : try: for _ in range(6): driver.execute_script("window.scrollBy(0,600);") time.sleep(5) all_posting_box = driver.find_element(By.CSS_SELECTOR, all_posting_sel) posk_links = all_posting_box.find_elements(By.TAG_NAME,"a") for eachLink in posk_links: link = eachLink.get_attribute('href') links.append(link) links = set(links) links = list(links) except Exception as e: print(e) print("insta_web_link_extract > while 에러 발생") with open('links.txt',"a") as f: for link in links: # print(link) f.write(f"{link}\n") def insta_web_work(driver,keyword,count): insta_web_login(driver) insta_web_hashtag_search(driver, keyword) insta_web_link_extract(driver, count) insta_ mobile import time, data import chromedriver_autoinstaller chromedriver_autoinstaller.install() from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.keys import Keys from selenium.webdriver import ActionChains import pyperclip def insta_web_login(driver): try: driver.get("https://www.instagram.com/") # time.sleep(2) id_selector = "#loginForm > div > div:nth-child(1) > div > label > input" WebDriverWait(driver, 10).until(EC.presence_of_element_located( (By.CSS_SELECTOR, id_selector) )) id_input = driver.find_element(By.CSS_SELECTOR,id_selector) id_input.click() time.sleep(5) # ctrl + c 동작 pyperclip.copy(data.id) # ctrl + v 동작 actions.key_down(Keys.CONTROL).send_keys('v').key_up(Keys.CONTROL).perform() # id_input.send_keys(data.id) time.sleep(5) pw_selector = "#loginForm > div > div:nth-child(2) > div > label > input" pw_input = driver.find_element(By.CSS_SELECTOR,pw_selector) pw_input.click() time.sleep(5) actions = ActionChains(driver) # ctrl + c 동작 pyperclip.copy(data.pw) # ctrl + v 동작 actions.key_down(Keys.CONTROL).send_keys('v').key_up(Keys.CONTROL).perform() time.sleep(5) login_btn_selector = "#loginForm > div > div:nth-child(3) > button" login_btn = driver.find_element(By.CSS_SELECTOR, login_btn_selector) login_btn.click(5) except Exception as e: print(e) print('[에러] insta_web_login > 에러 발생') def insta_web_hashtag_search(driver,keyword): try: time.sleep(50) from urllib import parse keyword = "골프사랑" keyword = parse.quote(keyword) driver.get(f"https://www.instagram.com/explore/tags/{keyword}/") except Exception as e: print(e) print["[에러] insta_web_hashtag_search > 해시태그 검색중 에러 발생"] def insta_web_link_extract(driver, count=100): time.sleep(5) all_posting_sel = "div[id^='mount_0_0'] > div > div > div.x9f619.x1n2onr6.x1ja2u2z > div > div > div > div.x78zum5.xdt5ytf.x10cihs4.x1t2pt76.x1n2onr6.x1ja2u2z > div.x9f619.xnz67gz.x78zum5.x168nmei.x13lgxp2.x5pf9jr.xo71vjh.x1uhb9sk.x1plvlek.xryxfnj.x1c4vz4f.x2lah0s.x1q0g3np.xqjyukv.x1qjc9v5.x1oa3qoh.x1qughib > div.xh8yej3.x1gryazu.x10o80wk.x14k21rp.x1porb0y.x17snn68.x6osk4m > section > main > article > div:nth-child(3) > div" WebDriverWait(driver, 10).until(EC.presence_of_element_located( (By.CSS_SELECTOR, all_posting_sel) )) all_posting_box = driver.find_element(By.CSS_SELECTOR, all_posting_sel) time.sleep(5) '''링크 100개 추출''' links = [] while len(links) < count : try: for _ in range(6): driver.execute_script("window.scrollBy(0,600);") time.sleep(5) all_posting_box = driver.find_element(By.CSS_SELECTOR, all_posting_sel) posk_links = all_posting_box.find_elements(By.TAG_NAME,"a") for eachLink in posk_links: link = eachLink.get_attribute('href') links.append(link) links = set(links) links = list(links) except Exception as e: print(e) print("insta_web_link_extract > while 에러 발생") with open('links.txt',"a") as f: for link in links: # print(link) f.write(f"{link}\n") def insta_web_work(driver,keyword,count): insta_web_login(driver) insta_web_hashtag_search(driver, keyword) insta_web_link_extract(driver, count)
김기솔
2023-06-05T10:01:09.007Z
댓글 3
좋아요 1
조회수 1680
미해결
실습으로 끝장내는 웹 크롤링과 웹 페이지 자동화 & 실전 활용
"쿠팡 제품 검색 결과 크롤링" 강의를 응용해서 타오바오 사이트에서 해보려고 하는데, 자꾸 안돼서 아래와 같이 print(html) 했더니 뭔가 차단된거 같은 html 막 쭉 뜨네요 이럴때는 어떻게 해야하나요? req = requests.get(links, timeout=5, headers=headers, cookies=cookie) html = req.text soup = BeautifulSoup(html, "html.parser") print(html)
python 웹-크롤링 selenium beautifulsoup
울랄라
2023-06-04T23:09:28.318Z
댓글 2
좋아요 0
조회수 1012
해결됨
한 입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지
비동기 함수를 왜 굳이 동기처럼 실행시키기 위해 await을 사용하는 건가요? 처음부터 함수를 만들때 동기로 만들면 되는거 아닌가요? 동기, 비동기가 잘이해가 안가네요..
조우현
2023-06-04T12:11:29.392Z
댓글 1
좋아요 0
조회수 2196
미해결
실리콘밸리 엔지니어가 가르치는 파이썬 장고 웹프로그래밍
sqliteBrowser 사용하는 수업에서 db.sqlite3를 열려고 하니, database is locked 라는 메시지가 뜹니다. 그래서 ChatGPT나 Bard... Googling을 이용해봤지만, 저에게 해당될만한 내용이 없네요. 혹시 몰라 재부팅도 해봤습니다. 이거 DB부분만 지웠다가 다시 까는 방법이 있을까요? (makemigrations, migrate 부분)
python django bootstrap rest-api drf
bigseoul
2023-06-02T13:56:16.069Z
댓글 3
좋아요 1
조회수 2715
미해결
[자동화 완전 정복] 인스타그램 휴대폰, 웹 자동화 프로그램 개발
섹션 6-3에서 for word in "멘트" << 이렇게 돌리면 댓글이 한글자씩 입력하고 작성됩니다. ex) 멘트 댓글1 : 멘 댓글2 : 트 if not device(text="이 게시물에 대한 댓글 기능이 제한되었습니다.").exists(): print("커멘드 작성 가능 exists") device(resourceId=" com.instagram.android :id/layout_comment_thread_edittext").click() for word in "안녕하세요!": device.send_keys(word) time.sleep(random.uniform(0.03,0.08)) time.sleep(5) device(resourceId=" com.instagram.android :id/layout_comment_thread_post_button_click_area").click() time.sleep(2) device.press ('back') time.sleep(2) device.press ('back') if not device(text="이 게시물에 대한 댓글 기능이 제한되었습니다.").exists(): print("커멘드 작성 가능 exists") device(resourceId="com.instagram.android:id/layout_comment_thread_edittext").click() for word in "안녕하세요!": device.send_keys(word) time.sleep(random.uniform(0.03,0.08)) time.sleep(5) device(resourceId="com.instagram.android:id/layout_comment_thread_post_button_click_area").click() time.sleep(2) device.press('back') time.sleep(2) device.press('back')
김기솔
2023-05-31T10:04:55.546Z
댓글 2
좋아요 1
조회수 384
해결됨
[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)
안녕하세요 선생님 현재 모델링 및 평가(회귀)부분을 학습하고 있습니다. 코드를 따라가면서 실습을 진행하고 있는데, rmse 값이 선생님과 달라 질문 드립니다. 제가 알기로는 모델링을 하는 과정에서 예측한 값이 달라질 수 있고, 이에 따라 평가지표인 rmse 값이 다를 수 있다...라고 알고 있습니다. 그런데 값의 차이 뿐만이 아니라 baseline과 scaler 적용 결과가 좋은지 나쁜지가 달라 질문드립니다. 예를 들어, 선생님께서 하셨을때는 RandomForestRegressor의 baseline이 rmse값이 가장 좋았고(작았고), scaler를 적용했을 때 rmse가 커져서 scaler 적용은 하지 않는게 좋다~라는 내용의 실습이었는데 제가 했을 때는 baseline의 rmse보다 scaler를 적용했을 때의 rmse가 작아 scaler를 적용하는 것이 좋다..는 결론이 나옵니다. 질문을 정리하자면, 모델링을 하는 과정에서 선생님과 제가 실습한 예측값과 rmse가 다른게 맞는지 다른게 맞다 해도 scaler 적용여부 등을 바꿀 수 있을 정도로 예측값과 rmse가 달라질 수 있는지 (추가질문)달라지더라도 선생님 실습값 : 4728.xx 제 실습값 6025.174022213681 이정도로 달라질 수 있는지... (추가질문) 모델링 및 평가(회귀) 24:56에서 수험자는 알 수 없는 영역>y_test로 rmse로 구하시고 결과값이 17909.xx로 나왔는데 여기에서도 charges에 로그변환 한 이후기 떄문에 원래는 np.exp(pred)로 rmse를 구했어야 하는지 일 것 같습니다. 감사합니다.
python 머신러닝 빅데이터 pandas 빅데이터분석기사
콘스트
2023-05-31T09:43:32.528Z
댓글 1
좋아요 1
조회수 709
미해결
따라하며 배우는 노드, 리액트 시리즈 - 쇼핑몰 사이트 만들기[전체 리뉴얼]
npm i -D postcss autoprefixer tailwind npx tailwindcss init -p 모두 작업을 마치고 /** @type {import('tailwindcss').Config} */ export default { content: [ "./index.html", "./src/**/*.{js,jsx,ts,tsx}" ], theme: { extend: {}, }, plugins: [], } index.css @tailwind base; @tailwind components; @tailwind utilities; npm run dev 를 돌리면, node:internal/process/promises:246 triggerUncaughtException(err, true /* fromPromise */); [Failed to load PostCSS config: Failed to load PostCSS config (searchPath: C:/WebStudy/WebDevelement/React/fullstack-react/front): [Error] Loading PostCSS Plugin failed: Cannot find module 'tailwindcss' 라는 오류가 뜹니다. 원인파악이 어려운데 문의드립니다!
react redux node.js 웹앱 mongodb
코딩도니
2023-05-28T07:17:54.672Z
댓글 1
좋아요 0
조회수 1903
미해결
파이썬 무료 강의 (활용편3) - 웹 스크래핑 (5시간)
webdriver의 find_element로 찾은 경우 .click()을 붙여주면 click이 되는데, soup으로 찾은 경우 .click()을 붙여주면 오류가 발생하네요. click을 하려면 find_element를 써야 할까요? soup으로 찾은 객체는 click을 할 수 없을까요?
python 웹-크롤링 selenium 웹-스크래핑
이민호
2023-05-28T00:46:08.744Z
댓글 1
좋아요 1
조회수 3587
미해결
[자동화 완전 정복] 인스타그램 휴대폰, 웹 자동화 프로그램 개발
로그인 > 해시태그 검색 까지는 작동되는데... 이후 스크롤부터 링크 추출까지 막혔습니다. 어떤 문제가 있는지 알수 있을까요? --------------------------------------------------------- import time import chromedriver_autoinstaller chromedriver_autoinstaller.install() from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support .ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.keys import Keys from selenium.webdriver import ActionChains driver = webdriver.Chrome () driver.get(" https://www.instagram.com/ ") # time.sleep(2) id_selector = "#loginForm > div > div:nth-child(1) > div > label > input" WebDriverWait(driver, 10).until(EC.presence_of_element_located( (By.CSS_SELECTOR, id_selector) )) import mdata id_input = driver.find_element(By.CSS_SELECTOR,id_selector) id_input.send_keys( mdata.id ) time.sleep(1) pw_selector = "#loginForm > div > div:nth-child(2) > div > label > input" pw_input = driver.find_element(By.CSS_SELECTOR,pw_selector) pw_input.send_keys( mdata.pw ) time.sleep(1) login_btn_selector = "#loginForm > div > div:nth-child(3) > button" login_btn = driver.find_element(By.CSS_SELECTOR, login_btn_selector) login_btn.click() time.sleep(10) from urllib import parse keyword = "사업가" keyword = parse.quote(keyword) driver.get(f" https://www.instagram.com/explore/tags/{keyword}/ ") time.sleep(10) all_posting_sel = "div[id^='mount_0_0'} > div > div > div.x9f619.x1n2onr6.x1ja2u2z > div > div > div > div.x78zum5.xdt5ytf.x10cihs4.x1t2pt76.x1n2onr6.x1ja2u2z > div.x9f619.xnz67gz.x78zum5.x168nmei.x13lgxp2.x5pf9jr.xo71vjh.x1uhb9sk.x1plvlek.xryxfnj.x1c4vz4f.x2lah0s.x1q0g3np.xqjyukv.x1qjc9v5.x1oa3qoh.x1qughib > div.xh8yej3.x1gryazu.x10o80wk.x14k21rp.x1porb0y.x17snn68.x6osk4m > section > main > article > div:nth-child(3) > div" time.sleep(3) all_posting_box = driver.find_element(By.CSS_SELECTOR, all_posting_sel) time.sleep(3) '''링크 100개 추출''' links = [] while len(links) < 100 : for _ in range(6): driver.execute_script("window.scrollBy(0.600);") time.sleep(1) all_posting_box = driver.find_element(By.CSS_SELECTOR, all_posting_sel) posk_links = all_posting_box.find_elements(By.TAG_NAME,"a") for eachLink in posk_links: link = eachLink.get_attribute('href') links.append(link) links = set(links) links = list(links) for link in links: print(link) print("******") print(len(links), "개의 링크를 추출") input() ------------------------------------------------------ DevTools listening on ws://127.0.0.1:50287/devtools/browser/ed0f17f2-033d-4ba2-80b8-8f3d2f886171 Traceback (most recent call last): File "c:\Users\문소희\Desktop\project\insta_auto\insta_web.py", line 50, in <module> all_posting_box = driver.find_element(By.CSS_SELECTOR, all_posting_sel) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\문소희\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 831, in find_element return self.execute(Command.FIND_ELEMENT, {"using": by, "value": value})["value"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\문소희\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 440, in execute self.error_handler.check_response(response) File "C:\Users\문소희\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 245, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.InvalidSelectorException: Message: invalid selector: An invalid or illegal selector was specified (Session info: chrome=113.0.5672.127) Stacktrace: Backtrace: GetHandleVerifier [0x005C6DF3+48691] (No symbol) [0x00558CC1] (No symbol) [0x00465068] (No symbol) [0x00468401] (No symbol) [0x00469641] (No symbol) [0x004696E0] (No symbol) [0x004900D0] (No symbol) [0x004906AB] (No symbol) [0x004BDD62] (No symbol) [0x004AA314] (No symbol) [0x004BC452] (No symbol) [0x004AA0C6] (No symbol) [0x00487E18] (No symbol) [0x00488F3D] GetHandleVerifier [0x00824EAA+2531050] GetHandleVerifier [0x00864B60+2792352] GetHandleVerifier [0x0085E6EC+2766636] GetHandleVerifier [0x00650820+612448] (No symbol) [0x005625BC] (No symbol) [0x0055E808] (No symbol) [0x0055E8EB] (No symbol) [0x00551C77] BaseThreadInitThunk [0x754900C9+25] RtlGetAppContainerNamedObjectPath [0x772E7B4E+286] RtlGetAppContainerNamedObjectPath [0x772E7B1E+238]
김기솔
2023-05-25T09:21:38.021Z
댓글 1
좋아요 1
조회수 775
미해결
실습으로 끝장내는 웹 크롤링과 웹 페이지 자동화 & 실전 활용
선생님! 쿠팡정보 크롤링해서 웹사이트 만들었습니다 이렇게 유익한 강의 처음입니다!! 너무너무 감사해요 다름이 아니라 혹시 괜찮으시면 선생님과 만든 웹사이트에 쿠팡 파트너스 API 연동시키는 부분 강의로 찍어주실수 있는지요 아님 유튜브 영상이라도 부탁드려요 ㅠㅠㅠ 혼자 하려니까 API 주소를 어따 붙여넣기 해야하는지 감이 안잡히네요
python 웹-크롤링 selenium beautifulsoup
울랄라
2023-05-25T02:49:39.323Z
댓글 1
좋아요 0
조회수 321