如图,获取的data字段值很少,paging里面的next信息不全,浏览器打开时next信息是全的,但是data字段都少。
还有个问题,望老师解答,用selenium登录知乎,浏览器自动点击时会出现缺少grant_type的错误,进不去首页,网上查了下好像是oauth3.0验证什么的,不懂,我直接粘贴的浏览器cookie自己构建了一个,不然都没法调试。这是上面那个问题的链接:https://www.zhihu.com/api/v4/questions/24707923/answers?include=data%255B%252A%255D.is_normal%252Cadmin_closed_comment%25%2520%2520%2520%2520%2520%2520%2520%25202Creward_info%252Cis_collapsed%252Cannotation_action%252Cannotation_detail%252Ccollapse_reason%252Cis_sticky%252Ccollapsed_by%252Csuggest_edit%252Cc%2520%2520%2520%2520%2520%2520%2520%2520omment_count%252Ccan_comment%252Ccontent%252Ceditable_content%252Cvoteup_count%252Creshipment_settings%252Ccomment_permission%252Ccreated_time%252Cup%2520%2520%2520%2520%2520%2520%2520%2520dated_time%252Creview_info%252Crelevant_info%252Cquestion%252Cexcerpt%252Crelationship.is_authorized%252Cis_author%252Cvoting%252Cis_thanked%252Cis_nothe%2520%2520%2520%2520%2520%2520%2520%2520lp%253Bdata%255B%252A%255D.mark_infos%255B%252A%255D.url%253Bdata%255B%252A%255D.author.follower_count%252Cbadge%255B%253F%2528type%253Dbest_answerer%2529%255D.topics&limit=20&offset=0&sort_by=default
带你彻底掌握Scrapy,用Django+Elasticsearch搭建搜索引擎
了解课程