{"id":26220960,"url":"https://github.com/budavariam/traverse_facebook_galleries","last_synced_at":"2025-04-16T05:55:37.721Z","repository":{"id":28938151,"uuid":"116603659","full_name":"budavariam/traverse_facebook_galleries","owner":"budavariam","description":"It is a selenium scraper that loads an image from facebook, downloads it in full size and travels through the gallery until it arrives to the same image.","archived":false,"fork":false,"pushed_at":"2022-12-07T23:42:24.000Z","size":3258,"stargazers_count":7,"open_issues_count":6,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T05:04:54.757Z","etag":null,"topics":["download-photos","facebook","scraper","selenium","selenium-python","selenium-webdriver"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/budavariam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-07T22:20:36.000Z","updated_at":"2024-03-02T02:57:33.000Z","dependencies_parsed_at":"2023-01-14T14:00:38.238Z","dependency_job_id":null,"html_url":"https://github.com/budavariam/traverse_facebook_galleries","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/budavariam%2Ftraverse_facebook_galleries","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/budavariam%2Ftraverse_facebook_galleries/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/budavariam%2Ftraverse_facebook_galleries/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/budavariam%2Ftraverse_facebook_galleries/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/budavariam","download_url":"https://codeload.github.com/budavariam/traverse_facebook_galleries/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249205552,"owners_count":21229943,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["download-photos","facebook","scraper","selenium","selenium-python","selenium-webdriver"],"created_at":"2025-03-12T15:28:56.934Z","updated_at":"2025-04-16T05:55:37.698Z","avatar_url":"https://github.com/budavariam.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Facebook Gallery Downloader (Windows only)\n\nIt is a scraper that loads an image from facebook, downloads it in full size and travels through the gallery until it arrives to the same image.\n\nIt assumes that:\n\n* the user provided link is an opened image, not just a gallery.\n* certain style classes appear in these facebook pages\n* the user provides good login information\n\nDisclaimer: The secretly entered password is only used to pass it to selenium in the login page\n\n## Dependencies\n\n1. Uses [Python 3.6](https://www.python.org/download/releases/3.6/)\n1. Uses `selenium chromedriver`. The windows version is included in the repository, see this [link](https://sites.google.com/a/chromium.org/chromedriver/downloads) for other versions.\n    More information [here](https://sites.google.com/a/chromium.org/chromedriver/getting-started)\n1. [Google Chrome](https://www.google.com/chrome/browser/desktop/) must be installed on your computer\n1. pip\n\n## Instructions (Windows)\n\n1. the virtual environment shall be loaded like: `virtualenv -p c:\\Python36\\python.exe .ve`\n1. run `.ve.bat` to init the working directory by typing `.ve`:\n   * the webdriver will be added to the path\n   * the virtualenv will be loaded\n1. the requirements should be installed `pip install -r requirements.txt`\n1. create `options.json` file from `options_template.json`. It will be ignored by git.\n1. to leave from the virtualenv type `deactivate`\n\n## Usage\n\n1. Update the `options.json` appropriately\n1. Run `python traverse_gallery.py`\n1. Enter your password in the prompt\n\nAfter first successful login, you can save the printed cookie value to the options file, set the `force-login` field to false and then you do not have to provide your data again until your tokens are valid.\n\n## Options\n\nName | Description\n---- | ----\nloginURL | Url for the domain for session cookies, also contains the login fields.\nstart_images | Array that holds full URL address (with parameters) of one image from each downloadable gallery.\nmax_workers | Number of parallel image save processes\nusername | The credential email address, if it is not present it will be asked for. It won't be stored anywhere, only sent to selenium.\ncookies | The cookies facebook uses to authenticate the users. After login I write the current cookies to the cobsole. I recommend you to fill it with that one, but feel free to get it from another source, but it might not work as intended.\nforce_login | If `true` the login data will be requested, the password will have to be written in secretly. If `false` then the provided cookies will be used to authenticate the requests, but when no cookies are provided, then the user will be forced to sign in.\nsave_image_index | If set to `true`, then save images by their appearance order by adding a number before their names.\ndestination_dir | The destination directory of the result. Should be empty. The string does not need to contain a slash in the end.\nunique_galleries | If `true`, add timestamp to the start of the gallery folder name. Without this there is no guarantee that two galleries will be saved with different names.\n\n## Result\n\nThe galleries will be saved to a directory by the album names.\nThe directories contain the images that are inside them.\nAlso three files:\n\n* `captions.txt`: The captions of the images\n* `data.json`: All of the extracted data for further usage\n* `urls.txt`: Urls of the saved images in case of corrupted or missing downloads.\n\nIn case of errors see the log generated by the program, it might contain information about the errors.\n\n## TODO\n\nsee [todo.md](todo.md) file\n\n## History\n\nThis project came alive, because I needed to collect the images uploaded to our group, to fill up our galleries in our public site, with the original image captions included.\nI've searched for already existing solutions, but I haven't found exactly what I was looking for.\nI've found [seeya](https://github.com/seeya/Facebook-Album-Downloader)'s Facebook Gallery Downloader. I couldn't make it work, facebook has changed since its latest commits, so I tried to use a generalized solution, closely to what I would do if I had to do it manually. It inspired me to use selenium, I updated the code to python3 and added my own tweaks.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbudavariam%2Ftraverse_facebook_galleries","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbudavariam%2Ftraverse_facebook_galleries","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbudavariam%2Ftraverse_facebook_galleries/lists"}