Using pycurl to get next page google results - html-helper

I have written code to search something on google using pycurl. I would like to be able to use pycurl to do this but all help is greatly appreciated. I am looking for the ability to search a term and then "click the next page button" or "click the indexed numbers at the bottom" using pycurl so I can get more then just the first 10 web results.
Thanks in advance.

There are multiple ways to do this.
if your base url is http://www.google.co.uk/search?hl=en&q=YOUR_QUERY_STRING
you can add &num=100 to the end of your url to get first 100 results.
or if you can add &start=N, where N is a multiple of 10, and resend the webrequest to get the next page
or you just use XPATH to parse the webpage and get the url of the next page on the search results.

Related

How to manipulate 2sxc/dnn search result titles?

Does anybody have any idea on how to manipulate 2sxc/dnn search result titles?
Something like si.Title ?
Becuase at the moment search results are showing the page title and not the post title.
si.QueryString = "details=" + article.UrlKey;
si.Title = article.Title;
I tried the above code but it does not work.
2sxc doc: https://docs.2sxc.org/api/dot-net/ToSic.Sxc.Search.ISearchItem.html
Hi #BondLookingForAnswers - welcome to StackOverflow :)
I'm not sure if DNN will prefer your title to the page title, but either way I suggest you check out the latest blog app (https://2sxc.org/en/apps/app/blog-app-v4), which customizes the search results, and see where that gets you.
Good luck!

CakeDC Search Plugin generated duplicate IDs in URL

I am using the DC search Plugin in several Cake projects and generally it works very well. But for one of my pages I have the problem that the searches blows up the URL.
The starting URL is somethin like:
/lessons/abrechnung/10
When the search is used the resulting URL is something like:
/lessons/abrechnung/10/10/10/datumab:01.02.2014/datumbis:25.02.2014
The search itselfs works well - I get the results filtered by the search criteria.
But: As you can see the ID value is duplicated each time you search. This continues and after 3 or 4 searches the URL contains 50 or 100 times the ID.
How can I avoid this?
I guess this would happen on all actions where I have unnamed params in the URL - but I am not sure about this. BTW: The search params are NOT getting duplicated.
EDIT:
I use cakePHP 2.4.0 and Version 2.3 of teh Search Plugin.
Using 'paramType' => 'querystring' didn't help. But I see now that there is something wrong with my Session-Handling. I will check that and give further feedback.
My guess: Your form setup is incorrect.
Do not interfere with the URL of the posted form.
So use
echo $this->Form->create();
without modifying action/url keys.
This way the form will automatically post to itself, and the Search plugin auto-adds the search params in the PRG redirect.
Then there will be no duplication of passed params or alike.
Independent from this it is still better to use the query strings here (and for pagination then as well, of course).

Why my google +1 button doesn't show statistics/numbers?

I have more than 1K +1 for my website. And I want to show that number next to my +1 button as it shows in all other websites. But mine is not working.
If you are not understanding what i am trying to say then look at my website
http://come2chat.com
look at the top center of my webpage. It has a google +1 button but it doesn't show how many +1 I have on it.
to see the number of +1, i have to visit my google plus one profile at
https://plus.google.com/107969039583165788589/posts
how to fix this problem?
You need to use another +1 button.
You can find the right ones here:
https://developers.google.com/+/web/+1button/#button-sizes
Looks like you need to change your data-annotation and data-size attributes.
The button generator at the top of the page I linked can help you find the look you want.

Solr configuration

I'm very new with Solr,
And I really want a step by step to have my Solr search result like the google one.
To give you an idea, when you search 'PHP' in http://wiki.apache.org/solr/FindPage , the word 'php' shows up in bold .. This is the same result I want to have.
Showing only a parser even if the pdf is a very huge one.
You can use highlighting to show a matching snippet in the results.
http://wiki.apache.org/solr/HighlightingParameters
By default, it will wrap matching words with <em> tags, but you can change this by setting the hl.simple.pre/hl.simple.post parameters.
You may be looking at the wrong part of the returned data. Try looking at the 'highlighting' component of the returned data structure (i.e. don't look at the response docs). This should give you the snippets you want.

Solr display page no of PDF along with the results

My question is just a continuation of this activity where I would like to display page no for the searched word in the input document.
Solr open document after searching a keyword
So I use
1) tika-0.9.jar to extract the output as an intermediate file.
2) Then I create another XML where the extracted output is the input and write the data in the format expected by Solr and then post this xml using post.jar command.
3) I use Solritas Serach UI with Solr 3.2 version (http://localhost:8983/solr/browse) to view the results.
I would like to display the page no's along with the results.
Example :
If I search for a word test in the input PDF's what I have manged so far is to display all set of docs that contain this result and on click of any doc the input PDF will open. I would like to display the page no of the where this word say 'test' is present in each of the input doc.
Please give me some suggestion , like whether this can be done by some how storing the page no in the index .
Your suggestions are most welcome.
Thanks and regards.

Resources