網路城邦
上一篇 回創作列表 下一篇   字體:
【Python 爬蟲】抓取 Google 搜尋成效的貫串連接 網站架設
2024/05/29 14:31:11瀏覽104|回應0|推薦0
  1. from googlesearch import search
  2. query = "cambridge"
  3. for j in search(query, stop=5, pause=2.0):
  4.         print(j)
  5.  
複製代碼

網站架設 

網站架設記實一下批量抓取 Google 搜尋結果裡的保持的方式。


如果還沒有安裝以下,要先下載安裝:
 

  1. pip install beautifulsoup4
  2. pip install google
複製代碼
  1. /usr/bin/python3 /home/xxx/public_html/搜索引擎優化_crawler.py > /dev/null 2>&2

 


Result
1.png


 

2.png


Code

 

文章出處

 

接下來設定排程

( 不分類不分類 )
回應 推薦文章 列印 加入我的文摘
上一篇 回創作列表 下一篇

引用
引用網址:https://classic-blog.udn.com/article/trackback.jsp?uid=1a99bb4a&aid=180663992