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

Sign up
Appearance settings

Added files for Facebook-DP-Downloader #1065

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
noviicee wants to merge 0 commits into avinashkranjan:master from noviicee:issue-1055

Conversation

Copy link
Contributor

@noviicee noviicee commented May 17, 2021

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:

Comment on lines 5 to 8
## Modules used:
---------------
* os
* request
Copy link
Contributor

@kaustubhgupta kaustubhgupta May 19, 2021

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

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

@kaustubhgupta kaustubhgupta May 19, 2021

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

@kaustubhgupta kaustubhgupta May 21, 2021

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

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

Copy link
Contributor

@kaustubhgupta kaustubhgupta May 22, 2021

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

@kaustubhgupta kaustubhgupta May 23, 2021

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 👍

Copy link
Contributor Author

I am sorry
What just happened?

Copy link
Contributor

I am sorry
What just happened?

you closed the PR, may I know the reason?

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.

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

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
Reviewers

@github-actions github-actions[bot] github-actions[bot] left review comments

+1 more reviewer

@kaustubhgupta kaustubhgupta kaustubhgupta requested changes

Reviewers whose approvals may not affect merge requirements
Assignees
No one assigned
Labels
bug Something isn't working
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Facebook Profile Picture Downloader

AltStyle によって変換されたページ (->オリジナル) /