Help with libsoup and

Hello, Eolie is using phishtank to get it phishing database. Since some time, getting data from URI below is not working anymore.

I do not understand what is happening, when executing code below, I can see in returned data: Please enable cookies.

Getting this URI with “curl -L” and wget works.

from gi.repository import Soup

session =
session.set_property("accept-language-auto", True)
jar ="/tmp/jar.txt", False)
request = session.request(uri)
bytes = st.read_bytes(1024, None)
data = bytes.get_data()
while data:
    bytes = st.read_bytes(1024, None)
    data = bytes.get_data()

Thanks for help!

Not sure this answer is going to help but the your URI does a double redirection using the Location HTTP header, the first one to the https version of the same URI.

My wild guesses:

  1. they added https support and check the cookies there, while your /tmp/jar.txt file is still http based (cookies for http or https protocols can be different);
  2. they check cookies on the last redirect, in which case you should generate the cookies dynamically or you must hardcode the target URI in both your code and your cookies text file;
  3. you must not send cookies (e.g. curl works without sending any cookie);
  4. PhishTank changed their API;

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.