Skip to content

About

Python parser for phpMyAdmin tables via HTTP scraping with session-based authentication

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

web-scraping-phpmyadmin

Python parser for scraping testDB.users table from phpMyAdmin.

Project Structure

WebTest/
├── logs/                       # Execution logs (created automatically)
├── src/
│   ├── http/                   # HTTP clients and API interaction
│   │   ├── pma_client.py       # Core phpMyAdmin logic
│   │   └── request_handler.py  # Base HTTP client
│   ├── utils/                  # Helper utilities
│   │   ├── config_loader.py    # Config loader
│   │   ├── logger.py           # Logging setup
│   │   ├── parsers/            # HTML/response parsers
│   │   └── printer.py          # Formatted output
│   ├── models.py               # Data classes
│   └── main.py                 # Entry point
├── config.ini                  # Configuration parameters
└── README.md

Requirements

  • Python 3.8+
  • Dependencies:
  requests>=2.25.1
  beautifulsoup4>=4.9.3

Installation & Setup (Windows)

1. Install Python

  • Download Python 3.8+ from the official site
  • Important: Check "Add Python to PATH" during installation
  • Verify installation:
  python --version

2. Set Up Virtual Environment

cd C:\path_to_project
python -m venv venv
.\venv\Scripts\activate

(In PowerShell use .\venv\Scripts\Activate.ps1)

3. Install Dependencies

pip install -r requirements.txt

Usage

  1. Configure config.ini:
   [auth]
   username = your_login
   password = your_password

   [db]
   base_url = http://185.244.219.162/phpmyadmin
   database = testDB
   table = users
  1. Run the script:
   python -m src.main

Example Output

2025-08-04 05:12:52 - __main__ - INFO - Starting application
2025-08-04 05:12:52 - __main__ - INFO - Attempting authentication
2025-08-04 05:12:53 - __main__ - INFO - Authentication successful
2025-08-04 05:12:53 - __main__ - INFO - Fetching table data: users
2025-08-04 05:12:53 - __main__ - SUCCESS - Retrieved 4 records

Table structure [testDB.users]:
Columns: ['id', 'name']

Rows: 5
1. {'id': '4', 'name': 'Алексей'}
2. {'id': '3', 'name': 'Василий'}
3. {'id': '2', 'name': 'Пётр'}
4. {'id': '1', 'name': 'Иван'}

Contact

Telegram: @SaySoGooD

About

Python parser for phpMyAdmin tables via HTTP scraping with session-based authentication

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages