View Single Post
Old 10-29-2013, 06:28 AM   #4
lucis_lupinum
Member
lucis_lupinum began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Oct 2013
Device: Kindle
Okay, I just tried to insert the function, but I am not really sure, how to pass the arguments to the function and exactly what to pass and so on.

I tried it like this:
Code:
def is_link_wanted (self, url, tag):
    tag = dict(name='a', attrs={'id':'jtoc-next'})
    if tag:
          return True
    else:
          return False
The code on the website looks like this:
Spoiler:
Code:
<ol id="list-jtoc" class="list-pages" style="display: block;">
<li><strong>1</strong></li>
<li><a id="jtoc_2" href="http://www.golem.de/news/playjams-gamestick-im-test-die-android-konsole-fuer-zwischendurch-1310-102324-2.html">2</a></li>
...
<li><a id="jtoc_next" class="icon-rsaquo" href="http://www.golem.de/news/playjams-gamestick-im-test-die-android-konsole-fuer-zwischendurch-1310-102324-2.html">&nbsp;</a></li>
</ol>

The bold element is the button for the next page, so the important part.
Sadly it doesn't work. So how should it look like? Do I have to insert the url also? But it will look different for every article...
I'm a bit uncertain now...

But thanks anyway
lucis_lupinum is offline   Reply With Quote