![]() |
#1 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 () 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 |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 135
Karma: 10280
Join Date: Oct 2016
Device: none
|
Thank you very much Kovid. I will try this.
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |