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

Script aborts a valid account: item due to 404 URL found through followers #7

Closed
opl- opened this issue Jan 24, 2025 · 2 comments
Closed

Comments

@opl-
Copy link

opl- commented Jan 24, 2025

livestream-grab version: 63e12e0

An invalid URL was discovered while downloading a valid item, which caused the entire valid item to get aborted.

The URL is constructed based on JSON from https://livestream.com/api/accounts/4136546 property followers.data[5].signup_page, value "/accounts/4136546/lite-kun".

item account:4136546

Log
Archiving item account:4136546
58=200 https://livestream.com/api/accounts/4136546 
59=200 https://player-api.new.livestream.com/v3/accounts/4136546/advertising 
60=200 https://player-api.new.livestream.com/v3/accounts/4136546/availability 
61=200 https://api.new.livestream.com/accounts/4136546/followers?page=0&maxItems=20 
62=200 https://api.new.livestream.com/accounts/4136546/following?page=0&maxItems=20 
63=200 https://api.new.livestream.com/accounts/4136546/events?older=9 
64=200 https://api.new.livestream.com/accounts/4136546/events?newer=9 
65=200 https://api.new.livestream.com/accounts/4136546/events 
66=200 https://api.new.livestream.com/accounts/4136546/features 
67=200 https://livestream.com/accounts/4136546 
68=200 https://api.new.livestream.com/accounts/4136546 
69=400 https://api.new.livestream.com/accounts/4136546/followers?page=1&maxItems=20 
70=200 https://livestream.com/api/accounts/4136546/followers?page=0&maxItems=20 
71=200 https://api.new.livestream.com/accounts/4136546/followers 
72=400 https://api.new.livestream.com/accounts/4136546/following?page=1&maxItems=20 
73=200 https://livestream.com/api/accounts/4136546/following?page=0&maxItems=20 
74=200 https://api.new.livestream.com/accounts/4136546/following 
75=200 https://livestream.com/api/accounts/4136546/events?older=9 
76=200 https://livestream.com/api/accounts/4136546/events?newer=9 
77=200 https://livestream.com/api/accounts/4136546/events 
78=200 https://livestream.com/api/accounts/4136546/features 
79=404 https://livestream.com/accounts/4136546/lite-kun 
Server returned bad response. Sleeping 2 seconds.
80=404 https://livestream.com/accounts/4136546/lite-kun 
Server returned bad response. Sleeping 4 seconds.
81=404 https://livestream.com/accounts/4136546/lite-kun 
Server returned bad response. Sleeping 7 seconds.
82=404 https://livestream.com/accounts/4136546/lite-kun 
Server returned bad response. Sleeping 15 seconds.
83=404 https://livestream.com/accounts/4136546/lite-kun 
Server returned bad response. Sleeping 22 seconds.
84=404 https://livestream.com/accounts/4136546/lite-kun 
Server returned bad response.  Skipping.
Aborting item account:4136546.
85=200 http://livestream.com/accounts/4136546 
Not writing to WARC.
86=200 https://livestream.com/accounts/4136546/followers 
Not writing to WARC.
87=200 https://livestream.com/accounts/4136546/following 
Not writing to WARC.
88=400 https://livestream.com/api/accounts/4136546/followers?page=1&maxItems=20 
Not writing to WARC.
89=200 https://livestream.com/api/accounts/4136546/followers 
Not writing to WARC.
90=400 https://livestream.com/api/accounts/4136546/following?page=1&maxItems=20 
Not writing to WARC.
91=200 https://livestream.com/api/accounts/4136546/following 
Not writing to WARC.
@opl-
Copy link
Author

opl- commented Jan 24, 2025

Similar to #3, but the fix from there doesn't apply to this item.

Edit: I believe it's this check call?

for _, p in pairs({"following", "followers"}) do
local newurl = url .. "/" .. p
if not string.match(newurl, "/accounts/") then
ids[newurl] = true
end
check(newurl)
end

@imerr
Copy link
Contributor

imerr commented Jan 30, 2025

Fixed in ddf2874

@imerr imerr closed this as completed Jan 30, 2025
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

2 participants