ranahaani / GNews

A Happy and lightweight Python Package that Provides an API to search for articles on Google News and returns a JSON response.
https://pypi.org/project/gnews/
MIT License
712 stars 106 forks source link

gn.get_full_article() returns None when app in .exe #68

Open alexcohfr opened 1 year ago

alexcohfr commented 1 year ago

Hello everyone,

I'm trying to make a little program for my father and I have to turn it into a .exe.

The thing is, when I exec my code in VsCode, everything is working perfectly, but as soon as I turn it in a .exe with pyinstaller, I get "None" from gn.get_full_article()

Does anyone know how to solve this issue ?

ranahaani commented 1 year ago

can you please share any errors/logs? what's the issue?

translation-robot commented 11 months ago

Perhaps google consent for cookies makes it fail.

Even when opening the page manually, the page refuses to open on Chrome:

Article download() failed with 500 Server Error: Internal Server Error for url: https://news.google.com/rss/articles/cbmitmh0dhbzoi8vd3d3lmdvdi53ywxlcy9oaxn0b3jpyy10b3rhbc1iyw4tc25hcmvzlwfuzc1nbhvllxryyxbzlxvzzs1jb21lcy1mb3jjzdibaa?oc=5&ucbcb=1&hl=en-US&gl=US&ceid=US:en on URL https://consent.google.com/m?continue=https://news.google.com/rss/articles/cbmitmh0dhbzoi8vd3d3lmdvdi53ywxlcy9oaxn0b3jpyy10b3rhbc1iyw4tc25hcmvzlwfuzc1nbhvllxryyxbzlxvzzs1jb21lcy1mb3jjzdibaa?oc%3d5&gl=ch&m=0&pc=n&cm=2&hl=en-us&src=1

On my browser I get:

  1. That’s an error.

The server cannot process the request because it is malformed. It should not be retried. That’s all we know.

The news URL might not be valid anymore.