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
Copy file name to clipboardExpand all lines: scrapling/core/translator.py
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,11 @@
1
1
"""
2
2
Most of this file is adapted version of the translator of parsel library with some modifications simply for 1 important reason...
3
-
To add pseudo-elements ``::text`` and ``::attr(ATTR_NAME)`` so we match Parsel/Scrapy selectors format
4
-
which will be important in future releases but most importantly...
5
-
so you don't have to learn a new selectors/api method like what bs4 done with soupsieve :)
6
-
> if you want to learn about this, head to https://cssselect.readthedocs.io/en/latest/#cssselect.FunctionalPseudoElement
3
+
4
+
To add pseudo-elements ``::text`` and ``::attr(ATTR_NAME)`` so we match Parsel/Scrapy selectors format which will be important in future releases but most importantly...
5
+
6
+
So you don't have to learn a new selectors/api method like what bs4 done with soupsieve :)
7
+
8
+
if you want to learn about this, head to https://cssselect.readthedocs.io/en/latest/#cssselect.FunctionalPseudoElement
"""Make basic HTTP PUT request for you but with some added flavors.
42
+
40
43
:param url: Target url
41
44
:param follow_redirects: As the name says -- if enabled (default), redirects will be followed.
42
45
:param timeout: The time to wait for the request to finish in seconds. The default is 10 seconds.
43
46
:param stealthy_headers: If enabled (default), Fetcher will create and add real browser's headers and
44
-
create a referer header as if this request came from Google's search of this URL's domain.
47
+
create a referer header as if this request came from Google's search of this URL's domain.
45
48
:param kwargs: Any additional keyword arguments are passed directly to `httpx.put()` function so check httpx documentation for details.
49
+
46
50
:return: A `Response` object that is the same as `Adaptor` object except it has these added attributes: `status`, `reason`, `cookies`, `headers`, and `request_headers`
"""Opens up a browser and do your request based on your chosen options below.
157
+
150
158
:param url: Target url.
151
159
:param headless: Run the browser in headless/hidden (default), or headful/visible mode.
152
160
:param disable_resources: Drop requests of unnecessary resources for speed boost. It depends but it made requests ~25% faster in my tests for some websites.
0 commit comments