root/experimental/erwan/dailymotion/dailymotion.xml

Revision 14519, 3.0 kB (checked in by erwan, 1 year ago)
Add dailymotion
Line 
1 <?xml version="1.0" encoding="utf-8"?>
2 <service name="dailymotion"
3          version="$Id$"
4          xmlns="http://www.flock.com/web-detective#">
5
6   <strings>
7     <string name="domains" value="facebook.com"/>
8     <string name="userlogin">
9       <![CDATA[http://www.facebook.com/login.php]]>
10     </string>
11     <string name="userprofile">
12       <![CDATA[http://www.facebook.com/profile.php?id=%accountid%]]>
13     </string>
14   </strings>
15
16   <sessioncookies>
17     <cookie host=".facebook.com" name="c_user" path="/"/>
18     <cookie host=".facebook.com" name="ljsession" path="/"/>
19   </sessioncookies>
20
21   <detect type="loggedin">
22     <url domain="facebook.com"/>
23     <xpath><![CDATA[//div[@id="navigator"]//li/a/@href[contains(.,"logout")]]]></xpath>
24   </detect>
25
26   <detect type="loggedout">
27     <cookie nomatch="true" host=".facebook.com" name="xs"/>
28     <cookie nomatch="true" host=".facebook.com" name="c_user"/>
29   </detect>
30
31   <detect type="loggedout">
32     <url domain="facebook.com"/>
33     <xpath><![CDATA[//div[@id="navigator"]//li/a/@href[contains(.,"login")]]]></xpath>
34   </detect>
35
36   <detect type="accountinfo">
37     <url domain="facebook.com"/>
38     <regexp re1="accountid">
39       <![CDATA[/profile.php.id=(\w+). class/]]>
40     </regexp>
41   </detect>
42
43   <detect type="login">
44     <url domain="facebook.com"/>
45     <form>
46       <field extractas="username"
47              fieldid="email"
48              tagname="input"
49              type="text" />
50       <field extractas="password"
51              fieldid="pass"
52              tagname="input"
53              type="password" />
54     </form>
55   </detect>
56
57   <!-- media discovery -->
58
59   <detect type="person">
60     <!-- http://www.facebook.com/profile.php?id=123456789&ref=nf -->
61     <url domain="facebook.com">
62       <regexp re1="userid">
63         <![CDATA[/profile\.php.+id=([0-9]+)/]]>
64       </regexp>
65     </url>
66   </detect>
67
68   <detect type="photo">
69     <!-- http://www.facebook.com/photo.php?pid=752998&id=737755410 -->
70     <url domain="facebook.com">
71       <regexp re1="userid">
72         <![CDATA[/photo\.php.+id=([0-9]+)/]]>
73       </regexp>
74     </url>
75   </detect>
76
77   <!-- "Flock is requesting access." -->
78   <detect type="apiAuth1">
79     <conditions>
80       <regexp><![CDATA[/id="agree" name="agree" value="I agree"/]]></regexp>
81     </conditions>
82     <results>
83       <regexp re1="postUrl"><![CDATA[/<div id="tosform"><form method="post" action="(.+?)"/i]]></regexp>
84       <regexp re1="formId"><![CDATA[/name="post_form_id" value="(.+?)"/]]></regexp>
85     </results>
86   </detect>
87
88   <!-- "You've granted access to Flock previously. Flock is requesting continued access." -->
89   <detect type="apiAuth1">
90     <conditions>
91       <regexp><![CDATA[/div id="confirm_button" class="confirm_button confirming_grant"/]]></regexp>
92     </conditions>
93     <results>
94       <regexp re1="postUrl"><![CDATA[/<form method="post" action="(.+?)" name="confirm_grant_form"/i]]></regexp>
95       <regexp re1="formId"><![CDATA[/name="post_form_id" value="(.+?)"/]]></regexp>
96     </results>
97   </detect>
98
99   <detect type="apiAuth2">
100     <regexp><![CDATA[/Logged in<\//]]></regexp>
101   </detect>
102
103 </service>
Note: See TracBrowser for help on using the browser.