Closed CaliHoya closed 6 years ago
FB completely changed the way the async calls are made. Working on a fix.
Thanks so much for making this scraper! Are there any updates on this? I will probably have to make my own scraper or pay someone to make one in the next couple days if you think this will take a while to fix.
Thanks!
Just made fixes. Let ms know if you encounter any further problems.
Unfortunately I'm getting a new error. Specifically, the code fails (as in, breaks before it even makes a csv). It looks like the error is somewhere in selenium, although it's hard to really know. Any idea what's happening? Thanks!
"selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"link text","selector":"See Ad Performance"} (Session info: headless chrome=68.0.3440.106) (Driver info: chromedriver=2.41.578706 (5f725d1b4f0a4acbf5259df887244095596231db),platform=Mac OS X 10.13.6 x86_64)"
The full stack trace is here:
File "scraper.py", line 321, in
It looks for line 191, this line (
msg = json.loads(entry['message'])
) comes up with a JSON that does not have the correct string to actually get the message info.Here's an example of the JSON I got:
{'message': {'method': 'Network.loadingFinished', 'params': {'blockedCrossSiteDocument': False, 'encodedDataLength': 0, 'requestId': 'DD950D5430F09C4BFEB8424ED5BED7E4', 'timestamp': 818170.436236}}, 'webview': '2D14C6BECC26CE08D2FF9A73AFE80232'}
I think this is the root of why the CSV output is coming up empty.