![]() |
#1 |
Enthusiast
![]() Posts: 47
Karma: 10
Join Date: Jul 2019
Device: none
|
Metadata download create limit
Is there a way to create a metadata download limit when fetching metadata from the website?
I happen to have a lot of books to fetch metadata for but happen to get IP banned from the website for sending too many requests. I would like to limit the metadata download to be limited to 1 request every 5 seconds for example. |
![]() |
![]() |
![]() |
#2 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,048
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
![]() |
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
It already does that.
|
![]() |
![]() |
![]() |
#4 |
Enthusiast
![]() Posts: 47
Karma: 10
Join Date: Jul 2019
Device: none
|
Is there a way to set the limit? As it seems to fetch too fast and I'll try increasing it if possible
|
![]() |
![]() |
![]() |
#5 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
No, you'd have to run from source and personally, I wouldn't bother. The services keep tuning the parameters of their bot detection. Just pause once you start getting the errors and resume in a few hours.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,048
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Just queue as a bunch of small batches (~10). That also has the advantage if you crash of only losing that (active) batch of data. A crash loses all un posted data
|
![]() |
![]() |
![]() |
#7 | |
Enthusiast
![]() Posts: 47
Karma: 10
Join Date: Jul 2019
Device: none
|
Quote:
Is there really no way to implment it on my side for creating a download metadata limit per book? Or if possible add in time.sleep(10) in the metadata plugin would this work? Last edited by yamusing; 12-27-2022 at 06:10 PM. |
|
![]() |
![]() |
![]() |
#8 |
Enthusiast
![]() Posts: 47
Karma: 10
Join Date: Jul 2019
Device: none
|
|
![]() |
![]() |
![]() |
#9 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,048
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
![]() |
![]() |
![]() |
#10 | |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Quote:
|
|
![]() |
![]() |
![]() |
#11 | |
Enthusiast
![]() Posts: 47
Karma: 10
Join Date: Jul 2019
Device: none
|
Quote:
|
|
![]() |
![]() |
![]() |
#12 |
Enthusiast
![]() Posts: 47
Karma: 10
Join Date: Jul 2019
Device: none
|
It seems to work well when putting in the time.sleep(60) for the metadata plugin and queuing batches of 8 books each for metadata download. Its a bit less automated though if there is a better way to go about this? as I have to keep selecting 8 books and download metadata
|
![]() |
![]() |
![]() |
#13 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I told you how you can implement site specific rate limiting in the plugin. Not sure what else you are asking.
|
![]() |
![]() |
![]() |
#14 |
Enthusiast
![]() Posts: 47
Karma: 10
Join Date: Jul 2019
Device: none
|
|
![]() |
![]() |
![]() |
#15 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Look inside the same file for examples of its use. You basically use it in a with statement that contains any calls to the remote service.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Size limit of metadata.calibre file? | thundermonkey | KOReader | 2 | 06-27-2022 10:19 AM |
Limit metadata download to single field | zakman | Library Management | 1 | 04-24-2022 06:58 PM |
ebook download limit | Ricky D'Angelo | Amazon Kindle | 17 | 08-14-2018 11:35 PM |
limit download | dream46go | Calibre | 11 | 08-06-2014 06:27 PM |
Limit download/unread messages | nlundberg | Recipes | 3 | 02-04-2013 02:56 PM |