ukscotth 1 Posted August 31, 2010 Report Share Posted August 31, 2010 Hi, Im trying to grab the code out of this bit of text but i cant get it working, ive tried using the replace command to replace the text before and after with nothing but the linebreaks seem to mess it up, any ideas ? ----------------------------------------------------- Hi Kelly, You have recently been asked to verify your Facebook account with a security code. Your Facebook security code is 479465. To verify your account, please paste this code on the page that requested it. If you have not been asked to provide a Facebook security code, then there may have been an unauthorised attempt to access your account. As a security precaution, please change your Facebook account password at https://register.facebook.com/editaccount.php . Thanks,The Facebook Team Quote Link to post Share on other sites
IRobot 43 Posted August 31, 2010 Report Share Posted August 31, 2010 The text looks like an email. If it's webmail (gmail/yahoo) you could try using a page scrape. Quote Link to post Share on other sites
ukscotth 1 Posted August 31, 2010 Author Report Share Posted August 31, 2010 Hi, Yes its an email. It is a simple webmail yep so scraping from it isnt a problem, the problem im having is getting it to just scrape the code so I can set it in a variable Quote Link to post Share on other sites
IRobot 43 Posted August 31, 2010 Report Share Posted August 31, 2010 Hi, If all emails are in the same format, then have you tried (for example) just page scraping: "Your Facebook security code is 479465. To verify your account, pleasepaste this code on the page that requested it." So that, the left bit contains "Your Facebook security code is " and the right bit contains: ". To verify your account" This should get the code you require. Quote Link to post Share on other sites
ukscotth 1 Posted August 31, 2010 Author Report Share Posted August 31, 2010 thanks mate thats what i thought but its giving me a blank result for some reason. I must be doing something stupid. When im doing a page scrape i dont have to choose by attribute before do i ? Quote Link to post Share on other sites
IRobot 43 Posted August 31, 2010 Report Share Posted August 31, 2010 Hi mate, The sequence is usually: choose by attributeadd to list > Content > $page scrape Quote Link to post Share on other sites
ukscotth 1 Posted August 31, 2010 Author Report Share Posted August 31, 2010 ok thnx, its giving me a blank result still grrr Quote Link to post Share on other sites
ukscotth 1 Posted August 31, 2010 Author Report Share Posted August 31, 2010 the text in the email is in <pre> tags if that make any difference Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.