Jump to content
UBot Underground

Recommended Posts

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 Regards

Z!nni

Link to post
Share on other sites

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 is

if (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.

Link to post
Share on other sites

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 Regards

Z!nni

Link to post
Share on other sites

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

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...