You are browsing a tutorial guide for the latest Octoparse version. If you are running an older version of Octoparse, we strongly recommend you upgrade because it is faster, easier and more robust! Download and upgrade here if you haven't already done so!
Cookies are designed to record a user's browsing activities, such as log-in cookies. Octoparse also has a feature that allows you to save and use cookies to deal with certain scenarios.
Here are some scenarios where you may need to use cookies:
Temporarily save your log-in credentials (Most frequently used)
Save language settings if a certain website has multi-lingual settings
Save button clicking information for pop-ups
Save delivery location information on eCommerce websites
How to save and use cookies in Octoparse?
Take saving log-in cookies as an example; let's first complete the log-in settings in Octoparse (Reference: Scrape data behind a login). Here are the following steps after login:
1. Click Go to Web Page action in the workflow
2. Check Use cookie and then click Use cookies from the current page. Not set will be changed to Saved after you click the Use cookie from the current page. Press Apply to save it.
How to update and delete cookies?
Cookies can expire quite soon, so you may need to update your cookies saved in Octoparse.
Here are the steps to delete and update cookies.
1. Click the icon next to the Saved button to open the cookie box. Select all the text in the box and then delete it. Press Confirm to save it.
2. Press Use cookie from the current page again to retrieve the current cookie. Click Apply to save.
If you don't need cookie settings, you can just uncheck Use cookie.
Tip: If you want to clear cookies every time the website is opened, check Clear cache before loading the web page.
How to obtain cookies manually?
If you’re unable to log in to Octoparse directly, you can still obtain cookies from your browser:
Install the Cookie-Editor extension in Chrome.
Copy the cookie string from the extension.
Paste the cookie string into a custom task or template task, as shown in the video below.