{"id":20244534,"url":"https://github.com/alextkdev/parser_rozetka","last_synced_at":"2026-05-20T07:01:55.673Z","repository":{"id":242706580,"uuid":"808655733","full_name":"AlexTkDev/parser_rozetka","owner":"AlexTkDev","description":"This study script is designed to parse information about graphics cards from the Rozetka website and save the data to a CSV file.","archived":false,"fork":false,"pushed_at":"2024-12-13T17:19:38.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-14T01:46:40.909Z","etag":null,"topics":["beautifulsoup4","csv-parser","parser","selenium"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AlexTkDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-31T14:24:15.000Z","updated_at":"2025-01-02T19:22:48.000Z","dependencies_parsed_at":"2024-07-23T14:08:46.975Z","dependency_job_id":"85b75cad-30ee-44f1-89c1-86c596110439","html_url":"https://github.com/AlexTkDev/parser_rozetka","commit_stats":null,"previous_names":["alextkdev/parser_rozetka"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexTkDev%2Fparser_rozetka","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexTkDev%2Fparser_rozetka/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexTkDev%2Fparser_rozetka/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexTkDev%2Fparser_rozetka/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlexTkDev","download_url":"https://codeload.github.com/AlexTkDev/parser_rozetka/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241688038,"owners_count":20003387,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["beautifulsoup4","csv-parser","parser","selenium"],"created_at":"2024-11-14T09:15:56.361Z","updated_at":"2026-05-20T07:01:55.555Z","avatar_url":"https://github.com/AlexTkDev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Graphics Cards Parser for Rozetka.ua\n\n## Description\n\nThis script is designed to parse information about graphics cards from the Rozetka website and save the data to a CSV file. It uses the `selenium` library to retrieve the HTML page, `BeautifulSoup` for HTML parsing, and `csv` for data storage.\n\n## Requirements\n\n- Python 3.x\n- Libraries: `selenium`, `beautifulsoup4`, `csv`\n- WebDriver for Chrome (chromedriver)\n\n## Dependency Installation\n\nInstall the required libraries using pip:\n\n```sh\npip install selenium beautifulsoup4\n```\n\nMake sure you have `chromedriver` installed and accessible in your PATH.\n\n## Function Descriptions\n\n### `get_data_by_selenium(url: str) -\u003e str`\n\nFetches the HTML code of the page at the specified URL using Selenium.\n\n**Parameters:**\n- `url` (str): The URL of the page to load.\n\n**Returns:**\n- `str`: The HTML code of the page.\n\n### `parse_data(data: str) -\u003e list`\n\nParses data from the HTML document.\n\n**Parameters:**\n- `data` (str): The HTML code of the page.\n\n**Returns:**\n- `list`: A list of dictionaries with data about graphics cards. Each dictionary contains the following keys:\n  - `title` (str): The name of the graphics card.\n  - `href` (str): The link to the graphics card's page.\n  - `price` (int): The current price.\n  - `old_price` (int): The old price.\n\n### `save_to_csv(rows: list) -\u003e None`\n\nSaves data to a CSV file.\n\n**Parameters:**\n- `rows` (list): A list of dictionaries with data about graphics cards.\n\n**Returns:**\n- None\n\n### `main() -\u003e None`\n\nThe main function that orchestrates the process of retrieving and saving data.\n\n**Parameters:**\n- None\n\n**Returns:**\n- None\n\n### `random_sleep(min_seconds=1, max_seconds=10) -\u003e int`\n\nReturns a random sleep time in seconds.\n\n**Parameters:**\n- `min_seconds` (int): The minimum sleep time.\n- `max_seconds` (int): The maximum sleep time.\n\n**Returns:**\n- `int`: A random sleep time in seconds.\n\n## Usage Example\n\nTo run the script, execute the command:\n\n```sh\npython your_script.py\n```\n\nThe script will gather data about graphics cards from the Rozetka website and save it to a file named `videocards.csv`.\n\n## Notes\n\n- Ensure you have `chromedriver` installed and it is in your PATH.\n- The script processes pages with graphics cards using Selenium for loading pages and BeautifulSoup for parsing.\n- Data is saved in a CSV file with a `;` delimiter.\n\n## License\n\nThis project is licensed under the MIT License.\n\n\n\nЭтот проект лицензирован под лицензией MIT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falextkdev%2Fparser_rozetka","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falextkdev%2Fparser_rozetka","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falextkdev%2Fparser_rozetka/lists"}