try:
req = urllib.request.Request("http://gall.dcinside.com/mgallery/board/lists/?id=갤러리아이디");
data = urllib.request.urlopen(req).read()
soup = BeautifulSoup(data, 'html.parser')
for title in soup.find_all(soup,string=re.compile(안녕)):
link = 'http://url/' + title.parent.parent.get('href')
tweet = title + '\n' + link
except Exception:
pass
이렇게 되있는 상태인데 저 안녕 부분에다가 정규식을 짜야되는데 초보라서 모르겠어요.
'안녕' 이나 'ㅎㅇ'라는 문자열이 있으면 그 게시글 링크랑 제목 따오려고하거든용...
되있->돼있 (되어 = 돼임) [리듬 맞춤법 봇♬]