import requests
from bs4 import BeautifulSoup
req=requests.get("https://www.ptt.cc/bbs/HatePolitics/index.html")
html=req.text.encode('utf-8')
soup=BeautifulSoup(html,"html.parser")
for rents in soup.select('.r-ent'):
    print rents.select('.title')[0].text.encode('utf-8')
    for metas in rents.select('.meta'):
        print rents.select('.date')[0].text.encode('utf-8')
        print rents.select('.author')[0].text.encode('utf-8')

@@ -1,12 +1,29 @@
+// craw ptt post%0A
 import reque
@@ -289,52 +289,8 @@
 8')%0A
-    for metas in rents.select('.meta'):%0A    
     
@@ -341,20 +341,16 @@
 utf-8')%0A
-    
     prin

Update crawl.py