본문 바로가기
Python

파이썬 참고 사이트

by 슈거로프 2022. 1. 6.

https://www.inflearn.com/course/%EB%82%98%EB%8F%84%EC%BD%94%EB%94%A9-%ED%8C%8C%EC%9D%B4%EC%8D%AC-%EA%B8%B0%EB%B3%B8#

 

 

 

 

https://openpyxl.readthedocs.io/en/stable/index.html

 

https://ybworld.tistory.com/102

https://ybworld.tistory.com/24

https://ybworld.tistory.com/124?category=936724  추천

 

https://book.coalastudy.com/data-crawling/week-5/stage-2

 

 

https://stackoverflow.com/questions/39574991/how-to-detect-merged-cells-in-an-excel-sheet   -> merged cell 찾기

cell = sheet.cell(row=15, column=14)

if type(cell).__name__ == 'MergedCell':

  print("Oh no, the cell is merged!")

else:

  print("This cell is not merged.")

To "unmerge" all cells you can use the function unmerge_cells

for items in sorted(sheet.merged_cell_ranges):

  print(items)

  sheet.unmerge_cells(str(items))

 

 

 

 

 

 

-------------------------------------------------------------

 

 

 

이미지 사이즈 일괄 변경 자르기

 

https://bblib.net/entry/%EC%9D%B4%EB%AF%B8%EC%A7%80-%EC%82%AC%EC%9D%B4%EC%A6%88-%EC%9D%BC%EA%B4%84-%EB%B3%80%EA%B2%BD-%EB%B0%8F-%EC%9E%90%EB%A5%B4%EA%B8%B0

https://wave-m.tistory.com/49

https://youbidan.tistory.com/19

 

 

https://juicybrainjello.blogspot.com/2018/06/python-opencv-matchingtemplate.html  è 추천

https://iagreebut.tistory.com/77 추천

 

 

https://brunch.co.kr/@princox/180

 

 

 

---------------------------------------------------------------------------------------------------------

 

괜찮은 사이트

 

https://www.guru99.com/upload-download-file-selenium-webdriver.html

 

 

WebElement filepath = driver.findElement(By.id("fileUploadId"));
filepath.sendKeys("C:/TextFile1.txt \n C:/TextFile2.txt \n C:/TextFile3.txt");

 

 

You can create a String which contain all paths of files

String pathf1 = "...\f1.txt";

String pathf2 = "...\f2.txt";

String pathf3 = "...\f3.txt";

String allF = pathf1 + " \n " + pathf2 + " \n " + pathf3;

 

And send this String with sendKeys(allF); to your <input>.

I tested on ChromeDriver with an <input type = "file" multiple> and for me worked.

 

 

 

-----------------------------------------------------------------------

 

 

 

 

import requests

from bs4 import BeautifulSoup

 

def crawling(soup) :

    reviews = {1: 0, 2: 0, 3: 0, 4: 0}

 

    # 페이지 모든 상품의 평점을 reviews 변수에 딕셔너리 형태로 저장하세요.

 

    tt = soup.find("div", class_= 'col-md-9')

    #print(tt)

    for n in range(1,5):

        for review in tt.find_all("p", {"data-rating" : n}):

           

            reviews[n] += 1

    #print(reviews)

    return reviews  

 

 

 

def crawling(soup) :

    reviews = {1: 0, 2: 0, 3: 0, 4: 0}

 

    # 페이지 모든 상품의 평점을 reviews 변수에 딕셔너리 형태로 저장하세요.

    for review in soup.find_all("div", class_="ratings") :

        stars = review.find_all("p")

        reviews[int(stars[1]["data-rating"])] += 1

 

    return reviews

 

 

 

 

-------------------------------------------------

 

def crawling(html) :

    prices = []

 

    # 페이지 Computers / Tablets 있는 모든 상품의 가격을 prices 변수에 리스트 형태로 저장하세요.

    tt = html.find("div", class_="container test-site")

    tt1 = tt.find_all("h4", class_='pull-right price')

    for tt2 in tt1:

        tt3 = float(tt2.get_text().replace('$',''))

        #print(type(tt3))

        prices.append(tt3)

       

    return prices

 

 

def crawling(html) :

    prices = []

 

    # 페이지 Computers / Tablets 있는 모든 상품의 가격을 prices 변수에 리스트 형태로 저장하세요.

    for price in html.find_all("h4", class_="pull-right price"):

        prices.append(float(price.get_text()[1:]))

 

    return prices

 

 

파이썬 설명 사이트

https://www.sqler.com/Python_Open_Source_developer

 

 

소스코드

http://sourcenav.sourceforge.net/

 

 

무료 FTP hosting

https://moo-you.tistory.com/4

 

https://191030.tistory.com/entry/1%EB%8B%A8%EA%B3%84-%ED%8F%89%EC%83%9D-%EB%AC%B4%EB%A3%8C-%ED%98%B8%EC%8A%A4%ED%8C%85-%EA%B0%80%EC%9E%85-%EB%B0%8F-%EC%82%AC%EC%9A%A9%ED%95%98%EA%B8%B0feat-%EB%8B%B7%ED%99%88

 

파이썬 음성 to text

 

https://davey.tistory.com/entry/%ED%8C%8C%EC%9D%B4%EC%8D%AC-%EC%9D%8C%EC%84%B1-%ED%85%8D%EC%8A%A4%ED%8A%B8-%EB%B3%80%ED%99%98-%EB%82%B4-%EB%A7%90-%EB%8C%80%EB%8B%B5-AI-%EB%A1%9C%EB%B4%87-%EB%A7%8C%EB%93%A4%EA%B8%B0-gTTs-SpeechRecognition-%EB%9D%BC%EC%9D%B4%EB%B8%8C%EB%9F%AC%EB%A6%AC

'Python' 카테고리의 다른 글

크롤링 checkbox 선택 및 해제 확인 하기  (1) 2023.02.02
Python selenium element finding ways  (0) 2023.01.25
정규식 연습하기 좋은 사이트  (1) 2022.12.12
pandas index 반환  (1) 2022.07.30
Python .exe 실행 파일 만들기  (2) 2022.07.03

댓글