https://github.com/wansho/baidu-url-submit
Submit url to baidu for seo.
https://github.com/wansho/baidu-url-submit
baidu-url-submit pypi-packages url-submit
Last synced: 6 months ago
JSON representation
Submit url to baidu for seo.
- Host: GitHub
- URL: https://github.com/wansho/baidu-url-submit
- Owner: wansho
- License: mit
- Created: 2019-03-01T09:07:11.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-01T11:00:34.000Z (over 7 years ago)
- Last Synced: 2026-01-02T20:59:09.151Z (6 months ago)
- Topics: baidu-url-submit, pypi-packages, url-submit
- Language: Python
- Size: 2.93 KB
- Stars: 4
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# baidu-url-submit
## Introduction
This tool help you to submit your url to baidu.
Only for python3.
The code is simple, I also use it to learn how to package python projects.
About the detail of submit url to baidu, you can visit: https://ziyuan.baidu.com/
## Install
```shell
pip install baidu-url-submit
```
## Demo
```python
import baidu_url_submit
site = "blog.wansho.cn" # your site
token = "xxx" # from https://ziyuan.baidu.com/
urls = [
"http://blog.wansho.cn/opinion/notes.html",
"http://blog.wansho.cn/reading/movie-top.html",
] # urls to submit
result = baidu_url_submit.submit(site, token, urls)
# if result == 2, it means two url submit success.
# if result < 2, it means some urls submit fail.
#
# The reason why submit fail:
# 1. The submitted url is not the url of this site.
# 2. invalid url
```
## LICENSE
[MIT](LICENSE.txt)