2015-08-12, 14:58
Hello friends,
some days ago i have started a project = make a plugin video, i have made some code and play the video work fine,but now i am stuck in one part,
Going to next page,i have already try several codes but just one make a litle what i need to do,
Thanks to advance
some days ago i have started a project = make a plugin video, i have made some code and play the video work fine,but now i am stuck in one part,
Going to next page,i have already try several codes but just one make a litle what i need to do,
PHP Code:
def listar_videos(url):
codigo_fonte = abrir_url(url)
soup = bs(abrir_url(url))
content = bs(soup.find("div", { "id" : "dle-content" }).prettify())
filmes = content("div", { "class" : "short-film" })
for filme in filmes:
nome_filme = filme.img["alt"]
url = filme.a["href"].replace('Assistir ','')
img = filme.img["src"]
addDir(nome_filme.encode('utf8'),url,4,img,False,len(filmes))
#My problem is in this next line,whith this code i can go to http://blablabla.com/films/page/2/ but when i hit again to go to http://blablabla.com/films/page/3/ its goin back to http://blablabla.com/films/page/1/
pages = content("div", { "class" : "navigation" })
for page in pages:
url = page.a["href"]
addDir('Next Page >>',url,2,artfolder + 'prox.png')
Thanks to advance