Added files for Facebook-DP-Downloader#1065
Added files for Facebook-DP-Downloader#1065noviicee wants to merge 0 commit intoavinashkranjan:masteravinashkranjan/Amazing-Python-Scripts:masterfrom
Conversation
kaustubhgupta
left a comment
There was a problem hiding this comment.
Remove the fb_dps folder. Look at these changes:
Facebook-DP-Downloader/Readme.md
Outdated
| ## Modules used: | ||
| --------------- | ||
| * os | ||
| * request |
There was a problem hiding this comment.
remove this section and add the requirements.txt file. Ref this file for example: https://github.com/avinashkranjan/Amazing-Python-Scripts/blob/master/Amazon-Price-Alert/requirements.txt
|
|
||
| for i in range(4,11): | ||
| # range here can vary, but the number should be a valid fbid | ||
| result=requests.get(url.format(i)) | ||
| with open("fb_dps/{}_img.jpg".format(i),"wb") as file: | ||
| file.write(result.content) |
There was a problem hiding this comment.
What is this logic? With this code, only images specified by you will be downloaded. Take user id input from the user and then download.
Also, handle this exception:
{"error":{"message":"An access token is required to request this resource.","type":"OAuthException","code":104,"fbtrace_id":"ApCkvkg1LmRyLUbzMdgZxiq"}}
There was a problem hiding this comment.
There was a problem hiding this comment.
If the program is not giving extra errors and working at your end then it's fine. Also, why are you doing this in a loop? The user will pass the Facebook id and only that picture should be downloaded. No bulk downloading!
There was a problem hiding this comment.
If the program is not giving extra errors and working at your end then it's fine. Also, why are you doing this in a loop? The user will pass the Facebook id and only that picture should be downloaded. No bulk downloading!
okay 馃憤
|
|
||
| except OAuthException as e: | ||
| print("An access token is required to request this resource.") | ||
|
|
There was a problem hiding this comment.
Also, I tried downloading some pictures, some files were also shown but they didn't opened, showed the error. I tried the number 4 and it downloaded that only. Except this, none of the files were downloaded.
There was a problem hiding this comment.
The profile pictures will only get downloaded if the respective Facebook profile exists for the corresponding Facebook user id entered (the profile does may/may not exist for every numerical value) , and if exists then, is public along with no profile picture guard set.
Also no pictures will get downloaded for Facebook ids below 4, since there exists no such id.
There was a problem hiding this comment.
okay, got it. Make the changes suggested excluding this
|
I am sorry |
you closed the PR, may I know the reason? |
I just pushed new commits and the PR was closed indicating that there are 0 commits on this PR. |
yes make a new PR |
Okay 馃憤 |
Description
Please include a summary of the change and which issue is fixed. List any dependencies that are required for this change.
Fixes #1055
Type of change
Please delete options that are not relevant.
Checklist:
README.mdTemplate for README.mdrequirements.txtfile if needed.Project Metadata
If there is no-file/nothing to fill the below fields with, then type: noneExample:If no requirements.txt needed/present, then type none inRequirments.Category:
Title: Facebook-DP-Downloader
Folder: Facebook-DP-Downloader
Requirements: None
Script: fb_dp_downloader
Arguments: None
Contributor: noviicee
Description: Download the profile picture of any public profile on facebook by just it's fbid.