All Articles

TIL&TEL 20.03.09 ~ 20.03.15

TIL( Today I Learned)

  • 20-03-09 월

    • 검색 키워드 개선
    • 마스터 머지
    • 크롤러 타켓 확장
  • 20-03-10 화

    • Crawler Output 페이지 수정
    • Crawler 내용 점검
    • Selenium 시도
  • 20-03-11 수

    • requests 변형해서 iframe crawling
  • 20-03-12 목

    • iframe parsing
    • 추가 내용 crawling
  • 20-03-13 금

    • iframe parsing 헤매던 부분 완성
  • 20-03-14 토

    • Crawler 구동 하면서 생기는 error handling
    • 별에 별것들이 다 걸린다.
  • 20-03-15 일

    • 2월 가계부 정리 및 3월 재정 계획 수립
    • TIL TEL
    • 코드 리팩토링
    • 코드 merge

TEL (Trial and Error Log)

  • 20-03-11

    • parsing 헛다리 짚음
    • iframe은 selenium을 써서 잡는줄 알고 헛다리
    • In chrome View Frame source 하면 iframe 소스 주소 나옴, 나온 주소 찾아서 requests 날려도 된다.
    • Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘djangodb.collectoroutput.crawlingtarget’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sqlmode=onlyfullgroup_by
    • sql engine에 Group by setting 값도 바꿔줄 수 있음
  • 20-03-12

    • Beautiful Soup instance.decode() unicode 문자 섞여 나옴
    • Beautiful soup instance == unicode
    • instance.decode()는 unicode로 decode
    • The str() function returns a string encoded in UTF-8

      • str(instance.text) 으로 될줄 알았는데 안됨…
      • .replace(‘old’, ‘new’)로 해결
  • 20-03-13

    • beautiful soup tag
    • get으로 attr 가져오는건 가능
    • dict_like[‘value’] 도 가능
    • ‘value’ in dict_like 체크 불가. 순수 dict가 아님