Skip to content

Specifying custom cookies? #518

Answered by ato
818S asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for sharing. I've added your updated version to the wiki page.

As for the original question, I don't see an obvious way to add cookies inline in the XML but it looks like you might be able to load them from a separate cookies.txt file using something like this (modifying the existing cookieStore bean in the default config):

 <bean id="cookieStore" class="org.archive.modules.fetcher.BdbCookieStore">
   <property name="cookiesLoadFile">
      <bean class="org.archive.spring.ConfigFile">
        <property name="path" value="cookies.txt" />
      </bean>
   </property>
 </bean>

The format of cookies.txt is described in the AbstractCookieStore.readCookies() javadoc:

The input is text i…

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by ato
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
3 participants
Converted from issue

This discussion was converted from issue #387 on September 30, 2022 00:45.