python - How to deal with an 'endless' webpage when scraping -


i'm making scraper grab list of friends facebook scrape list of mutual friends them, goal of constructing web data. looked @ official facebook api, , doesn't seem possible decided scrape webpages.

after using mechanize login, scraped page , discovered facebook loads 20 friends @ time, loading more scroll. looked through mechanize docs, couldn't find solution. tried sleeping few seconds before souping page , didn't work either.

not sure go here, there anyway emulate scrolling in mechanize?

unless use selenium simulate actual webpage, won't able simulate "scrolling" (how scroll when there no window, therefore no window height?)

you state there's nothing in api allows fetch friends of friends, there seems api function allows fetching friend list of user.

if doesn't work either, choice track down ajax fb uses fetch next list of friends, , use fetch more information.


Comments