Sponsored Content
Top Forums UNIX for Dummies Questions & Answers using Lynx and Grep to return search page rank - help Post 302136562 by roninuta on Tuesday 18th of September 2007 12:27:51 PM
Old 09-18-2007
using Lynx and Grep to return search page rank - help

I am writing a script which will read in search terms from a text file and pass each line to Lynx. Lynx will grab the source html, then I want grep/tr, whatever to search for the first occurance of a term (mydomain.name), then delete from that 1st occurance on, creating a new end of file.

Then I want to count a certain marker <class=L> in the remaining source to determine the search engine page rank until end of file.

This is what I have so far. My primary issue is that google returns all search html source as 1 line, which is why I need to count the style tag <class=L> (in this case lowercase L), what I have right now grab the search terms and the results, but I'm unsure of where to go from here.

#!/bin/bash
cat ${1} | while read searchTerm; do
#echo "${searchTerm}"
lynx -source -accept_all_cookies "http://www.google.com/search?q=$searchTerm">> /path/to/dir/archive.txt
done

Thanks in Advance!
 

7 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Man page search issue

I have an issue with my man page configuration. I can able to see man pages for 1st section. But for not the rest of the sections. But If it give section number, man page is working properly Following are the details echo $MANPATH... (4 Replies)
Discussion started by: praveenkumar_l
4 Replies

2. UNIX for Dummies Questions & Answers

| help | unix | grep - Can I use grep to return a string with exactly n matches?

Hello, I looking to use grep to return a string with exactly n matches. I'm building off this: ls -aLl /bin | grep '^.\{9\}x' | tr -s ' ' -rwxr-xr-x 1 root root 632816 Nov 25 2008 vi -rwxr-xr-x 1 root root 632816 Nov 25 2008 view -rwxr-xr-x 1 root root 16008 May 25 2008... (7 Replies)
Discussion started by: MykC
7 Replies

3. UNIX for Dummies Questions & Answers

Lynx Grep Pattern Match 2 conditions Print from Start to End

I am working on a scraping project and I am stuck at this tiny grep pattern match. Sample text : FPA List. FPA List. FPA List. FPA List. FPA List. FPA List. FPA List. FPA List. ABC Personal Planning Catherine K. Wat Cath Wat Catherine K. Wat Catherine K. Wat IFRAME:... (8 Replies)
Discussion started by: kkiran
8 Replies

4. Solaris

How to search man page (pdf file)

I'm not sure is it just only me or something. I try to download man page documentation from SUN.COM. However, it seems I can't search what I looking for in SUN man page. I try to search "passwd" but it return me a word "less" why this pdf can't search or is it require specific plugin to... (3 Replies)
Discussion started by: Smith
3 Replies

5. Web Development

Fix For Google Page Rank: Wordpress List Rank Dashboard Widget

Here is the fix for the recent Google changes to their pagerank API. For example, in the List Rank Dashboard Widget Wordpress Plugin (Version 1.7), in this plugin file: list-rank-dashboard-widget/wp-list-rank-class.php in this function: function getGooglePR($url) Change this line: ... (0 Replies)
Discussion started by: Neo
0 Replies

6. What is on Your Mind?

Update to Advanced Search Page (Phase 1)

Update: I have completed the first phase of revamping the "Advanced Search" page using Bootstrap (desktop not mobile yet): https://www.unix.com/search.php https://www.unix.com/search.php I may change this to a Bootstrap modal later and change the CSS a bit more; but for now it is much... (0 Replies)
Discussion started by: Neo
0 Replies

7. What is on Your Mind?

The Return of the Show Post Page

You may recall we used to have a "Show Post" link in each post that referenced the post and had a link to this post in page. I am going to bring back this feature and and renovate the page: https://www.unix.com/members/1-albums215-picture1013.png So that page has a "Under Renovation"... (1 Reply)
Discussion started by: Neo
1 Replies
NOTMUCH-TAG(1)						      General Commands Manual						    NOTMUCH-TAG(1)

NAME
notmuch-tag - Add/remove tags for all messages matching the search terms. SYNOPSIS
notmuch tag +<tag>|-<tag> [...] [--] <search-term>... DESCRIPTION
Add/remove tags for all messages matching the search terms. See notmuch-search-terms(7) for details of the supported syntax for <search-terms>. Tags prefixed by '+' are added while those prefixed by '-' are removed. For each message, tag removal is performed before tag addition. The beginning of <search-terms> is recognized by the first argument that begins with neither '+' nor '-'. Support for an initial search term beginning with '+' or '-' is provided by allowing the user to specify a "--" argument to separate the tags from the search terms. notmuch tag updates the maildir flags according to tag changes if the maildir.synchronize_flags configuration option is enabled. See not- much-config(1) for details. SEE ALSO
notmuch(1), notmuch-config(1), notmuch-count(1), notmuch-dump(1), notmuch-hooks(5), notmuch-new(1), notmuch-reply(1), notmuch-restore(1), notmuch-search(1), notmuch-search-terms(7), notmuch-show(1), Notmuch 0.13.2 2012-06-01 NOTMUCH-TAG(1)
All times are GMT -4. The time now is 11:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy