Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 12-09-2020, 05:20 AM   #1
lktr45
Zealot
lktr45 knows the difference between 'who' and 'whom'lktr45 knows the difference between 'who' and 'whom'lktr45 knows the difference between 'who' and 'whom'lktr45 knows the difference between 'who' and 'whom'lktr45 knows the difference between 'who' and 'whom'lktr45 knows the difference between 'who' and 'whom'lktr45 knows the difference between 'who' and 'whom'lktr45 knows the difference between 'who' and 'whom'lktr45 knows the difference between 'who' and 'whom'lktr45 knows the difference between 'who' and 'whom'lktr45 knows the difference between 'who' and 'whom'
 
Posts: 135
Karma: 10280
Join Date: Oct 2016
Device: none
XHR request

Hello,

I'm trying to develop a personal plugin to retrieve a data from a website.

After analyzing the XHR requests, I managed to get a result using import requests on PyCharm.

Code:
import requests
header = {..., ...}
data = {..., ...}
url = "..."
response = requests.post (url, headers = header, json = data)
res_json = response.json ()
But import requests do not seem to be implemented in Calibre.
What equivalent instructions should I use in Calibre to achieve this result?

Sorry for my English. I add that my knowledge of Python is basic.

Thank you for your answers
lktr45 is offline   Reply With Quote
Old 12-09-2020, 06:46 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,319
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You use python mechanize instead, which you can get as

from calibre import browser
br = browser()

https://github.com/python-mechanize/mechanize
kovidgoyal is offline   Reply With Quote
Advert
Old 12-09-2020, 09:55 AM   #3
lktr45
Zealot
lktr45 knows the difference between 'who' and 'whom'lktr45 knows the difference between 'who' and 'whom'lktr45 knows the difference between 'who' and 'whom'lktr45 knows the difference between 'who' and 'whom'lktr45 knows the difference between 'who' and 'whom'lktr45 knows the difference between 'who' and 'whom'lktr45 knows the difference between 'who' and 'whom'lktr45 knows the difference between 'who' and 'whom'lktr45 knows the difference between 'who' and 'whom'lktr45 knows the difference between 'who' and 'whom'lktr45 knows the difference between 'who' and 'whom'
 
Posts: 135
Karma: 10280
Join Date: Oct 2016
Device: none
Thank you very much Kovid. I will try this.
lktr45 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Request lixtetraxx General Discussions 16 10-06-2013 07:03 PM
Request Please 3dusty Recipes 2 09-29-2010 07:51 PM
Help request Berni Amazon Kindle 2 08-18-2010 03:22 PM
Request remlap Interead COOL-ER 3 06-15-2010 05:30 AM
Here by request GroqitMan Introduce Yourself 2 03-19-2008 11:54 AM


All times are GMT -4. The time now is 01:02 PM.


MobileRead.com is a privately owned, operated and funded community.