sundios/Google-rank-tracker
关于
SEO: Python script + shell script and cronjob to check ranks on a daily basis
开发工具实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- -1
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Google Keyword Ranking Check with Python
You can see another SEO script in action here --> https://www.kwrds.ai/
Are you on a tight budget and unable to purchase an enterprise rank tracker? Well, today is your lucky day. With this Python script, you can check your rankings and your competitors' rankings on both mobile and desktop in just a few seconds.
Update: The script has been updated to remove Robobrowser and use Beautiful Soup. I've also added a competitor check feature, and now it's easier to run. I will make a fix to include a keyword file in the future, but for now, the script is working again and includes the competitors' feature.
Update
Table of Contents
Installation
To use this script, you need to install its dependencies. You can do this by running the following command in your terminal:
pip install -r requirements.txt
Once all the dependencies are installed, you can start using the script immediately.
Usage
To run the script and retrieve rankings for your site and competitors, you'll need to make some updates in the rank.py file. In line 15 of rank.py, you will find the following input parameters:
- keyword: Keyword we want to check.
- sitename: Your website URL.
- competitors: The URLs of the competitors you want to check.
For example, if you want to check the keyword running shoes and your website is https://www.adidas.com, it should look something like this:
# inputs
keyword = 'running shoes'
sitename = "https://www.adidas.com/"
competitor1 = "https://www.nike.com"
competitor2 = "https://www.reebok.com"
competitor3 = "https://www.ascics.com"
competitor4 = "https://www.hoka.com"
Once you've updated these fields, you can run the following command in your terminal to execute the script:
python rank.py
Results
The script performs two checks: one on mobile and the other on desktop. If everything goes well, you should be able to view your ranking results as well as your competitors' rankings for both mobile and desktop.
![]()
Additionally, the script generates an Excel (.xlsx) file in the same folder where rank.py is located. The file is named after the keyword and contains two tabs: one for mobile rankings and another for desktop rankings.
For example:
| Keyword | Rank | URL | Date | Type |
|---|---|---|---|---|
| running shoes | 4 | https://www.adidas.com/us/women-running-shoes | 09-01-2024 | My Site |
| running shoes | 2 | https://www.nike.com/w/running-shoes-37v7jzy7ok | 09-01-2024 | Competitor |
| running shoes | 19 | https://www.reebok.com/c/200000012/men-running-shoes | 09-01-2024 | Competitor |
| running shoes | 8 | https://www.hoka.com/en/us/ | 09-01-2024 | Competitor |
Star History
Contributing and Questions
If you want to contribute or fix anything, please do so.
If you have any questions or need help setting this up, please open an issue, and will try to help.
探索相关项目
加载中…
