Pick out a link based on existing records

gonnacai

Новичок
Регистрация
09.08.2013
Сообщения
6
Благодарностей
3
Баллы
1
Dears,

Thanks for creating such great software.

I've a problem and need some help. Here is the problem.

Harvest Result
50 links from website, such as:
www.example.com/article-title-11111.html?abcde
www.example.com/article-title-22222.html?fghij
www.example.com/article-title-33333.html?klmn
www.example.com/article-title-44444.html?opors

11111: 5 random digits
abcde: 5 random digits and letter.

Now, I made a record in a list (22222, 33333)

How to click 22222 link while the harvest result has 22222 link?
How to click 33333 link while the harvest result has 33333 link?
How to do NOT click 22222 link while the harvest result do NOT have 2222 link?

Thank you!
 

LightWood

Moderator
Регистрация
04.11.2010
Сообщения
2 382
Благодарностей
916
Баллы
113

gonnacai

Новичок
Регистрация
09.08.2013
Сообщения
6
Благодарностей
3
Баллы
1
Yes, Lightwood, completely right.
 

LightWood

Moderator
Регистрация
04.11.2010
Сообщения
2 382
Благодарностей
916
Баллы
113
Yes, Lightwood, completely right.
C#:
List<string> list = new List<string>();
list.AddRange(project.Lists["all"]);
string myString = project.Variables["recipient"].Value;
var matchingvalues = list
.FindAll(x => x.IndexOf(myString, StringComparison.OrdinalIgnoreCase) != -1);
return matchingvalues.First();
Most easy way is to use this C# code.
Get line from the list1 to variable "recipient"
Name of the the second list is "all". You can change that.
In result variable of C# code you will get a link.

Try and let me know.
 

gonnacai

Новичок
Регистрация
09.08.2013
Сообщения
6
Благодарностей
3
Баллы
1
Hello LightWood, thank you so much for your help!

I tested the code but failed. It's my fault, not yours, this is the 1st time I use C# code, and I don't have enough knowledge to learn it :P

And, due to some reasons, the project has switched to another method.

Anyway, thank you!
 
  • Спасибо
Реакции: LightWood

gonnacai

Новичок
Регистрация
09.08.2013
Сообщения
6
Благодарностей
3
Баллы
1
  • Спасибо
Реакции: LightWood

LightWood

Moderator
Регистрация
04.11.2010
Сообщения
2 382
Благодарностей
916
Баллы
113
Hello LightWood, thank you so much for your help!

I tested the code but failed. It's my fault, not yours, this is the 1st time I use C# code, and I don't have enough knowledge to learn it :P

And, due to some reasons, the project has switched to another method.

Anyway, thank you!
Welcome
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)