You're viewing a comment by Andrew and its responses.
You're viewing a comment by Andrew and its responses.
I am being sponsored by Syntress! They bought me an amazing dedicated server to run catonmat on. If you're looking web services, I highly recommend the Syntress guys!
I am being sponsored by A-Writer! If you ever need help with essay writing, look no further than A-Writer! They will help you with your writing in as quickly as 3 hours!
I love to read science books. They make my day and I get ideas for awesome blog posts, such as Busy Beaver, On Functors, Recursive Regular Expressions and many others.
Take a look at my
Amazon wish list, if you're curious about what I have planned reading next, and want to surprise me. :)
If you are interested in advertising on catonmat.net, contact me.
Free tools for coding on Vietstarsoft.com.
Programming homework help.


Hi I think this is the correct formatting.
*cheers
Andrew
def get_results(self): """ Gets a page of results """ if self.eor: return [] MAX_VALUE = 1000000 page = self._get_results_page() #search_info = self._extract_info(page) results = self._extract_results(page) search_info = {'from': self.results_per_page*self._page, 'to': self.results_per_page*self._page + len(results), 'total': MAX_VALUE} if not self.results_info: self.results_info = search_info if self.num_results == 0: self.eor = True return [] if not results: self.eor = True return [] if self._page > 0 and search_info['from'] == self._last_from: self.eor = True return [] if search_info['to'] == search_info['total']: self.eor = True self._page += 1 self._last_from = search_info['from'] return resultsComment Responses
I am still getting an empty list back from search.py after replacing `get_results()' with this version. What am I missing/screwing up?
Has this 'patch' worked for anyone else?
Wow, Andrew, thanks for taking the time to put it together. I'm gonna try it out now and if it works, put it in xgoogle.
Yoyo, will get back to you with results soon.
Hey yoyo!
Are you getting an empty list or are you just not doing anything with the data? Have you tried running the examples on this site?
Your source does the same for me when running from my ide it returns nothing because I have not done anything with the data.
Let me know cheers
Well, I am trying out the correctly tabbed patch that Andrew posted now. My command line test worked (Andrew, I failed to post the rest of the commands that showed my work). Since Goo has me pegged already, I am very careful about how I run my program now.
I will get back later on today, with the results.
Thanks!
Success! Thanks a million!
Here are my results.
Hey no worries!
Thanks for the props on your site, glad I could help
Have a good one
Cheers
Andrew
Reply To This Comment