Arrowar/StreamingCommunity

errore subito dopo aver avviato la ricerca

Closed this issue · 11 comments

Insert word to search in all site: willy
Test site: https://streamingcommunity.boston
Test response site: 200
Use domain: boston
Make request to get version ...
ERROR:root:Error extracting version: 'NoneType' object has no attribute 'get'
Traceback (most recent call last):
File "C:\Users\scais\Desktop\StreamingCommunity-main\run.py", line 178, in
main()
File "C:\Users\scais\Desktop\StreamingCommunity-main\run.py", line 171, in main
run_function(input_to_function[category])
File "C:\Users\scais\Desktop\StreamingCommunity-main\run.py", line 40, in run_function
func()
File "C:\Users\scais\Desktop\StreamingCommunity-main\Src\Api\streamingcommunity_init_.py", line 27, in search
site_version, domain = get_version_and_domain()
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\scais\Desktop\StreamingCommunity-main\Src\Api\streamingcommunity\site.py", line 89, in get_version_and_domain
version, list_title_top_10 = get_version(httpx.get(base_url, headers={'user-agent': get_headers()}).text)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\scais\Desktop\StreamingCommunity-main\Src\Api\streamingcommunity\site.py", line 54, in get_version
version = json.loads(soup.find("div", {"id": "app"}).get("data-page"))['version']
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'

Secondo te quale può essere il problema, hai provato a verificare se version è cambiato?

Insert category (0: Streamingcommunity, 1: Animeunity, 2: Altadefinizione, 3: Ddlstreamitaly, 4: Guardaserie, 5:
Watch, 6: Uhdmovies, 7: Bitsearch, 8: 1337xx, 9: Cb01): [0/1/2/3/4/5/6/7/8/9] (0): 0

Insert word to search in all site: for life
Test site: https://streamingcommunity.boston
Test response site: 200
Use domain: boston
Make request to get version ...
ERROR:root:Error extracting version: 'NoneType' object has no attribute 'get'
Traceback (most recent call last):
File "c:\Users\dizpl\Desktop\StreamingCommunity-main\run.py", line 182, in
main()
File "c:\Users\dizpl\Desktop\StreamingCommunity-main\run.py", line 173, in main
run_function(input_to_function[category])
File "c:\Users\dizpl\Desktop\StreamingCommunity-main\run.py", line 40, in run_function
func()
File "c:\Users\dizpl\Desktop\StreamingCommunity-main\Src\Api\streamingcommunity_init_.py", line 27, in search
site_version, domain = get_version_and_domain()
^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\dizpl\Desktop\StreamingCommunity-main\Src\Api\streamingcommunity\site.py", line 89, in get_version_and_domain
version, list_title_top_10 = get_version(httpx.get(base_url, headers={'user-agent': get_headers()}).text)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\dizpl\Desktop\StreamingCommunity-main\Src\Api\streamingcommunity\site.py", line 54, in get_version version = json.loads(soup.find("div", {"id": "app"}).get("data-page"))['version']
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'

stesso errore anche a me

It seems streamingcommunity domain changed to photos, you can fix it in config.json:

"SITE": { "streamingcommunity": { "video_workers": 2, "audio_workers": 2, "domain": "photos" },

this could be automated by calling GET https://streamingcommunity.boston and check over location header in case of 301/302 status response

image

It seems streamingcommunity domain changed to photos, you can fix it in config.json:

"SITE": { "streamingcommunity": { "video_workers": 2, "audio_workers": 2, "domain": "photos" },

this could be automated by calling GET https://streamingcommunity.boston and check over location header in case of 301/302 status response

image

Perfect but auto domain search dont work ?

It seems streamingcommunity domain changed to photos, you can fix it in config.json:
"SITE": { "streamingcommunity": { "video_workers": 2, "audio_workers": 2, "domain": "photos" },
this could be automated by calling GET https://streamingcommunity.boston and check over location header in case of 301/302 status response
image

Perfect but auto domain search dont work ?

Up until now I have always edited the config.json file.
The auto domain feature never worked for me, I will try to debug it later and give you feedback about it.

Test site: https://streamingcommunity.boston
Test response site: 200
Use domain: boston

It seems that the auto domain feature get the 200 from the first call to httpx.get, this because follow_redirects=True, so it returns Boston ad right domain.
But in version, list_title_top_10 = get_version(httpx.get(base_url, headers={'user-agent': get_headers()}).text) it doesn't, so it return an exception.

I've tried a couple of things, simply setting follow_redirects=False or omitting it from search_domain fix it.
I've tried to add something slightly lighter in error management before make the check on domain list and is it working as, but I don't how much is reliable Location header for banned domain :)

if AUTO_UPDATE_DOMAIN:
if (response and response.status_code in (301,302) and 'Location' in response.headers):
new_domain = response.headers['Location'].split('.')[1].replace('/', '') # Some logic based on my rusty python skill
else:
console.print("[red]Extract new DOMAIN from TLD list.")
new_domain = get_top_level_domain(base_url=base_url, target_content=target_content)

Test site: https://streamingcommunity.boston Test response site: 200 Use domain: boston

It seems that the auto domain feature get the 200 from the first call to httpx.get, this because follow_redirects=True, so it returns Boston ad right domain. But in version, list_title_top_10 = get_version(httpx.get(base_url, headers={'user-agent': get_headers()}).text) it doesn't, so it return an exception.

I've tried a couple of things, simply setting follow_redirects=False or omitting it from search_domain fix it. I've tried to add something slightly lighter in error management before make the check on domain list and is it working as, but I don't how much is reliable Location header for banned domain :)

if AUTO_UPDATE_DOMAIN: if (response and response.status_code in (301,302) and 'Location' in response.headers): new_domain = response.headers['Location'].split('.')[1].replace('/', '') # Some logic based on my rusty python skill else: console.print("[red]Extract new DOMAIN from TLD list.") new_domain = get_top_level_domain(base_url=base_url, target_content=target_content)

Maybe I found an easier way to solve it.

Try new commit.

yes, it's working for me, thanks