test 중
코드
다른 코드
// Welcome to the Interactive C# Tutorial.
// Start by choosing a chapter and write your code in this window.
using System;
public class Hello
{
public static void Main()
{
Console.WriteLine("Hello, World!");
}
}
펭귄펭귄
코드
import re import sys import urllib2 import BeautifulSoup usage = "Run the script: ./geolocate.py IPAddress" if len(sys.argv)!=2: print(usage) sys.exit(0) if len(sys.argv) > 1: ipaddr = sys.argv[1] geody = "http://www.geody.com/geoip.php?ip=" + ipaddr html_page = urllib2.urlopen(geody).read() soup = BeautifulSoup.BeautifulSoup(html_page) # Filter paragraph containing geolocation info. paragraph = soup('p')[3] # Remove html tags using regex. geo_txt = re.sub(r'<.*?>', '', str(paragraph)) print geo_txt[32:].strip()
다른 코드
// Welcome to the Interactive C# Tutorial.
// Start by choosing a chapter and write your code in this window.
using System;
public class Hello
{
public static void Main()
{
Console.WriteLine("Hello, World!");
}
}
댓글
댓글 쓰기