youtube-dl gave me an error about ssl - youtube

Following is the error that youtube-dl gave me. Another tool you-get gave me a similar error. What should I do to download videos from youtube.
[~] youtube-dl -f 137 https://youtu.be/0Ef9GudbxXY
17:27:23 [youtube] 0Ef9GudbxXY: Downloading webpage ERROR: Unable to
download webpage: (caused by
URLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate
verify failed (_ssl.c:841)'),))

This error means that there is a problem with the TLS certificate. Typical suspects are, in rough order descending likeliness, according to my experiences working as a youtube-dl developer:
Censorship by your country, especially if you are located in or near China, Pakistan, or other non-democratic countries. You can use a VPN or TOR with a bridge to avoid the censorship.
Censorship by your company, school, or ISP. Again, a VPN (or proxy) can avoid this.
Local anti-malware software trying to intercept connections.
Local malware software trying to intercept connections.
A proxy server that is now misbehaving. Add -v to the command line to see whether one is configured.
A local configuration problem, i.e. missing certificate store or so. This depends a lot on how you installed youtube-dl.
A configuration problem on YouTube's side.
In any case, you can avoid certificate checking by passing in --no-check-certificate. However, note that this will allow nation states, ISPs, schools/companies, hackers, and other (semi-)malicious parties to log, intercept, and change your video traffic.
Note: The video https://youtu.be/0Ef9GudbxXY is not available in format 137. Simply leave out -f to get the best available format.

Upgrading python version 2.7.18 to latest fixed this error.

Related

Apple Notification Server APNS - My Domain is Banned

I have an enterprise iPhone app which uses APNS to send notifications to users phones. This was working fine up until recently when we had a huge expansion of users, now no notifications are being sent/received and I cannot connect to APNS server from PHP.
I am 99% certain the reason is because the domain I am sending APNS requests from has been banned due to Apple thinking I was trying a DDOS attack. Reasons I think this:
Code I was using to send APNS messages was not proper, it was opening then closing the connection in a loop. This is the cause of the ban I believe. I have learnt the error of my ways since but too late right now.
I uploaded my .pem file to another server/IP and used the exact same code to send notification and received to my phone successfully.
I have run and openssl command to try and connect to APNS server from the believed banned server and it connects but returns 'write:errorno=104' along with other error lines. Whereas with the other server I mentioned it returned the proper connection output along with cert output, ect., the normal.
So my reason for posting is I am stuck wondering how to get my domain removed from the ban list. https://developer.apple.com/library/content/technotes/tn2265/_index.html This page states that it takes about an hour for the temp block to expire, I have made sure to not attempt a connection for over 12 hours and still not working. "This temporary block will expire if no connection attempts are made for about one hour."
Looking through Apple support channel I can not find the proper path to follow and I do not want to pay for professional services.
Anyone experience this before and now path to follow to get off banned list? Or to even verify that you are on the banned list?

iOS broadcasting live to Azure Media Services

I am trying to make a Periscope-like app (not practically, but technical requirements are alike) where users can start streaming quickly from their iPhone to an unknown amount of users, both mobile. I am trying to use Azure Media Services for live video streaming, but even after reading pages of documentation I'm stuck.
I'm using VideoCore (https://github.com/jgh-/VideoCore) to publish from iOS device to the RTMP server. On local (using Wowza) I can just connect to the local server with my set username and password as shown:
vcSession = [[VCSimpleSession alloc] initWithVideoSize:CGSizeMake(1280, 720) frameRate:30 bitrate:1000000 useInterfaceOrientation:NO];
[self.view addSubview:vcSession.previewView];
vcSession.previewView.frame = self.view.bounds;
vcSession.delegate = self;
[vcSession startRtmpSessionWithURL:#"rtmp://172.20.10.2:1935/live?rtmpauth=test:test" andStreamKey:#"test"];
Where the rtmpauth parameter has the username:password format, which I've set both to test on my local server. It works. In Azure, I've created a channel named test, and I've got the following Ingest URL:
rtmp://test-myappname.channel.mediaservices.windows.net:1935/live/some-long-hexadecimal-string
In Wirecast, I'm able to stream to URL (though EXTREMELY slow and connection frequently lost, don't know why) by selecting Azure Media Services in Output Settings and typing that Ingest URL. In iOS, I have no idea how to connect to Azure Media Services.
In startRtmpSessionWithURL:andStreamKey: method, I've tried all the possible combinations of URL and a stream key, but no luck. I have no idea what my username/password is (nothing is given at the Azure side), what the stream key is (I've tried test, live, empty string) and what that long hexadecimal string is (some sources say that it's called a locator, though).
What is the correct format of RTMP URL and stream key when connecting to Azure Media Services for streaming?
I'll find someone to help you. I think you are just missing a stream name after the long hex string in the URL.
rtmp://test-myappname.channel.mediaservices.windows.net:1935/live/some-long-hexadecimal-string/[YOUR-CUSTOM-STREAM-NAME-Anything Really!]
Also, do you have any control over the encoding settings? Its possible that some encoding settings are not right. We have not tested with that VideoCore library, so it may also be that there is a slight variation in the RTMP protocol (since it is very poorly documented and there is a lot of missing information out there).
I'm curious why your Wirecast setup is having trouble as well. That doesn't sound good to start with. Network issue? Are you setting it to the proper Encoder preset with H.264 and NOT x264 set?
Review your settings in Wirecast against Cenk's blog post here: http://azure.microsoft.com/blog/2014/09/18/azure-media-services-rtmp-support-and-live-encoders/

Delphi. Sockets. Access denied on TIdHttp socket connection on one node/MAC address only. Betfair API

I suspect this is fairly simple and so no code will be helpful.
I am developing a Delphi non-interactive 'bot' login app.
The app logs in okay with any account and certificate/key pair (registered with the corresponding account) on any machine but my current development system.
i.e. The same executable, with the same account login credentials and SSL certificate and key file selected, runs on every system I try it on with a successful login, but fails to login on my dev system (Windows 8.1) with an Access Denied error (10013).
It has been doing this since I crashed the development IDE three days ago. I suspect it is either:
There is a socket at raw sockets level on the API server locked open to the MAC address on my dev system (in a WAIT_STATE)
The crash raised some kind of block or exclusion on my account non-interactively logging in because of fraud prevention security triggering and blocking the socket/port.
I doubt 2 since it is a standard non-interactive bot login process and it is a developer API and so failed socket connections are likely to be common.
I only make a few dozen login calls per development day at most.
Have I been locked out, or is it an open socket in WAIT_STATE for my specific MAC address ... or something else?
If I fail to close and free the TIdHttp connection, or the app crashes (along with the IDE) due to incorrect handling of the SSL, how long will a server normally persist the WAIT_STATE for a socket connection - and would it attempt to reallocate the same socket and port for the same MAC address.
I have not tried a different port number, nor an explicit socket number.
I have tried changing the dev system's IP address and using different Wi Fi connections through different providers. If it is a raw socket binding problem - it is not against IP address - I think.
The same executable from the build works on all systems apart from the dev system on which the crash occurred.
Thanks in advance.
10013 is WSAEACCES, which is described as follows:
Windows Sockets Error Codes:
WSAEACCES
10013
Permission denied.
An attempt was made to access a socket in a way forbidden by its access permissions. An example is using a broadcast address for sendto without broadcast permission being set using setsockopt(SO_BROADCAST).
Another possible reason for the WSAEACCES error is that when the bind function is called (on Windows NT 4.0 with SP4 and later), another application, service, or kernel mode driver is bound to the same address with exclusive access. Such exclusive access is a new feature of Windows NT 4.0 with SP4 and later, and is implemented by using the SO_EXCLUSIVEADDRUSE option.
Assuming by WAIT_STATE, you actually mean TIME_WAIT, then Windows keeps a socket in TIME_WAIT for only 120 seconds by default. That does not cause a WSAEACCES error, though. An attempt to use an IP/Port that is in TIME_WAIT results in an WSAEADDRINUSE error instead.
Some other app has likely grabbed the IP/Port that your app wants to use. If you have not rebooted your machine for 3 days, that app may still be holding the IP/Port. A reboot should clear the error.
Thanks for contacting us.
I believe this is a Windows environment issue as this error isn't one that's returned by the Betfair API.
You can find an article relating to this particular problem via http://www.thinglink.org/socket-error-10013-access-denied.php
Kind Regards,
Neil
Betfair Developer Program
Please note: To help BDP answer your query more efficiently, please open a new ticket for each new query you may have.
API 5.0 & API 6.0 will be retired on the 1st November 2014 at which point applications using these API's will no longer work. Therefore, we recommend that you migrate to API-NG as soon as possible.

Connect iPhone and desktop via HTTP server

How can I get the IP address of an iPhone and access the internal HTTP server?
I want functionality exactly like the CJournal app, to get the backup files in my desktop computer while both it and the iPhone are on the same network, using a dynamically generated link based on the IP address.
This is the screenshot from CJournal app , i made a backup for my contacts list through this app then it generated an url which is clearly shown in the image, in the url 192.168.2.7 is IP address of my iphone in my Wi-Fi network. now please suggest me how to generate this url and how to maintain or access the internal http server through my app
Have you already tried Zeroconf aka Bonjour? This is a DNS Protokol for Service and Device Discovery which is often used in Apple Environments (eg. Airplay) There is also a Windows Framework provided by Apple. On Linux Devices: take a look into Avahi which seems to be the most complete Solution at the Moment. If you need Help on implementation, take a look at the latest WWDC Videos - there have been several Sessions in the last few years.

Blackberry application to establish an http connection

i have been working on developing an blackberry application. as per now i want the application to connect to a local server on my network and fetch a file from that machine. i have been using the library given by a named blackberry developer Mr.peter strange....here is the link for the same Http connection through BIS-B
my requirement would be setting up connection to the local server using any transport mode but it should be able to render the text downloaded.
i tried using the demos provided by blackberry samples as it comes with the plugin for eclipse the http demo from those samples shows only trying to setup an http connection string and the networkapidemo sample shows diffrent http codes when the url is entered as desired.i am running all the applications on the simulator. i havent tried running any of my apps on the hardware
may i know why this problem arises of http codes....ill also want to know guidelines about how to set a simple http connection just to download a file(text file) from a local server.
I have tried many forums too. if anybody would have a look at it i would post it here.
Only a simple connection is becoming a headache!
anyways...waiting for replies..
thanx in advance guys :)
It does not matter whether you want to communicate with local or remote server.
1) See the API docs on HttpConnection. There are sample code in there.
2) Unfortunatelly, on BB you should be aware of Network Transports. Check this thread to get all info you need on Network Transports.
UPDATE:
The second point explains an approach that will work on any OS. If you need an OS 5+ only approach, then check the ConnectionFactory API. ConnectionFactory usage sapmles.

Resources