facebook-ad-library-scraper
facebook-ad-library-scraper copied to clipboard
KeyError: 'data'
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 ?
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?
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
All steps are necessary.