Skip to content
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

KeyError: 'data' #3

Open
hmpargi opened this issue Dec 12, 2019 · 3 comments
Open

KeyError: 'data' #3

hmpargi opened this issue Dec 12, 2019 · 3 comments

Comments

@hmpargi
Copy link

hmpargi commented Dec 12, 2019

hi minimax,

I try to run the program, I am getting this error.

PS D:\downloads\fbscrap> python .\fb_ad_lib_scraper.py 0%| | 0/100 [00:00<?, ?it/s]Traceback (most recent call last):
File ".\fb_ad_lib_scraper.py", line 49, in
for ad in data['data']:
KeyError: 'data'
0%|

The csv files are empty. Any Idea about this ?

@minimaxir
Copy link
Owner

That means no ads were retrieved, or an error was made in the configuration. I’ll add a more helpful output for that case.

Does your FB account have permission to access the API as noted in the README?

@hmpargi
Copy link
Author

hmpargi commented Dec 12, 2019

Yes, except the step 1, at https://www.facebook.com/ID and confirm your identity for Running Ads About Social Issues, Elections or Politics, which involves receiving a letter w/ a code at your US address and sending picture identification to Facebook.

The above step is in the process but I already created a user token https://developers.facebook.com/tools/explorer/ and configured in config.yaml.

Do you think step 1 is necessary for any to retrieve any Ad Data?

also, I left the search term: aoc as default to test.

Thanks,
Hp

@minimaxir
Copy link
Owner

All steps are necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants