You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A user of Juriscraper may want to use the defined interface through self.request. However, it does not behave as expected. I was trying to understand why the minn scraper had to redefine request_url_get, instead of just using self.request["parameters"], self.request["headers"] and self.request["verify"]. The explanation is below
A user of Juriscraper may want to use the defined interface through
self.request
. However, it does not behave as expected. I was trying to understand why theminn
scraper had to redefinerequest_url_get
, instead of just usingself.request["parameters"]
,self.request["headers"]
andself.request["verify"]
. The explanation is belowjuriscraper/juriscraper/opinions/united_states/state/minn.py
Lines 43 to 53 in 6a64534
Somewhat confusingly, there are 2 "parameters" attributes defined on AbstractSite
self.parameters
which is used only on POST requests as the data argumentjuriscraper/juriscraper/AbstractSite.py
Line 68 in 6a64534
self.request["parameters"]
which, if defined explicitly in an inheriting Site, will never be usedjuriscraper/juriscraper/AbstractSite.py
Lines 48 to 58 in 6a64534
This is due to
_download
being called by_parse
without arequest_dict
argumentjuriscraper/juriscraper/AbstractSite.py
Lines 139 to 142 in 6a64534
The effect of this, is that the existing
self.request["parameters"]
will always be deleted byprocess_request_parameters
juriscraper/juriscraper/AbstractSite.py
Lines 322 to 335 in 6a64534
Since the default is always an empty dict
juriscraper/juriscraper/AbstractSite.py
Lines 354 to 359 in 6a64534
Related to #1106 and #1064
The text was updated successfully, but these errors were encountered: