from urllib.request import urlopen
from bs4 import BeautifulSoup
import time
import re

letTistory = 'https://ioswift.tistory.com'
list5category = []

while True:
   html = urlopen(letTistory)
   bsObject = BeautifulSoup(html, "html.parser")
   for link in bsObject.findAll("a", href=re.compile("^(/category/)((?!:).)*$")):
      if 'href' in link.attrs:
         list5category.append(link.attrs['href'])
   time.sleep(10)
   # print(list5category)
   for link2 in list5category:
      html = urlopen(letTistory+link2)
      bsObject = BeautifulSoup(html, "html.parser")
      # print(bsObject)
   list5category.clear()

 

당근 모바일에서도 잘 됨.

 

WWDC 보니... 이제 아이폰에서 그냥 pyCharm 쓸 때가 금방 올 듯.

 

 

'{BE} Python 3.1x' 카테고리의 다른 글

swift badge  (0) 2020.06.23
pyCharm 세팅  (0) 2020.06.23
p001- nltk  (0) 2020.06.21
pyCharm opensources  (0) 2020.06.21
How to disable vim on pyCharm  (0) 2020.06.19

+ Recent posts