auino / cookidump

Easily dump cookidoo recipes
MIT License
146 stars 34 forks source link

New style of class names breaks cookidump #27

Closed ndjc closed 1 year ago

ndjc commented 1 year ago

Cookidoo has changed the nature of many of the class names they use for the query results.

For example, the class of the div containing the number of query results is now class="opacity-80 lg:ml-2" - presumably generated by a content management system. These changes break the current way that cookidump tries to parse the HTML.

While it would be possible to update cookidump to look for the new class names, I'm not sure that's a viable long term solution. Since those class names are probably machine generated, they probably can and will change frequently, leading to a large burden of maintenance for cookidump. We may need to look for a more flexible parser, using more content-based logic to find the tags of interest to us.

Any ideas are welcome!

btw, note that this change to the class names currently affects the query results page, but not yet the collection-based pages - so my fork that gathers recipes in collections is not yet impacted. However, I strongly suspect that is a matter of time only.

ArtReyG commented 1 year ago

Just ran into the very same issue. Thought it was a matter of the browser I was using, but in Chrome it is as you mention. The code breaks in the first search:

selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"tag name","selector":"base"}

@auino Any thoughts on this?

cofw2005 commented 1 year ago

I have the same problem.

auino commented 1 year ago

It has been fixed in the latest version.