Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

two bugs for new update #120

Open
alinemati-uwm opened this issue Aug 12, 2023 · 11 comments
Open

two bugs for new update #120

alinemati-uwm opened this issue Aug 12, 2023 · 11 comments

Comments

@alinemati-uwm
Copy link

thanks for update,
I can see two bugs there:

I search for chatgot to check

URL looks extra stuff which does not open the link
'desc': '' is empty
Mycode:
from GoogleNews import GoogleNews googlenews = GoogleNews() googlenews.enableException(True) googlenews.set_lang('en') googlenews.set_period('1d') googlenews.set_time_range('08/11/2023','02/28/2020') googlenews.set_encode('utf-8') googlenews.search('Chatgpt') result = googlenews.page_at(2) result

My result:
[{'title': 'Hackers take on ChatGPT with support from White House', 'media': 'CNN', 'date': '6 hours ago', 'datetime': datetime.datetime(2023, 8, 11, 20, 8, 33, 681797), 'desc': '', 'link': '/url?esrc=s&q=&rct=j&sa=U&url=https://www.cnn.com/videos/world/2023/08/11/exp-hackers-ai-vegas-lkl-081102pseg2-cnni-world.cnn&ved=2ahUKEwi11JzzhNaAAxUxm1YBHTz2Dx04ChDF9AF6BAgDEAI&usg=AOvVaw14nsFJTPwZeSPlNUzqrOE5', 'img': 'data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=='},

@alinemati-uwm
Copy link
Author

I fixed it by myself

@Gary-HO
Copy link

Gary-HO commented Aug 14, 2023

Hi @alinemati-uwm,

Would you please provide the solution to the empty "desc" problem? I encountered the bug too but I can't figure out the solution

@tin8420
Copy link

tin8420 commented Aug 14, 2023

Hi all,
I also found out this issue which the URL contains extra stuff so that the content can't be downloaded properly.
Is there any solution ?

@tin8420
Copy link

tin8420 commented Aug 14, 2023

BTW I already trimmed the URL to proper format which start with htttps but also not working.

@alinemati-uwm
Copy link
Author

I extracted whole code and updated. please use below link if you want to use it

colab

@tin8420
Copy link

tin8420 commented Sep 18, 2023

Hi @alinemati-uwm,
I was wondering if you have update version for 1.6.10 because URL in this version still contains extra stuff so that article couldn't be downloaded successfully

@alinemati-uwm
Copy link
Author

Hi @alinemati-uwm, I was wondering if you have update version for 1.6.10 because URL in this version still contains extra stuff so that article couldn't be downloaded successfully

No sure what do you need but the result is json file which you can extract whatever you want.

@tin8420
Copy link

tin8420 commented Sep 19, 2023

Thanks, may I ask which version are you using now? because the latest version is 1.6.10 and the last time you provide modified code is version 1.6.9

@alinemati-uwm
Copy link
Author

I updated the python script on the colab. you can use it and run locally. it works. colab's linke is above-mentioned.

@tin8420
Copy link

tin8420 commented Sep 20, 2023

@alinemati-uwm Thanks a lot, I try your code but it failed. would you check if you modified in the latest version(1.6.10)?
image

@prigioni
Copy link

Hi @alinemati-uwm,
I run colab, but it returns []. Can you help me?

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

No branches or pull requests

4 participants