![]() |
#1 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 495
Karma: 82764
Join Date: May 2021
Device: kindle
|
HTTP/3 support?
I see that mechanize doesn't support htttp3 requests yet.
Is it possible to do this some other way? |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,146
Karma: 22670164
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You can use the read_url() function from scraper/simple.py
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 495
Karma: 82764
Join Date: May 2021
Device: kindle
|
how do i set custom headers.
I think I'll have to learn a bit about qt, and try these things. Also we will still use mechanize when downloading images after processing html content, that I got with read_url in get_obfuscated.. so they'll also fail |
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,146
Karma: 22670164
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
What server supports HTTP/3 but not HTTP 1.1? The general solution for this is to create a new recipe class that uses a QtWebEngine as the browser. This however is a long project, instead if you need to just do a quick hack, override get_browser() in your recipe to return self. Then implement the open method in your recipe. These will be used by the fetcher to download anything including images.
Code:
def open(self, url): return read_url(self.storage, url) # here self.storage should be a list created in the __init__ method of your recipe |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Support for HTTP 308 redirects | modified | Recipes | 12 | 09-18-2023 02:39 AM |
Firmware Update Kindle discontinuing MOBI support, implementing EPUB support | nesler | Amazon Kindle | 2 | 05-04-2022 08:02 AM |
Does calibre support retry-after http headers ? | SimonMc | Library Management | 6 | 12-15-2021 11:40 AM |
[Newbie] Book cover list support? Popup footnote support | nqk | KOReader | 1 | 02-19-2016 05:23 AM |
What are: url:http|// ... urn:urn|uuid| ... uri:http|// | 44reader | Library Management | 5 | 07-05-2012 01:42 PM |