Closed InigoMarin closed 4 years ago
Hi @InigoMarin, thx for interest to the project!
I just checked on the latest version the search engine with a snippet that looks correct.
from pornhub_api import PornhubApi
api = PornhubApi()
response = api.search.search("nice", page=3)
print(response.videos[0].title)
response = api.search.search("nice", page=1)
print(response.videos[0].title)
>>> Asian f*cking nice big tiits
>>> Thick Step Sis Weird Game - "Challenge you to not get a boner" S10:E5
Can I see the whole context of using search? It may well turn out that there is much less data than the requested page and api works strangely, always returning data “from the last page”
Hi @Derfirm, thx for your respond.
def search(text):
data = api.search.search( text,ordering="mostviewed",period="weekly",)
for vid in data.videos:
print(vid.title,";",vid.url)
I have revised the code again and delete period in search.
The problem was mine.
I have this in my code.
data = api.search.search( text,thumbsize="small",page=3)
I always get the same result by changing the page.
What am I doing wrong?