Python Forum
Trying to cycle through a list of charcters
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trying to cycle through a list of charcters
#11
There is 22 characters after the UC in the address
Reply
#12
(Sep-28-2020, 06:32 AM)pooky2483 Wrote: There is 22 characters after the UC in the address
Sorry, I didn't count them, but because you were looping over range(21) and also said "i shorten it down to 22 characters, as in a YT address" and in the example first two were not black, I decided that black chars are 20
So it's 64**22 words

The point is it's not feasible to brute-force the url.
There are several interesting links https://www.google.com/search?q=youtube+url+algorithm
e.g. https://stackoverflow.com/q/3034861/4046632 on SO, check all answers and comments
Also note the difference between representing the ID of the video and url-shortening
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#13
When I said shorten it, I meant the whole length of uppercase, lowercase, numbers and -_
'-_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
out of all the characters above, using a length of 22, cycle through the above string.

Any better?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Need to fix SyntaxError in cycle try alexfrol86 14 3,058 Mar-27-2022, 07:53 AM
Last Post: stevendaprano
  add Escape charcters in string GrahamL 3 1,140 Jan-20-2022, 01:15 PM
Last Post: GrahamL
  <while> cycle is not interrupted when using the <random>module ShityCoder 3 2,104 Sep-04-2020, 04:05 PM
Last Post: ShityCoder
  Cycle of numpy variables Zero01 0 1,535 Jul-31-2020, 11:58 AM
Last Post: Zero01
  stop cycle while windows11 1 1,968 May-16-2020, 03:17 PM
Last Post: deanhystad
  Occurrences using FOR and IF cycle P86 2 2,472 Jul-29-2019, 04:37 PM
Last Post: ThomasL
  pool map cycle skorost5 5 3,750 Apr-07-2019, 09:21 AM
Last Post: skorost5
  lifetime cycle counter Ixxxxxx 0 2,436 Mar-07-2018, 07:26 PM
Last Post: Ixxxxxx

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020