Skip to content
조회 수 3444 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

파이썬 팍스넷 추천종목 특정페이지 크롤링

 

 

import time
from datetime import datetimedelta
from unicodedata import lookup #time 명령어 사용하기 
from bs4 import BeautifulSoup # BeautifulSoup 불러오기
#파이썬 requests 모듈은 간편한 HTTP 요청처리를 위해 사용하는 모듈로 별도로 설치해 주어야 한다.
import requests #pip3 install requests
import sys #파라미터 변수값을 가져오기 위해서 sys패키지를 import 함
import json
#강추이종목 미완성
url = "http://www.paxnet.co.kr/tbbs/view?id=N00820&seq=150357585723621&orgBbsId=N11023"
headers = {'user-agent''Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36'}
html = requests.get(urlheaders=headers)
bs_html = BeautifulSoup(html.content,"html.parser")
 
temp = json.loads(str(bs_html).split('bbsWrtVO = ')[1].split('; //')[0])
 
title = temp['title']
cont = temp['bbsWrtCntnVO']['cntn']
print(title,'\n',cont)
로그인 후 댓글쓰기가 가능합니다.

?

  1. 04
    Jun 2023
    08:11

    H734GP 공유기 시스템로그 중 >>> Send Offer / Receive Discover /

    Category컴퓨터잡담 Views50958
    Read More
  2. 10
    May 2023
    06:06

    파이썬 셀레니움에서의 오류(raise TimeoutException(message, screen, stacktrace) selenium.common.exceptions.TimeoutException: Message:)

    Views54363
    Read More
  3. 07
    May 2023
    04:17

    python AttributeError: 'WebDriver' object has no attribute 'find_element_by_css_selector' 해결방법

    Category파이썬 Views47324
    Read More
  4. 26
    Apr 2023
    01:11

    테블릿을 세컨트모니터로???

    Category컴퓨터잡담 Views37854
    Read More
  5. 21
    Apr 2023
    20:10

    DiffusionWrapper has 859.52 M params.

    Category파이썬 Views37147
    Read More
  6. 16
    Apr 2023
    08:28

    티피씨글로벌 차트가 너무좋네.

    Category주식 Views38278
    Read More
  7. 13
    Apr 2023
    22:24

    한창산업 - 아연분말,인산아연,제올라이트,바나듐 생산업체

    Category주식 Views38282
    Read More
  8. 13
    Apr 2023
    22:17

    최강 한동훈주

    Category주식 Views36566
    Read More
  9. 26
    Mar 2023
    08:12

    구글 스프레드시트에서 셀값이 특정일에서 현재일과 3일 이내의 범위에 들어오면 이메일을 발송하는 방법

    Category[Docs]스프레드시트 Views40257
    Read More
  10. 25
    Mar 2023
    12:40

    파이썬으로 captCha 분석하여 웹사이트 소스 가져오기

    Category파이썬 Views18825
    Read More
Board Pagination Prev 1 2 3 4 5 ... 235 Next
/ 235

http://urin79.com

우린친구블로그

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


이 PC에는 나눔글꼴이 설치되어 있지 않습니다.

이 사이트를 나눔글꼴로 보기 위해서는
나눔글꼴을 설치해야 합니다.

설치 취소