craw_ptt.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:Crawler_and_Share 作者: f496328mm 项目源码 文件源码
def catch_ptt_history_date_time(ptt_class_name,sql_name):
    conn = ( pymysql.connect(host = '114.34.138.146',
                             port = 3306,
                             user = user,
                             password = password,
                             database = database,  
                             charset="utf8") )
    cursor = conn.cursor()
    cursor.execute('SELECT * FROM `'+ sql_name +'` ORDER BY id DESC LIMIT 1;')
    data = cursor.fetchone()     

    date_time  = date_to_numeric( data[1] )

    cursor.close()
    conn.close()    

    return date_time  
#---------------------------------------------------------------------------------            
# ?????? index, index ???????, ????????? index
评论列表


问题


面经


文章

微信
公众号

扫码关注公众号