Commit graph

14 commits

Author SHA1 Message Date
5e99720328
Fix image embed check in file processing
Corrected the logic for identifying image files without an embedded type
by fixing the misplaced quotation marks in the conditional. This change
ensures that the correct files are appended with proxy URLs for step
images. Additionally, removed unnecessary whitespace for cleaner code
structure.
2024-02-16 18:31:38 +01:00
bcdbf5ec69
Enhanced search integration
Refactored the project search function to dynamically construct query parameters, improving readability and maintainability. Introduced several new parameters to refine search results and included a timeout for reliability. Added logging for better debugging and transparency about the search operations.

Updated category and search routes to use the new search function capabilities, ensuring relevant results and proper exception handling. Additionally, implemented pagination support for better user experience when browsing projects.

To improve the UI, the category and project listing templates have been refreshed with a modern layout, including the use of Bootstrap classes and better organization of content.

Resolves issues with inefficient search parameter construction and user interface inconsistencies.
2024-01-31 19:22:58 +01:00
9dd8f4e2e0
Enhanced environment configuration and content fetching
Extended environment variables to allow for greater configurability and aligned debug mode detection with the new STRUCTABLES_DEBUG variable. Additionally, introduced command-line arguments for specifying Invidious instance URLs and unsafe iframe display settings.

The content fetching logic has been revised for fetching JSON data directly instead of scraping HTML, resulting in a more robust and efficient data extraction process. New templates accommodate the change and present a cleaner UI, including handling of iframes, downloads, and proper proxying of external resources.

HTML templates have been refactored to utilize better layout and styling while enhancing support for iframes and downloads, complete with the new ability to block iframe content from outside sources unless explicitly permitted. This security-focused feature protects end-users from potentially unsafe content.
2024-01-31 12:50:19 +01:00
232a1504fb
Update .gitignore and enhance project structure
- Add 'privacy.txt' to .gitignore to prevent checking it in
- Refactor data storage from arrays to dictionaries for better data handling in 'main.py'
- Include 'pathlib' import for handling filesystem paths
- Introduce new CSS and Bootstrap files providing updated styles and responsive design elements
- Modify HTML templates to use updated data structures and enhance accessibility

These changes improve code readability, maintain project consistency, and enhance the front-end presentation. This work is part of ongoing efforts to better manage project data, secure sensitive information, and provide a more robust user interface.
2024-01-17 16:43:51 +01:00
29592de90a
Refactor data fetching logic using stdlib
Removed dependencies on external libraries such as `requests`, `requests-html`, and `playwright` in favor of Python's standard libraries like `urllib` for HTTP requests and parsing functionality. A more robust and efficient data update function was introduced to scrape API keys and fetch project data using Typesense. Transitioned from a manual browser-based scraping approach to an API-based one for improved stability and performance. Added logging for better monitoring and debuggability. Error-handling now leverages `HTTPError` from `urllib.error`. Shifted the configuration of debug mode to rely on an environment variable, aligning with Twelve-Factor principles. Removed unused functions and streamlined the handling of various routes within the Flask app. This change shifts the project towards a more maintainable code base by using built-in libraries, reduces external dependencies, and improves resilience and scalability of the web scraping components.
2024-01-16 17:13:59 +01:00
e09497f471
Improve error handling 2023-07-19 08:26:45 +02:00
9807d0fba5
Merge remote-tracking branch 'upstream/main'
Replace Font Awesome Pro icon with free version
2023-06-04 08:06:54 +02:00
snowcatridge10
2798786f51 update data on startup 2023-06-03 19:16:16 -04:00
snowcatridge10
ee274a7df7 Add privacy policy 2023-06-03 18:31:55 -04:00
snowcatridge10
e9b2928299 Add chromedrivermanager 2023-06-03 18:14:29 -04:00
snowcatridge10
3d1a1f6971 commit 2023-06-03 17:27:48 -04:00
75ec8b961f
Add cron endpoint to update global_ibles 2023-06-03 09:46:28 +02:00
823a44f664
Replaced selenium with playwright
Fixed requirements
Added source links to footer
2023-06-02 14:02:40 +00:00
snowcatridge10
31f9bf6c2b first commit 2023-06-01 17:25:13 -04:00