HELP!!!! Return “500 Internal Server Error” when sending this FormRequest

1,055 views
Skip to first unread message

lzhshen

unread,
Oct 24, 2010, 9:06:06 AM10/24/10
to scrapy-users
I construct the FormRequest according to Firefox's httpFox addon's
content. However, the log alway returns 500 error.
Could someone help me on this?

Here is the original url: http://www.intel.com/jobs/jobsearch/index_ne.htm?Location=200000008

Here is my spider's skeleton:

class IntelSpider(BaseSpider):
name = "intel.com"
allowed_domains = ["taleo.net"]
def start_requests(self):
req_china = FormRequest("https://intel.taleo.net/careersection/
10020/moresearch.ajax",
headers={'Host' : 'intel.taleo.net'}
formdata={'iframemode': '1',
'ftlpageid':
'reqListAdvancedPage',
'ftlinterfaceid':
'advancedSearchFooterInterface',
'ftlcompid': 'SEARCH',
... # commentsThere are
a lots of data here.#
'location1L2': '-1',
'dropListSize': '25',
'dropSortBy': '10'},
callback=self.test)

return [req_china]

def test(self, response):
print response.body # the log alway returns "500 Internal
Server Error"
return

Steven Almeroth

unread,
Oct 25, 2010, 7:40:32 AM10/25/10
to scrapy-users
Why have you created another discussion with the same question?

http://groups.google.com/group/scrapy-users/browse_thread/thread/381f48ca15c8f90d

httpFox will show you the rendered markup as it appears after all the
JavaScript code has executed; but, Scrapy will not execute the
JavaScript to build the <iframe>. You will have to make a Request to
the value of URL separately or use a JS engine like SpiderMonkey to
render the script first.

<script language="javascript" type="text/javascript">
document.write('<iframe src="'+URL+'" name="main_content"
frameborder="no" marginwidth="10" marginheight="5" scrolling="yes"
width="920" height="610"></iframe>');
</script>
Reply all
Reply to author
Forward
0 new messages