Your code is pretty good! I do have a few tips regarding style, and such.
- As mentioned in the comments, even though it looks like you aren't, you shouldn't be trying to parse HTML with Regexesyou shouldn't be trying to parse HTML with Regexes.
- Where are your comments? While good code can be pretty readable, comments are still a valuable asset. You should probably flesh out your
page_loaderfunction with a docstring, and any unclear blocks of code with an inline comment. - If you're only going to use part of a module, e.g, one function or variable, you should do
from ... import ....
That's about all I can really think of right now. If there's anything else you want me to comment on, just mention it below, and I'll see if I can cover it. Hope this helps!