搜尋

首頁  >  問答  >  主體

php - python怎麼捕捉日誌檔裡面的UA

日誌格式如下
`61.182.137.6 - - [21/Apr/2017:00:00:37 +0800] 0 "HEAD / HTTP/1.1" 200 - "-" "Baidu-YunGuanGuanang-SLABot(ce.bCeaidu. com)"
123.125.71.89 - - [21/Apr/2017:00:00:38 +0800] 0 "GET /article/515140 HTTP/1.1" 200 10315 "-"" "Moz/5. ; +http://www.baidu.com/search/s...)"
216.244.66.229 - - [21/Apr/2017:00:00:39 +0800] 0 "GET /article/330012 HTTP/ 1.1" 200 29593 "-" "Mozilla/5.0 (compatible; DotBot/1.1; http://www.opensiteexplorer.o... help@moz.com)"`

python3.5用什麼方式可以捕捉到UA裡面的蜘蛛型Baiduspider和DotBot
要怎麼寫

淡淡烟草味淡淡烟草味2819 天前464

全部回覆(1)我來回復

  • 阿神

    阿神2017-05-16 13:12:35

    雷雷

    回覆
    0
  • 取消回覆