我写了下面的scrapy蜘蛛,但是在初始请求之后它没有继续爬行过程,尽管我已经let jsonObject = try JSONSerialization.jsonObject(with: data, options: [])
guard let jsonDictionary = jsonObject as? [String: Any],
let photos = jsonDictionary["photos"] as? [String: AnyObject], // this line is giving the error
let photosArray = photos["photo"] as? [[String: Any]] else {
print("Error")
}
print(jsonDictionary)
更多yield
s用于scrapy跟随。
scrapy.Request
答案 0 :(得分:2)