[Answered ]-Raising events and object persistence in Django

2👍

Something else to remember: You need to maintain a browser session with the remote site so that site knows which CAPTCHA you’re trying to solve. Lots of webclients allow you to store your cookies and I’d suggest you dump them in the Django Session of the user you’re doing the screen scraping for. Then load them back up when you submit the CAPTCHA.

Here’s how I see the full turn of events:

  1. User places search request
  2. Query remote site
  3. If not CAPTCHA, GOTO #10
  4. Save remote cookies in local session
  5. Download image captcha (perhaps to session too?)
  6. Present CAPTCHA to your user and a form
  7. User Submits CAPTCHA
  8. You load up cookies from #4 and submit the form as a POST
  9. GOTO #3
  10. Process the data off the page, present to user, high-five yourself.
👤Oli

0👍

request.session['name'] = variable will store it
then,

variable = request.session['name'] will retrieve it.
Remember though, its not a database, just a simple session store and shouldn’t be relied on for anything critical

👤Shayne

Leave a comment