Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Added files for Facebook-DP-Downloader#1065

Closed
noviicee wants to merge 0 commit intoavinashkranjan:masteravinashkranjan/Amazing-Python-Scripts:masterfrom
noviicee:issue-1055noviicee/Amazing-Python-Scripts:issue-1055Copy head branch name to clipboard
Closed

Added files for Facebook-DP-Downloader#1065
noviicee wants to merge 0 commit intoavinashkranjan:masteravinashkranjan/Amazing-Python-Scripts:masterfrom
noviicee:issue-1055noviicee/Amazing-Python-Scripts:issue-1055Copy head branch name to clipboard

Conversation

@noviicee
Copy link
Contributor

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.

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the style guidelines(Clean Code) of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have created a helpful and easy to understand README.md
  • My documentation follows Template for README.md
  • I have added the project meta data in the PR template.
  • I have created the requirements.txt file if needed.

Project Metadata

If there is no-file/nothing to fill the below fields with, then type: none

Example: If no requirements.txt needed/present, then type none in Requirments.

Category:

  • Calculators
  • AI/ML
  • Scrappers
  • Social_Media
  • PDF
  • Image_Processing
  • Video_Processing
  • Games
  • Networking
  • OS_Utilities
  • Automation
  • Cryptography
  • Computer_Vision
  • Fun
  • Others

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.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congratulations!! for making your first PR at Amazing-Python-Scripts, our mentors will review it soon.

Copy link
Contributor

@kaustubhgupta kaustubhgupta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the fb_dps folder. Look at these changes:

Facebook-DP-Downloader/Readme.md Outdated Show resolved Hide resolved
Facebook-DP-Downloader/Readme.md Outdated Show resolved Hide resolved
Comment on lines +5 to +8
## Modules used:
---------------
* os
* request
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Facebook-DP-Downloader/Readme.md Outdated Show resolved Hide resolved
Facebook-DP-Downloader/Readme.md Outdated Show resolved Hide resolved
Facebook-DP-Downloader/Readme.md Outdated Show resolved Hide resolved
Facebook-DP-Downloader/fb_dp_downloader.py Outdated Show resolved Hide resolved
Facebook-DP-Downloader/fb_dp_downloader.py Outdated Show resolved Hide resolved
Comment on lines +27 to +32

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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"}}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kaustubhgupta

updated

will this be fine for the last change requested..?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 馃憤

@kaustubhgupta kaustubhgupta added the bug Something isn't working label May 19, 2021
Facebook-DP-Downloader/Readme.md Outdated Show resolved Hide resolved
Facebook-DP-Downloader/fb_dp_downloader.py Outdated Show resolved Hide resolved
Facebook-DP-Downloader/fb_dp_downloader.py Outdated Show resolved Hide resolved
Facebook-DP-Downloader/fb_dp_downloader.py Outdated Show resolved Hide resolved

except OAuthException as e:
print("An access token is required to request this resource.")

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay, got it. Make the changes suggested excluding this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay 馃憤

@noviicee
Copy link
Contributor Author

I am sorry
What just happened?

@kaustubhgupta
Copy link
Contributor

I am sorry
What just happened?

you closed the PR, may I know the reason?

@noviicee
Copy link
Contributor Author

I am sorry
What just happened?

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.
It is not reopening..shall I create a new one?
I have the file containing all the changes requested earlier.

@kaustubhgupta
Copy link
Contributor

I am sorry
What just happened?

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.
It is not reopening..shall I create a new one?
I have the file containing all the changes requested earlier.

yes make a new PR

@noviicee
Copy link
Contributor Author

I am sorry
What just happened?

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.
It is not reopening..shall I create a new one?
I have the file containing all the changes requested earlier.

yes make a new PR

Okay 馃憤

@noviicee noviicee deleted the issue-1055 branch May 24, 2021 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Facebook Profile Picture Downloader

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.