import pywikibot
from pywikibot import pagegenerators

def action_one_page(page):
  print('%s'%page.title())
  print('-----------------')
  #for onelink in page.links():
  #  print(onelink.title())
  print('\n')

site=pywikibot.Site('nl')
mygenerator=pagegenerators.NewpagesPageGenerator(site,0,10)
for onepage in mygenerator:
    action_one_page(onepage)
Dennis Gaens
-----------------


Sengento
-----------------


Robert Charles Zaehner
-----------------


Psallus varians
-----------------


Henk Lampe
-----------------


WTA-toernooi van Birmingham 2004
-----------------


Visitandinnenklooster (Brussel)
-----------------


Verzetsmonument (De Nieuwe Ooster)
-----------------


Satsumadori
-----------------


Silvia B├Ąchli
-----------------


  print('%s' % 'Hoi, leuk joh!')
Hoi, leuk joh!
import urllib
from urllib.request import urlopen

website='http://www.atpworldtour.com/en/players/-/J397/overview'
#website='http://www.edoderoo.nl'
f=urlopen(website)
myfile=f.read()
print( myfile)
---------------------------------------------------------------------------
HTTPError                                 Traceback (most recent call last)
<ipython-input-25-3e623e3a03fd> in <module>()
      4 website='http://www.atpworldtour.com/en/players/-/J397/overview'
      5 #website='http://www.edoderoo.nl'
----> 6 f=urlopen(website)
      7 myfile=f.read()
      8 print( myfile)

/usr/lib/python3.6/urllib/request.py in urlopen(url, data, timeout, cafile, capath, cadefault, context)
    221     else:
    222         opener = _opener
--> 223     return opener.open(url, data, timeout)
    224 
    225 def install_opener(opener):

/usr/lib/python3.6/urllib/request.py in open(self, fullurl, data, timeout)
    530         for processor in self.process_response.get(protocol, []):
    531             meth = getattr(processor, meth_name)
--> 532             response = meth(req, response)
    533 
    534         return response

/usr/lib/python3.6/urllib/request.py in http_response(self, request, response)
    640         if not (200 <= code < 300):
    641             response = self.parent.error(
--> 642                 'http', request, response, code, msg, hdrs)
    643 
    644         return response

/usr/lib/python3.6/urllib/request.py in error(self, proto, *args)
    568         if http_err:
    569             args = (dict, 'default', 'http_error_default') + orig_args
--> 570             return self._call_chain(*args)
    571 
    572 # XXX probably also want an abstract factory that knows when it makes

/usr/lib/python3.6/urllib/request.py in _call_chain(self, chain, kind, meth_name, *args)
    502         for handler in handlers:
    503             func = getattr(handler, meth_name)
--> 504             result = func(*args)
    505             if result is not None:
    506                 return result

/usr/lib/python3.6/urllib/request.py in http_error_default(self, req, fp, code, msg, hdrs)
    648 class HTTPDefaultErrorHandler(BaseHandler):
    649     def http_error_default(self, req, fp, code, msg, hdrs):
--> 650         raise HTTPError(req.full_url, code, msg, hdrs, fp)
    651 
    652 class HTTPRedirectHandler(BaseHandler):

HTTPError: HTTP Error 403: Forbidden
import pywikibot
from pywikibot import pagegenerators

def action_one_page(page):
  print('%s'%page.title())
  #print('-----------------')
  #for onelink in page.links():
  #  print(onelink.title())
  #print('\n')

site=pywikibot.Site('nl')
cat=pywikibot.Category(site,'Hackersfestival')
mygenerator=pagegenerators.CategorizedPageGenerator(cat,10)
for onepage in mygenerator:
  action_one_page(onepage)
DEF CON
Galactic Hacker Party
Hackers at Large
Hacking at Random
Hacking at the End of the Universe
Hacking in Progress
Observe. Hack. Make.
Still Hacking Anyway
What the Hack