내 업무를 대신 할 파이썬(Python) 웹크롤링 & 자동화 (feat. 주식, 부동산 데이터 / 인스타그램)
PackagesNotFoundError: The following packages are not available from current channels: - python=3.8.5* 이런거 나오면서 가상환경 설치가 안되면, conda create -n crawling_class -c conda-forge python=3.8.5 이렇게 하니까 해결되네요. Mt시리즈에서는 3.8.5버전이 기본지원이 안된다고함.
[리뉴얼] 파이썬입문과 크롤링기초 부트캠프 [파이썬, 웹, 데이터 이해 기본까지] (업데이트)
Exercise 3. 출력 print 함수를 사용하여 3.1415의 값을 출력하세요. 단, 소수점 아래는 첫 번째 자리까지만 표시되도록 하세요. Example 3.1 아니 이건 배우지도 않았는데 어떻게 알아내나요 ? 검색해서 구글링해서 찾아야 하나요 ? 시간 아끼면서 지루하지 않게 같이 배우면서 하려고 한건데 Exercise 1. 출력 화면에 "Hello World!"를 출력하세요. [1]: print ( "Hello World!" ) Hello World! [2]: print ( "Hello World!" ) Hello World! Exercise 2. 출력 화면에 "I don't like C language"를 출력하세요. 이건 그냥 타이핑 치면 되지만 구글링 해가면서까지 시간 허비하는 건 아닌 거 같아요 바로 알려주면서 넘어가도 될 거 같은데요 휴
먼저 친절하고 자세한 강의 감사합니다. 덕분에 셀레니움을 이용해서 간단하지만 1차로 원하는 부분까지 개발해 봤습니다. 캠핑장 예약을 위해 아직 더 가야 하지만 버튼 하나로 조회 결과 화면까지 이동하는 건 확인했습니다. ㅎㅎ 질문입니다. pyside6 설치 강의에 나오는 Qt for Python 확장 설치를 더이상 지원하지 않는답니다. 섹션13 의 PySide6 설치 및 사용법 강의에 나오는 Qt for Python 을 검색하니 이 확장은 더 이상 사용되지 않습니다. 대신 Qt All Extensions Pack 확장자를 사용하세요. 라는 멧세지가 나옵니다. Qt All Extensions Pack 이걸 설치해도 강의 따라가는 데 문제가 없을까요? 설치 잘 못 되었다가는 꼬일 거 같아 대기중입니다. ㅠㅠ 감사합니다.
[리뉴얼] 파이썬입문과 크롤링기초 부트캠프 [파이썬, 웹, 데이터 이해 기본까지] (업데이트)
반복문과 다양한 데이터 구조 활용2에서 58번 문제 질문 있습니다. 이렇게 작성해도 되나요? data = {'environment': ['환경','x'], 'company': ['회사','o'], 'government': ['정부, 정치','x'], 'face': ['얼굴','x']} eng = input("영어 단어를 입력하세요 : ") for item in data.keys() : if eng == item and data[item][1] == 'x' : data[item][1] = 'o' if data[item][1] == 'x' : print(item)
if timeMin is not None: if isinstance(timeMin, str): timeMin = datetime.strptime(timeMin, "%Y-%m-%d") timeMin -= timedelta(hours=9) url += f"&timeMin={timeMin.isoformat("T")}Z" 마지막 줄을 실행하면 원래 쌍따옴표 내 쌍따옴표라서 오류가 떠야 하는데, 영상에서는 오류가 없습니다. 반면 제 환경에서는 예상대로 오류가 발생했고, 혹시 몰라 강사님 코드 원본을 실행해 봐도 같은 오류가 발생했습니다. 오류 해결법이 아니라, 왜 영상에서는 해당 오류가 발생하지 않는지 궁금합니다!
pyinstaller -w -F를 실행하면 이런 에러가 뜹니다..ㅠㅠ .exe 파일도 생성 안 되구요 어떻게 해결해야 할까요?? FileNotFoundError: Icon input file /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/PyInstaller/bootloader/images/icon-windowed.icns not found
안녕하세요. 저는 군인이고 싸지방에서 공부를 하고 있습니다. 싸지방에서 codespace를 통해서 공부를 하고 있었는데, 셀레니움이 잘 안되어서 질문 드립니다. pip install selenium==4.17.2 을 한 뒤에 from selenium import webdriver driver = webdriver.Edge() 를 했더니 NoSuchDriverException : Message: Unable to obtain driver for MicrosoftEdge using Selenium Manager.; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location 라고 오류가 뜹니다. 드라이버가 설치 안되어서 그런것 같아 엣지 드라이버를 설치해 보았는데도 계속 똑같은 오류가 뜹니다 ㅜ.. 어떻게 해야할지 고민하다가 질문 드립니다.
2024년 10월 현재 제 pc에 설치된 버전은 requests 2.32.3, beautifulsoup 4.12.3, bs4 0.0.2 , python 3.1.3 인데, soup = BeautifulSoup(html, "html5lib") 코드는 오류발생 합니다. "html5lib"대신 "html.parser" 사용하면 정상 작동합니다. soup = BeautifulSoup(html, "html.parser")
강의에서 제공된 코드는 영화 개봉 날짜, 평점을 가져오지 못하고 있는데 아래 코드 사용하시면 됩니다. 그리고 태그가 단일 요소일 경우 contents 속성을 사용하기 보다는 string 속성을 사용하면 리스트가 아닌 문자형으로 바로 출력할 수 있습니다. for dt, dd in zip(c_dt, c_dd): if dd.select_one('c-star'): rating = dd.select_one('c-star').next_element.strip() c_data[dt.string] = rating elif dd.select_one('span'): days = dd.select_one('span').string c_data[dt.string] = days else: c_data[dt.string] = dd.string
cv2.imread() 함수를 통해 이미지를 읽어 들일 때, 한글을 읽어오지 못해 오류가 발생하는 경우가 있습니다. 아래의 코드로 해결하시면 됩니다. 참고로, 아래 코드 사용 시 cvtColor() 함수를 사용해서 색상을 변경하지 않아도 됩니다. import numpy as np img_path = "이미지 파일 경로" img_file= np.fromfile(img_path, np.uint8) cv_decode = cv2.imdecode(img_file, cv2.IMREAD_COLOR) qr_reader = pyzbar.decode(cv_decode) print(qr_reader)
안녕하세요, 20달러가 아깝지 않은 gpt활용법 강의중에 질문있습니다.~ 위와같이, 강의내용대로 똑같이 질문을 해봤습니다. 출력된 코드는 아래와 같습니다. import requests from bs4 import BeautifulSoup # Fetch the HTML content url = 'https://startcoding.pythonanywhere.com/basic' response = requests.get(url) html_content = response.text # Parse the HTML content soup = BeautifulSoup(html_content, 'html.parser') # Define the container for products, modify this as needed to match the actual structure product_containers = soup.select('.product-container-selector')[:10] # Assuming there are selectors to find product containers # List to hold product data products = [] for container in product_containers: category = container.select_one('.category-selector').text.strip() # Modify with the actual selector for category product_name = container.select_one('.product-name-selector').text.strip() # Modify with the actual selector for product name detail_link = container.select_one('.detail-link-selector')['href'].strip() # Modify with the actual selector for link price = container.select_one('.price-selector').text.strip() # Modify with the actual selector for price products.append({ 'Category': category, 'Product Name': product_name, 'Detail Page Link': detail_link, 'Price': price }) # Print or use the product data as needed for product in products: print(product) 여기서 질문이 있습니다. 같은 챗gpt4로 했음에도, 결과는 다를수 있는건가..?(그럴수 있을거같긴하네요..) 강의에서 보여준 analyzing 이라는 기능은, 제가했을때는 안나온것같습니다. 이것은 버젼차이일까요..? 아니면 제가 좀더 명령어를 쳐보면 될까요.? 제가 출력 받은 코드는 지금 css선택자를 제가 설정해야하는걸로 나오는데, 이것을 좀더 수정해달라고 명령어를 내려서 해결도 가능한것이지요..? 혹시 제가 다운로드 받아서 업로드한 파일이 잘못된것은 아닐까요? html예제 사이트() 다른이름 저장 하여 html 저장시, 파일과 폴더(Electro - HTML Ecommerce Template, Electro - HTML Ecommerce Template_files)가 2개 생성되던데 제가 업로드한것은 앞에 있는 파일 1개입니다. 수업내용보단.. 챗gpt 관련 내용이긴한데.. 답답해서 질문드립니다.~ 질문이 똑같으면, 출력도 똑같아야 하는게 아닌가~ 하는 생각이..ㅎㅎ 감사합니다.
나만의 앱 실행파일(.exe)로 만드는 방법 강의 까지 착실히 따라ㅇ해봤는데요, 마지막 exe파일 만들떄오류가 났습니다. pyinstaller -w -F 03.네이버지식인GUI.py 위 명령어 치고 나서, 아래와 같은 오류가 나왔고요. 제가 챗gpt에 오류를 검색해보니 PyQt6 또는 PySide6 둘중하나를 제거하면 되는거같은데.. 이렇게 지워보면 될까요? Aborting build process due to attempt to collect multipl e Qt bindings packages: attempting to run hook for 'PyQt6', while hook for 'PySide6' has already been run! PyInstaller does not support multiple Qt bindings packages in a frozen application - either ensure that the build environment has only one Qt bindings package installed, or exclude the extraneous bindings packages via the module exclusion mechanism (--exclude command-line option, or excludes list in the spec file).