First of all, you should use %% to insert % literal, otherwise the library will try to use all % as placeholders. Secondly, it is better to specify %s where you want to insert the values.
So your code should look like this:
cursor.execute("select * from books where name like '%%oo%%' OFFSET %s LIMIT %s", (0,1))
source share