zinni 2 Posted January 13, 2012 Report Share Posted January 13, 2012 Hello, I would like to congratulate all my Xing friends automatically on his Birthday. I want to scrape a table but with if command. Example: "If" the Date from "<td> 13.01. </td>" the same as variable "#date" than scrape the "href" from <td> before. :-) Is this possible? Here the HTML Code from Xing: <tbody> <tr> <td> <a href="/profile/example_username1/example_link" class="user-photo-list user-img-link ext-img-s2" data-hover-card="b_id=example"> <img src="example_pic.jpg" width="30" height="40"></a> </td> <td> <strong><a href="/profile/example_username1/example_link">Example_Username</a></strong> <a class="icn icn-ext-premium-small" href="/app/billing" title="Premium-Mitglied"> Premium-Mitglied</a> <br> Example Company name </td> <td> 13.01.1974 / Alter: wird 38 </td> </tr> <tr> <td> <a href="/profile/example_username1/example_link" class="user-photo-list user-img-link ext-img-s2" data-hover-card="b_id=example"> <img src="example_pic.jpg" width="30" height="40"></a> </td> <td> <strong><a href="/profile/example_username1/example_link">Example_Username</a></strong> <a class="icn icn-ext-premium-small" href="/app/billing" title="Premium-Mitglied"> Premium-Mitglied</a> <br> Example Company name </td> <td> 13.01.1973 / Alter: wird 39 </td> </tr> <tr> <td> <a href="/profile/example_username1/example_link" class="user-photo-list user-img-link ext-img-s2" data-hover-card="b_id=example"> <img src="example_pic.jpg" width="30" height="40"></a> </td> <td> <strong><a href="/profile/example_username1/example_link">Example_Username</a></strong> <a class="icn icn-ext-premium-small" href="/app/billing" title="Premium-Mitglied"> Premium-Mitglied</a> <br> Example Company name </td> <td> 14.01.1973 / Alter: wird 39 </td> </tr> </tbody> And here the Screen: http://s1.directupload.net/images/120113/grhca93u.png Best RegardsZ!nni Quote Link to post Share on other sites
zinni 2 Posted January 15, 2012 Author Report Share Posted January 15, 2012 Is this not possible? Please help me... Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted January 15, 2012 Report Share Posted January 15, 2012 Please be patient you will always get a response here. just might take some time... Ok so far as what you have supplied its missing needed html as I see it anyways.. Please supply the entire page html, or a link to the page with the members on it if openly available. Having a pro license as you have, it makes it easier in that you can scrape table. Then loop through the table comparing the cell that holds the date and use a if statement that isif (contains) and be the date you enter in your UI area. Exact formatted the same as it will appear in the table. If it contains it, then save there data from table 1 to table 2 or a list as you need it, for later use. Quote Link to post Share on other sites
zinni 2 Posted January 18, 2012 Author Report Share Posted January 18, 2012 Thank you for your Help. The problem is: How can i change the date format from my Scraped Table? The Scraped Date from Xing is: 13.01.1974 / Alter: wird 38 But i need the Date: 13.01 Best RegardsZ!nni Quote Link to post Share on other sites
JohnB 255 Posted January 18, 2012 Report Share Posted January 18, 2012 Try This: set(#date, $replace regular expression("13.01.1974 / Alter: wird 38", "\\.\\d\{4\}\\s/\\sAlter:\\swird\\s\\d\{0,4\}", $nothing), "Global") John 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.