import requests
from bs4 import BeautifulSoup
url = "http://www.whatsmyip.org"
for x in range(0,5):
response = requests.get(url).content
soup = BeautifulSoup(response,'lxml')
result = soup.findAll('h1')
for each in result:
print each.text
break
Output:
Your IP Address is 19.12.86.57
Your IP Address is 151.138.87.69
Your IP Address is 108.206.165.11
Your IP Address is 148.84.71.226
Your IP Address is 50.201.205.131
Why does python requests module give dynamic ip?
427 Views Asked by Varun Talikoti At
1
There are 1 best solutions below
Related Questions in PYTHON-REQUESTS
- Invalid URL: No host supplied : error while using Request.get(url) in Python
- compare python requests with curl
- Python Requests just got very slow, better alternative?
- I want to create file in azure share using python PUT requests but getting error signature not correct including headers
- python requests SSLError
- Python-Requests Chunked XML Data Returns only First 2 Lines of Data
- Reusing connections in Django with Python Requests
- Log in to website behind CloudFlare using Python Requests
- Python requests throwing SSLError while using local certificate
- Python web request slow through Proxy
- Google redirects query request 503 error
- Python child process silently crashes when issuing an HTTP request
- Alternative to using mechanize to fetch data?
- http 500 error when attempting to make a post request with python requests module
- Getting cookies with requests
Related Questions in DYNAMIC-IP
- How to check if username is valid on a ssh server
- Get Dynamic ip address Java?
- Raspberry Pi, DD-WRT and dynamic IP (No-IP) setup
- Are a page's images calculated as requests in Dynamic IP Restrictions?
- How work with socket and hostnames in Java?
- Reach Azure SQL database with dynamic IP addresses
- Central logs on personal laptop?
- Dynamically get the correct IP for a Redis pod on Kubernetes
- CodeIgniter: Alternate method for sess_match_ip is set true for dynamic IP address
- how can i assign my host ip address into kubernetes configmap?
- Receiving HTTP request from single email but varying IP addresses?
- how to simulate modem disconnection to change ip address programatically
- Require forward-dns not working as expected
- create a client-server application in java where both machines can have Dynamic IP addresses
- Assigning Multiple ips to a NIC using powershell
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I think its not about python, but about whatsmyip.org ;) Some method probably in which they detect and try to prevent scripting.
Tried some other website and always got my public IP. Example: