Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
97 views
in Technique[技术] by (71.8m points)

python - RegexNotFoundError: Unable to extract video url on web server but works on local system

I am trying to get the json response using the following command

python3 /usr/local/bin/youtube-dl -j "https://www.instagram.com/p/CJYpUabHXX7/?igshid=qmznpbi11tuk" --verbose

This works just fine on my local system but when I try it on a web server it says RegexNotFoundError: Unable to extract video url. I tried with Ubuntu 18.04, Ubuntu 20.04, and CentOS 8.3. Also, some of the urls work just fine on web server as well.

After using --dump-pages parameter I found out it was redirecting the url to login page when running on web server. This doesn't happen on local system

[Instagram] Dumping request to https://www.instagram.com/accounts/login/?next=/p/CJYpUabHXX7/...

Any workaround to this issue?

question from:https://stackoverflow.com/questions/65642049/regexnotfounderror-unable-to-extract-video-url-on-web-server-but-works-on-local

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...