ip

Connect to Flask Server from other devices on same network

Connect to Flask Server from other devices on same network Question: Dear smart people of stackoverflow, I know this question has been asked a lot here but none of the posted solutions have worked for me as of yet. Any help here would be much appreciated: The Problem: Cannot connect to flask app server from …

Total answers: 7

How to webscrape with VPN in Python?

How to webscrape with VPN in Python? Question: I have made a Python program that webscrapes IMDB with Beautifulsoup to make a mySQL database with tables of all the top rated movies in the different categories. So far so good. My problem is that I am doing this from Norway, and many of the movie …

Total answers: 3

Writing a number in a list, IndexError: list assignment index out of range

Writing a number in a list, IndexError: list assignment index out of range Question: I would like to write a number in a list but this number comes from a variable. Indeed, I am reading packets and I am getting back the IP addresses. My list is first filled with 0 and when I got …

Total answers: 2

Verify IP string is greater or less than another IP string in python

Verify IP string is greater or less than another IP string in python Question: In a sample code I am taking start IP and end IP as input . Out of which I will create a list of IP pool. I want to add a validation that start IP should be always lesser than end …

Total answers: 3

socket.error:[errno 99] cannot assign requested address and namespace in python

socket.error:[errno 99] cannot assign requested address and namespace in python Question: My server software says errno99: cannot assign requested address while using an ip address other than 127.0.0.1 for binding. But if the IP address is 127.0.0.1 it works. Is it related to namespaces? I am executing my server and client codes in another python …

Total answers: 6

How can I get the public IP using python2.7?

How can I get the public IP using python2.7? Question: How can I get the public IP using python2.7? Not private IP. Asked By: Searene || Source Answers: Currently there are several options: ip.42.pl jsonip.com httpbin.org ipify.org Below are exact ways you can utilize each of the above. ip.42.pl from urllib2 import urlopen my_ip = …

Total answers: 7

How to sort IP addresses stored in dictionary in Python?

How to sort IP addresses stored in dictionary in Python? Question: I have a piece of code that looks like this: ipCount = defaultdict(int) for logLine in logLines: date, serverIp, clientIp = logLine.split(" ") ipCount[clientIp] += 1 for clientIp, hitCount in sorted(ipCount.items(), key=operator.itemgetter(0)): print(clientIp) and it kind of sorts IP’s, but like this: 192.168.102.105 192.168.204.111 …

Total answers: 10