class User - should convert to a class that includes a UserScarpper and arrange it to tables in dictionaries.
module working_with_database - the module will covert to one module with the class "database" that has a constructor with the engine, cursor, etc. this class will contain all the methods for query and commit when working with the database
This fixture is part of the rejects we got on milestone 3 reviews:
Still mixing scraper code with DB functions. As mentioned in Check Point 2
"Code should be separated into modules / classes / files - separate class for DB handling, html scraping, main
file as entry point, etc. In your case the class User is violiting this since it has scraper and DB code
(with help of sqlalchemy). A possible solution to solve this is to define a class UserDB. An instance of
UserDB will have the data of the corresponding instance User and call the funtion insert_user.
Give priority to fixing this."
Since User inherents from UserScraper and UserScraper has access to scraper functions (inside init) you are mixing.
User
- should convert to a class that includes aUserScarpper
and arrange it to tables in dictionaries.This fixture is part of the rejects we got on milestone 3 reviews: