{"id":18801880,"url":"https://github.com/petrsevcik/petrfd","last_synced_at":"2026-04-13T12:01:44.947Z","repository":{"id":238495965,"uuid":"504679946","full_name":"petrsevcik/petrfd","owner":"petrsevcik","description":"PetrFD is film database of top 1000 movies and its actors from http://www.csfd.cz","archived":false,"fork":false,"pushed_at":"2022-06-17T21:53:57.000Z","size":1700,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-08T01:53:05.793Z","etag":null,"topics":["csfd","docker","fastapi","movie-database","python3","sqlite3"],"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/petrsevcik.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":"2022-06-17T21:47:40.000Z","updated_at":"2022-06-19T13:09:47.000Z","dependencies_parsed_at":"2024-05-06T14:20:42.270Z","dependency_job_id":null,"html_url":"https://github.com/petrsevcik/petrfd","commit_stats":null,"previous_names":["petrsevcik/petrfd"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/petrsevcik/petrfd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petrsevcik%2Fpetrfd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petrsevcik%2Fpetrfd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petrsevcik%2Fpetrfd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petrsevcik%2Fpetrfd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/petrsevcik","download_url":"https://codeload.github.com/petrsevcik/petrfd/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petrsevcik%2Fpetrfd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31751705,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T09:16:15.125Z","status":"ssl_error","status_checked_at":"2026-04-13T09:16:05.023Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["csfd","docker","fastapi","movie-database","python3","sqlite3"],"created_at":"2024-11-07T22:25:39.106Z","updated_at":"2026-04-13T12:01:44.827Z","avatar_url":"https://github.com/petrsevcik.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# README #\n\n### PetrFD is film database of top 1000 movies and its actors from http://www.csfd.cz\n\n#### Search page ####\n\nWelcome page with input field for search in movie and actors\n\nWhen you click on \"Search\" button you will be redirected to Search result page\n\n`http://localhost:8080/`\n\n`http://localhost:8080/search`\n\n\n#### Search result page ####\nPage with search results for Actors and Movies. Contains also link to search homepage.\n\nList of Actors and Movies and links to `/actor/{name}` and `/movie/{name}` endpoints\n\n`http://localhost:8080/searchresultpage`\n\n#### Actor Page ####\nPage contains movies where actor star\n\n`http://localhost:8080/actor/{name}`\n\ne.g. `http://localhost:8080/actor/Tom%20Hanks`\n\n\n#### Movie Page ####\nPage contains list of all actors in the movie\n\n`http://localhost:8080/movie/{name}`\n\ne.g. `http://localhost:8080/movie/Forrest%20Gump`\n\n\n## Architecture ##\n\nApp is build on `FASTAPI` framework with four endpoints described above. Scrapers of `http://csfd.cz` content are in `csfd_scraper.py` file. Packages used `aiohttp`, `requests`, `beautifulsoup`. Top 1000 movies is scraped asynchronously and then each movie is scraped in single thread to avoid blocking/DDoS attack. Possible TODO - rewrite it to scrapy or make request in batches via `aiohttp`. Results from scraping are stored in `actors.csv / movies.csv` files where from they are loaded to `sqlite3` database named `petrfd.db`. \n\n**DATA ARE ALREADY IN `petrfd.db` READY TO USE**\n\nFile `database.py` contains all methods for loading movies and actors to db as well as for searching in db according to input. Actors and Movies are not changing on CSFD often so I commented out running scraper and loading data to db. Uncomment if you want fresh data.  \n\n#### Flaws of app ####\nData extraction can be done in better\u0026faster (asynchronous) way - with scrapy as well as data processing does not require middle step via `.csv` files. But I focus more on design FastAPI app its endpoints and sqlite query. Nature of this data is that they cannot be refreshed often. \n\n\n### All is ready to use via Dockerfile\n#### Commands for docker startup\nApp run on **port 8080**. Run commands, when current location is repository:\n```\ndocker build -t petrfd:1.0 .\ndocker run -d -p 8080:8080 petrfd:1.0\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetrsevcik%2Fpetrfd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpetrsevcik%2Fpetrfd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetrsevcik%2Fpetrfd/lists"}