Category : browser

I’m following Programming Hero’s Web Browser tutorial https://www.youtube.com/watch?v=z-5bZ8EoKu4 and everything has been working great until I implemented the URL bar function. I get the error following: AttributeError: ‘MainWindow’ object has no attribute ‘navigate_url’ Heres the code: import sys from PyQt5.QtCore import * from PyQt5.QtWidgets import * from PyQt5.QtWebEngineWidgets import * class MainWindow(QMainWindow): def __init__(self): super(MainWindow, ..

Read more

Getting page 404 with Python Requests but I can access the page no problem through my browser. I can access other pages that are formatted exactly the same as this page and they load no problem. My Code: string_page = str(page) with requests.Session() as s: resp = s.get(‘https://bscscan.com/token/generic-tokentxns2?m=normal&contractAddress=0x470862af0cf8d27ebfe0ff77b0649779c29186db&a=&sid=f58c1cdefacc680b799412c7645ed7f7&p=’+string_page) page_info = str(resp.text) print(page_info) Source: Python..

Read more

I’m creating a Python socketserver using the module socketserver: import socketserver class MyTCPHandler(socketserver.BaseRequestHandler): def setup(self): pass def handle(self): pass with socketserver.TCPServer(("localhost", 4000), MyTCPHandler) as server: server.serve_forever() I’ve used the Python module websockets and I could access the websocket in Javascript using the WebSocket API. Without fully understanding what the Python module socketserver really does, I ..

Read more