Thread: Pulling source code?

  1. #1
    Registered User
    Join Date
    Mar 2011
    Posts
    1

    Pulling source code?

    New to the language, new to the forum, and totally lost. I'm trying to find a clean, easy command that pulls a string of code from youtube xhtml source. I'm trying to create an ID3 tag logger, that copies artist names and track names and translates the symbol codes into easy to read english (example: I'm Free ---> "I'm Free")
    Could any of you fine folks point me towards some reading material?
    Thanks!

  2. #2
    Registered User
    Join Date
    Nov 2010
    Location
    Long Beach, CA
    Posts
    5,909
    If you read the whole file into a string (not ideal), you can just use strstr to find the start tag you're after, then use it again to find the corresponding end tag, and extract the string in between. If you actually have to parse the XML, there are a couple good, free parsers:
    The XML C parser and toolkit of Gnome
    The Expat XML Parser

    Since you're a self-proclaimed newbie, I recommend getting a good book (C Book Recommendations), reading it chapter by chapter and working through the examples until you have a good understanding of the language.

  3. #3
    Registered User
    Join Date
    Dec 2007
    Posts
    2,675
    I'm trying to find a clean, easy command that pulls a string of code from youtube xhtml source.
    You're looking to use the wrong language then. There's no "clean, easy command" for such a thing in C. Look to a higher-level language like Python combined with Beautiful Soup for this sort of stuff. Of course there still isn't a "clean, easy command", but there are more tools available for you to use.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Seven Kingdoms I: Ancient Adversaries for Linux
    By MIH1406 in forum Projects and Job Recruitment
    Replies: 13
    Last Post: 01-17-2010, 05:03 PM
  2. How do you call another source code file?
    By nifear4 in forum C Programming
    Replies: 2
    Last Post: 10-28-2008, 12:16 PM
  3. DxEngine source code
    By Sang-drax in forum Game Programming
    Replies: 5
    Last Post: 06-26-2003, 05:50 PM
  4. Lines from Unix's source code have been copied into the heart of Linux????
    By zahid in forum A Brief History of Cprogramming.com
    Replies: 13
    Last Post: 05-19-2003, 03:50 PM
  5. Source Code Beautifier
    By Hammer in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 05-05-2002, 09:21 PM