cinemagoer / cinemagoerng

A redesign of Cinemagoer (experimental).
GNU General Public License v2.0
6 stars 1 forks source link

Add support for scraping parental guide page #6

Closed mhdzumair closed 2 months ago

mhdzumair commented 3 months ago

This pull request adds support for scraping the parental guide page. It includes changes to the code that allow parsing and updating the certification and advisories of a title. The changes also include new data classes for Certification, Certificate, Advisories, Advisory, SpoilerAdvisory, and Votes. These changes enable the extraction and storage of information related to parental guidance for titles.

mhdzumair commented 3 months ago

@uyar Review & approve this, ill create other PR after merging this.

uyar commented 3 months ago

Thanks, I'll check soon. But at first glance, the ruff format commit is a problem because it's touching parts of the code that are irrelevant to the purpose of this PR. At the moment, I don't want autoformatters in this project, so no black and also no ruff format for now. I want to see the lint reports and resolve them manually.

It's not a big problem, I'll just skip that commit and cherry pick the others.

mhdzumair commented 3 months ago

Could you format the complete code base with auto formatters first, so that I don't need to add those format commit in here? Also, cherry-picking the stuff is a bit hard to manage. We need a proper standard, if we're complying to a style guide.

Also without formatting, the ruff format checker failing.

uyar commented 3 months ago

If I can find an auto formatter that I can configure to my style, I'll do that. But black and ruff are not it. I'll consider it again, though.

uyar commented 3 months ago

If I can find an auto formatter that I can configure to my style, I'll do that. But black and ruff are not it. I'll consider it again, though.

yapf seems to be the closest that I can configure as I like. I will try to get that out of the way first.

mhdzumair commented 3 months ago

Cool, I'm waiting to get this merge as well as other two features.

After that, I need to get the search feature. Any plan do you have?

uyar commented 3 months ago

I'd like to finalize the infrastructure so that parsers won't have to be modified every so often. Firstly, getting piculet ready for a release and converting it to an external dependency. Then coming up with a way of mapping pieces of data to their sources. Which data comes from which page? If I update the data from a page which pieces are now finalized and don't need to be updated anymore? So, basically, the update function. I haven't been able to figure out a proper way yet.

Search is a popular feature. It would be nice to have it implemented.

uyar commented 2 months ago

I ended up for settling on ruff format. Tests have a different configuration than the main sources. After this one, hopefully your changes will be merged without editing. Just make sure to keep a PR to a specific purpose.

I didn't have time to do an in-depth review but everything looks OK and I didn't want to block this any longer. So I've merged your changes on a separate branch with my format modifications.

Thanks again!