Pinterest抓取分页参数

时间:2016-07-28 08:30:02

标签: php pagination web-scraping pinterest

我正在抓pinterest.com,因为他们不想批准我的应用程序使用他们的官方API。我能够抓取几乎所有数据:引脚,板,喜欢,粉丝等。但通常Pinterest.com只提供大约50个第一项数据。 当我向下滚动页面时,我已经分析了服务器的答案,并且它是由ajax结果加载的动态。

对服务器的请求类似于this

此请求的参数为:

_
1469685347816 数据

{"options":{"username":"humor","bookmarks":["Pz8yLjE0MDk3NDc4MTkuNzAzNzU2MTY3NTQ0ODYwfGIyN2Y2NTlmYzQ0Y2U0ZGU1YjY5ZjNkYTlkMzM3ODEyNzI5M2FiYWFhYmI3NDBlODM3ZDJkZGU2MmRhOGYwN2E
="],"is_own_profile_pins":true},"context":{}}
module_path 
App>UserProfilePage>UserProfileContent>Grid>GridItems>Pin(component_type=0, show_board=true, use_native_image_width
=true, squish_giraffe_pins=none, show_pinner=true, show_pinned_from=false, resource=PinResource(main_module_name
=null, id=703756168806524))
source_url  
/humor/pins

多个请求参数(相同page的下一个动态结果): _
1469685347818 数据

{"options":{"username":"humor","bookmarks":["Pz8yLjEzODk5NjczMDYuNzAzNzU2MTY2MjY4MjIxfDkxYzlkMDFhMDMzZmM3M2JlZTkxYzAxODAxOTNmMGM2YWVhOGE4ODFlNjVmYjkwZmI1NDkyYjBhNDk3OGM4NzA
="],"is_own_profile_pins":true},"context":{}}
module_path 
App>UserProfilePage>UserProfileContent>Grid>GridItems>Pin(show_pinner=true, show_pinned_from=false, show_board
=true, squish_giraffe_pins=none, use_native_image_width=true, component_type=0, resource=PinResource
(id=194428908887545178, main_module_name=null))
source_url  
/humor/pins

_
1469685347819 数据

{"options":{"username":"humor","bookmarks":["Pz8yLjEzODAzOTEwNzYuNzAzNzU2MTY1NjQ5NzQ0fDhkYzUwNjA3MmE3MGYzNTM3Y2MwYTBkYzIxMjY2Y2E5Y2NiMGM3MDk5ZjU1YjYxM2QwYzYzOGZiNWI2YzE4MWQ
="],"is_own_profile_pins":true},"context":{}}
module_path 
App>UserProfilePage>UserProfileContent>Grid>GridItems>Pin(show_pinner=true, show_pinned_from=false, show_board
=true, squish_giraffe_pins=none, use_native_image_width=true, component_type=0, resource=PinResource
(id=194428908887545178, main_module_name=null))
source_url  
/humor/pins

我理解1469685347819,1469685347818最有可能是分页参数,但我不知道如何正确生成它们以检索所需的分页结果。看起来1469685347部分是页面加载时的时间戳,最后一个数字是一些分页参数。

0 个答案:

没有答案