Search Results

Search found 2 results on 1 pages for 'jbernardo'.

Page 1/1 | 1 

  • Get ffmpeg information in friendly way

    - by JBernardo
    Every time I try to get some information about my video files with ffmpeg, it pukes a lot of useless information mixed with good things. I'm using ffmpeg -i name_of_the_video.mpg. There are any possibilities to get that in a friendly way? I mean JSON would be great (and even ugly XML is fine). By now, I made my application parse the data with regex but there are lots of nasty corners that appear on some specific video files. I fixed all that I encountered, but there may be more. I wanted something like: { "Stream 0": { "type": "Video", "codec": "h264", "resolution": "720x480" }, "Stream 1": { "type": "Audio", "bitrate": "128 kbps", "channels": 2 } }

    Read the article

  • beautifulsoup can't find exist href in file

    - by young001
    I have a html file like following: <form action="/2811457/follow?gsid=3_5bce9b871484d3af90c89f37" method="post"> <div> <a href="/2811457/follow?page=2&amp;gsid=3_5bce9b871484d3af90c89f37">next_page</a> &nbsp;<input name="mp" type="hidden" value="3" /> <input type="text" name="page" size="2" style='-wap-input-format: "*N"' /> <input type="submit" value="jump" />&nbsp;1/3 </div> </form> how to extract the "1/3" from the file? It is a part of html,I intend to make it clear. When I use beautifulsoup, I'm new to beautifulsoup,and I have look the document,but still confused. how to extract"1/3" from the html file? total_urls_num = soup.find(re.compile('.*/d\//d.*')) doesn't work As JBernardo said,\d should be a number,When I change to .*\d/\d.*,it doesn't work too. my code: from BeautifulSoup import BeautifulSoup import re with open("html.txt","r") as f: response = f.read() print response soup = BeautifulSoup(response) delete_urls = soup.findAll('a', href=re.compile('follow\?page')) #works print delete_urls #total_urls_num = soup.find(re.compile('.*\d/\d.*')) total_urls_num = soup.find('input',style='submit') #can't work print total_urls_num

    Read the article

1