Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/saltiola7/programmatic_seo_python
Work in progress. Collection of python and php to help create programmatic SEO campaign
https://github.com/saltiola7/programmatic_seo_python
Last synced: about 1 month ago
JSON representation
Work in progress. Collection of python and php to help create programmatic SEO campaign
- Host: GitHub
- URL: https://github.com/saltiola7/programmatic_seo_python
- Owner: Saltiola7
- License: mit
- Created: 2024-05-16T17:34:35.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-05-16T17:38:39.000Z (8 months ago)
- Last Synced: 2024-05-16T18:47:55.592Z (8 months ago)
- Language: Jupyter Notebook
- Size: 18.6 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme
- License: LICENSE
Awesome Lists containing this project
README
>This repo is a work in progress.
# pSEO Documentation
This repo is a collection of scripts that help in creating a programmatic and automatic SEO campaign
## [main.py](main.py)This Python script automates the process of generating keyword combinations from templates and city names, and populates a database with these combinations for further use:
1. Fetch Data from ClickHouse: It retrieves data from a ClickHouse database using two specific queries: Retrieves programmatic_structure from the default.lvi_programmatic_structures table. Retrieves city names from the default.fi_cities table.
2. Generate Combinations: For each programmatic_structure retrieved, it generates combinations by replacing placeholders in the structure with each city name fetched. This is done using regular expressions to find placeholders in the structure string and replacing them with city names.
3. Insert Combinations into ClickHouse: After generating all possible combinations of structures and city names, these combinations are formatted as SQL insert values and batch-inserted back into a ClickHouse table named lvi_programmatic_keywords.
4. Configuration and Authentication: The script uses a predefined configuration for the ClickHouse database connection, including URL, username, password, and headers necessary for making HTTP requests.
5. Execution Flow: The script encapsulates the functionality in a main() function which orchestrates fetching data, generating combinations, and inserting them back into the database. This function is called when the script is executed as the main program.