我不知道这段代码有什么问题.我正在尝试从99acres.com抓取数据.我已经通过了帖子参数.这是代码
from scrapy import Spider
from scrapy.http import FormRequest
from scrapy.selector import HtmlXPathSelector
class aagSpider(Spider):
name = "acre"
start_urls = ["http://www.99acres.com"]
def parse(self, response):
frmdata3 = {"Refine_Localities": "Refine Localities", "action": "/do/quicksearch/search", "bedroom_num": "",
"budget_max": "", "budget_min": "", "city": 4,
"class": "", "fullSelectedSuggestions": "laxmi nagar, delhi east", "isvoicesearch": "N",
"keyword": "",
"keyword_suggest": "laxmi nagar, delhi east;",
"locality_array[]": "233",
"locality_array[]": "233",
"locality_array[]": "233",
"lstAcn": "HP_R",
"lstAcnId": "0",
"np_search_type": "NL,NP,R2M",
"preference": "S",
"property_type": "23",
"refine_results": "Y",
"res_com": "R",
"search_location": "HP",
"search_type": "QS",
"searchform": …Run Code Online (Sandbox Code Playgroud) 考虑清单
temp=[
{'white': ['BlackRock Institutional Trust Company, N.A. 400 Howard Street San Francisco, CA 94105-2618', ' ', '1,741,814', '', ' ', ' ', ' 6.85%', ' ']},
{'white': ['The Banc Funds Co, LLC 20 North Wacker Drive Suite 3300 Chicago, IL 60606-3105', ' ', '1,447,529', '', ' ', ' ', ' 5.69%', ' ']},
{'blue': ['James B. Miller, Jr.', ' ', '3,413,249', '', '(1) ', ' ', '13.40%', ' ']},
{'blue': ['Major General (Ret) David R. Bockel', ' ', '41,471', …Run Code Online (Sandbox Code Playgroud)