Skip to content

Instantly share code, notes, and snippets.

@norweeg
norweeg / square-of-integers.ipynb
Created Apr 17, 2021
square of integers.ipynb
View square-of-integers.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@norweeg
norweeg / iter-and-zip-example.ipynb
Created Mar 24, 2021
iter and zip example.ipynb
View iter-and-zip-example.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@norweeg
norweeg / Renderer.py
Last active Oct 2, 2018
A simple HTML renderer module useful for retrieving JS-rendered HTML for scraping written using PyQt5
View Renderer.py
from PyQt5 import QtCore, QtWidgets, QtWebEngineWidgets
from queue import Queue
class Renderer(QtWebEngineWidgets.QWebEnginePage):
def __init__(self,profile=None,parent=None):
super().__init__(profile,parent)
self._result_queue=Queue(maxsize=1)
self.loadFinished.connect(lambda: self.toHtml(self._result_queue.put))
def render(self,url):