Being completely clueless and using powershell for 4h so far, I've managed to get some data I needed for my phd following the instructions from here.
I changed the code to
$web = Invoke-WebRequest http://link.springer.com/article/10.1007/s12111-017-9355-7
(($web.tostring() -split "[`r`n]" | select-string "Keywords" | Select -First 1) -split ":")[1].Trim()
in order to get the keywords from the selected article.
It all worked, more or less, fine on Springer webpages, but when I try to use it on Sage, it returns information I don't need, since (I'm just guessing) the word "Keyword" appears in the "search box".
This is the code I've used for sage:
$web = Invoke-WebRequest http://journals.sagepub.com/doi/full/10.1177/0263276414536746
(($web.tostring() -split "[`r`n]" | select-string "Keywords" | Select -First 1) -split ":")[1].Trim()
I've tried googling how to make powershell search for the second match but couldn't find anything i could understand. After trying to (cluelessly) play with the code, substituting "Select - first 1)" with select - last / Select - all, and getting no results, I just have to ask:
Is there any easy way to find the second/last match of "Keyword" on a specific page?
Any tips, directions, or even links will be helpful.
Thank you in advance
EDIT: Could the reason I'm not getting wanted results back be because the "keywords" I need are hyperlinked, while text following "keywords" in the search bar is not?