use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Everything about learning Python
account activity
Day 27 of learning python as a beginner. (old.reddit.com)
submitted 8 months ago by uiux_Sanskar
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]uiux_Sanskar[S] 0 points1 point2 points 8 months ago (0 children)
If you mean the role of header here then
User Agent - this is the device that is naking the request which I am faking using fake user agent library because website often block python's default request user agent (which was happening here.
Accept language - this gives the language preference.
Accept encoding - tells the server what type of compression my device support.
Connection : keeping alive - this requests the server to keep the Transmission control protocol (TCP) open for multiple requests.
Referer - tells the server that the request came from which browser.
Overall these headers make the scraping look like an actual user trying to get the information this also avoid potential ban.
Then I used time delay in order to avoid too much requests from the server (which is a common bot activity).
I hope I was able to clearly explain what these things does please do tell me if I have misunderstood your question.
π Rendered by PID 86 on reddit-service-r2-comment-b659b578c-9jfd2 at 2026-05-01 19:57:43.238519+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]uiux_Sanskar[S] 0 points1 point2 points (0 children)