Skip to content
Sign upLog in
← Back to Community

Request in python

Profile icon

In python, How can I send a request to an HTML website, in order to get a string?

like for example if the site was this:

d3290dj2390dj d0329dj2309j d2903jd03 fh3948fh3498fh h398fh39

How can I get the xth word on the site?

Answered by SixBeeps [earned 5 cycles]
View Answer
Profile icon

1.) Call the HTTP Request. It should return a response object, which contains the site's data as a string
2.) Use the split() method on that data to separate the words.
3.) Array index x-1 gets word x on the site data