~davidc3/onehundredscopes/youporn-precise

« back to all changes in this revision

Viewing changes to src/tiny-video-parser

  • Committer: David Callé
  • Date: 2012-04-01 01:06:10 UTC
  • Revision ID: davidc@framli.eu-20120401010610-rjj5mghbdsnlx8lo
Website change, again

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
print "########"
21
21
print "tiny-video-parser : start"
22
 
video= ''
 
22
video= None
 
23
source = None
23
24
 
24
25
uri = sys.argv[1]
25
26
print "URI=%s" % uri
27
28
tree = fromstring(results)
28
29
for a in tree.cssselect('a'):
29
30
    if 'MP4 -' in a.text_content() or 'MPG -' in a.text_content():
30
 
        if a.get('href').startswith("http://videos-"):
 
31
        if a.get('href').startswith("http://"):
31
32
            video = a.get('href')
32
33
            source = a.text_content()
33
34