File: Myspace-Profile.rb

package info (click to toggle)
whatweb 0.4.8~git20120606-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 7,956 kB
  • sloc: ruby: 53,738; sh: 577; makefile: 34
file content (70 lines) | stat: -rw-r--r-- 2,644 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
##
# This file is part of WhatWeb and may be subject to
# redistribution and commercial restrictions. Please see the WhatWeb
# web site for more information on licensing and terms of use.
# http://www.morningstarsecurity.com/research/whatweb
##
Plugin.define "Myspace-Profile" do
author "Brendan Coles <bcoles@gmail.com>" # 2011-01-16
version "0.1"
description "This plugin extracts a person's name, location, age, gender and their friends' names from their Myspace profile - homepage: http://myspace.com/"

# Notes #

	# Support for profiles using the classic theme is dismal at best.

# About 119,000,000 results for site:myspace.com intitle:"on myspace" @ 2011-01-16

# Examples #
examples %w|
http://www.myspace.com/barackobama
http://www.myspace.com/5879
http://www.myspace.com/joannaabdank
http://www.myspace.com/britneyspears
http://www.myspace.com/alexademara
http://www.myspace.com/1hef
http://www.myspace.com/topmodelprofiles
http://www.myspace.com/charlie301
http://www.myspace.com/Laurensantoine
http://www.myspace.com/fhmonline
http://www.myspace.com/dianachiafair
http://www.myspace.com/Carlee
http://www.myspace.com/bonnieconte
http://www.myspace.com/therealmercedesterrell
http://www.myspace.com/ilovekandyce
http://www.myspace.com/erikanicole2011
http://www.myspace.com/theofficialerinmcnaught
http://www.myspace.com/tonileigh
http://www.myspace.com/5659
|

# Matches #
matches [

	# Name :
	{ :version=>/<meta name="description" content="([^&]*)&#39;s profile on Myspace, the leading social entertainment destination powered by the passion of our fans." \/>/ },

	# Age :
	{ :string=>/<li class="tags even"><span class="age">([0-9]+)<\/span> \/ <span class="gender">[^<]*<\/span><\/li><li class="adr odd">/ },

	# Gender :
	{ :string=>/<li class="tags even"><span class="age">[0-9]+<\/span> \/ <span class="gender">([^<]*)<\/span><\/li><li class="adr odd">/ },

	# Location :
	{ :string=>/<li class="tags even"><span class="age">[0-9]+<\/span> \/ <span class="gender">[^<]*<\/span><\/li><li class="adr odd"><span class="locality">([^<]*)<\/span>/ },

	# Region :
	{ :string=>/<li class="tags even"><span class="age">[0-9]+<\/span> \/ <span class="gender">[^<]*<\/span><\/li><li class="adr odd"><span class="region">([^<]*)<\/span>/ },

	# Friends :
	{ :filepath=>/<span class="hcard fn n"><a class="url uid nickname" href="\/[^\"]*">([^<]*)<\/a>/ },
	{ :filepath=>/<div class="miniProfile" data-friendid="[0-9]+" data-title="([\"]*)"/ },

	# Private Profile :
	{ :regexp=>/<p class="sitesCommonSprite sitesComLock sizeS">Sorry,  the profile of [^<]* is only viewable by friends.<\/p>/, :module=>"Private Profile" },

]

end