Skip to content

Conversation

@zhiweio
Copy link

@zhiweio zhiweio commented Aug 18, 2017

Hi, thanks for you repo
I found function _get_link had some little problems after using. Sometimes it cannot parsed correct link from html pages. Now, I fixed it
And then I added area option for _get_search_url

@coveralls
Copy link

Coverage Status

Coverage decreased (-17.9%) to 44.473% when pulling 6a71a60 on Zhiwei1996:master into 89c456e on abenassi:master.

@abenassi abenassi merged commit 85540ce into abenassi:master May 5, 2018
@JuaniFilardo
Copy link
Collaborator

Hello, I've just checked this and the area option is definitely not working :(

The only way I found around this is to set the ncr option as True, but that just allows the algorithm to perform the search in google.com.
I'm almost sure that this area thing has something to be with the params in the url, such as "gl" (geographic location), and not with the domain (.com, .is, .dk, etc).
We should find a way to set this in order to be able to switch between areas; but setting the area option I obtained these results:

area_search

As you can see, the results are all the same regardless of the value of the area parameter.

@zhiweio
Copy link
Author

zhiweio commented May 6, 2018

@JuaniFilardo
hi, can you test jp -> Japan,I'm in China, maybe it cause different results
A few months ago, I use the old repo with the feature, tested area,it can work,but I search by Chinese. maybe you try search "黑客",and compare the results of jp->Japan and hk HongKong

@JuaniFilardo
Copy link
Collaborator

Took me a while to check it since I don't understand any chinese, sorry about that.
I looked at the results obtained by doing google.search("黑客",area='hk') and then google.search("黑客",area='hk') and they look the same. Nevertheless, when searching google.search("黑客",ncr=True) I can see that the results are slightly different.
The problem of this ncr thing is that only allows to search on your particular country (when set to False) and in the US (when set to True).

Could you try searching with different areas and see if the results are different?

@zhiweio
Copy link
Author

zhiweio commented May 7, 2018

@JuaniFilardo
I regret that the area is definitely not working now after some tests, I suppose the Google Search Rule maybe has changed.
Half a year ago, I test it works use these google homepage links of different areas, give back me different results
I'm sorry for the failed attempt,the area param is redundant

@JuaniFilardo
Copy link
Collaborator

We'll have to find a workaround, but in the meantime, I will open an issue about this.
I guess we could leave the area argument in the code (in the worst case scenario, it doesn't do anything) while we look for another solution. What do you think, @zhiwei1996?

@zhiweio
Copy link
Author

zhiweio commented May 7, 2018

It seems this is feasible :)
@JuaniFilardo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants