text:
Illustrate the Least Common Multiple
Given two positive integers, \$A\$ and \$B\$, illustrate their least common multiple by outputting two lines of dashes (-) with length \$\text{lcm}\$\$(A, B)\$ after replacing every \$A\$th dash in the first line and every \$B\$th dash in the second line with vertical bars (|).
In this way, the end of each line will be the only place two |'s line up.

For example, if \$A = 6\$ and \$B = 4\$, \$\text{lcm}(6, 4) = 12\$, so:
two lines of 12 dashes:
------------
------------

replace every 6th dash in the first line with a vertical bar:
-----|-----|
------------

replace every 4th dash in the second line with a vertical bar:
-----|-----|
---|---|---|

Thus the final output would be
-----|-----|
---|---|---|

The order of the input numbers should correspond to the order of the lines.
The shortest code in bytes wins.
Testcases
A B
line for A
line for B

1 1
|
|

1 2
||
-|

2 1
-|
||

2 2
-|
-|

6 4
-----|-----|
---|---|---|

4 6
---|---|---|
-----|-----|

2 3
-|-|-|
--|--|

3 2
--|--|
-|-|-|

3 6
--|--|
-----|

2 5
-|-|-|-|-|
----|----|

4 3
---|---|---|
--|--|--|--|

10 10
---------|
---------|

10 5
---------|
----|----|

10 6
---------|---------|---------|
-----|-----|-----|-----|-----|

24 8
-----------------------|
-------|-------|-------|

7 8
------|------|------|------|------|------|------|------|
-------|-------|-------|-------|-------|-------|-------|

6 8
-----|-----|-----|-----|
-------|-------|-------|

13 11
------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|
----------|----------|----------|----------|----------|----------|----------|----------|----------|----------|----------|----------|----------|

@LeakyNun Extending an answer from https://codegolf.stackexchange.com/q/94999 seems easier than from that one. Either way, people will have fun doing this one which is a decent reason imo.

Can I output an array with two strings, one for each line?

@BlackCap No. Print the strings to stdout or a file or return the whole multiline string.

Bonus for handling arbitrary number of inputs?

Is a leading new-line allowed if the rest of the output is correct?

@KevinCruijssen that sounds ok.

@HelkaHomba Ok thanks; saved 1 more byte. :) (As if there is any other reason to ask such questions on codegolf challenges. ;p)

Python 3, 80 bytes
Saved 1 byte thanks to Halvard Hummel and 1 byte thanks to Jonathan Allan.
import math
def f(*l):
 for k in 0,1:print(l[~k]//math.gcd(*l)*(~-l[k]*"-"+"|"))

Test it online!
lambda*l:"\n".join(l[0]*l[1]//math.gcd(*l)//k*(~-k*"-"+"|")for k in l)
import math

Test it online! (82 bytes - initial answer)
This is the best I could do in Python 2 (81 bytes). It seems like I cannot comment on that answer, I'll just post this here instead:
from fractions import*
l=a,b=input()
for k in l:print a*b/gcd(*l)/k*(~-k*"-"+"|")

Test it online!
First attempt here, probably sub-optimal!

Welcome to PPCG!

@Laikoni Thank you! This seems like a fun community :-)

81 bytes

@HalvardHummel Thanks, will post as an alternative!

While trying a diferent approach entirely I realised your version could be done in 80.

@JonathanAllan Thanks a lot!

Haskell, 57 bytes
x%y=unlines[["-|"!!(0^mod a b)|a<-[1..lcm x y]]|b<-[x,y]]

Try it online!

I've never seen that 0^0=1 trick before - clever

@BlackCap I can't claim it myself because I have seen it a few times before, though I don't remember where I saw the trick first.

Jelly, 12 bytes
Ṭ€ị⁾|-ṁ€æl/Y

Try it online!

MATL, 16 15 bytes
'-|'!i&Zm:G\go)

Input is a column vector with the two numbers. Try it online!
As a bonus, the input can contain more than two numbers. Try it online!
Explanation
'-|'   % Push this string
!      % Transpose. This is needed because of input [1; 1]
i      % Input column vector of 2 (or N) numbers
&Zm    % LCM of the 2 (or N) numbers, say L
:      % Range
G      % Push input again
\      % Modulus, element-wise with broadcast. Gives a 2×L (or N×L) matrix
g      % Convert to logical: gives false for zeros, true for nonzeros
o      % Convert to double: gives 0 for false, 1 for true
)      % Index into string (modular, 1-based). Implicitly display

I think you left in a stray He?

@Sanchises Thanks! Yes, it was in the previous version, but it's not necessary

Also, this seems to work just fine without the transpose? You've been overthinking things... ;)

@Sanchises Without the transpose it doesn't work for input [1; 1], due to how MATL(AB) handles array shape with indexing. (Alternatively, the transpose could be replaced by He at the end, which is why it was initially there)

Ah yes I figured that it was there because of row behaviour but I didn't think of this edge case.

R, 109 105 bytes
function(a,b){q=1:a*b
l=min(q[!q%%a])
x=rep("-",l*2)
x[c(seq(0,l,a),l+seq(0,l,b))]="|"
write(x,"",l,,"")}

Try it online!
Anonymous function. Computes l=lcm(a,b), then generates a range from 0 to l by a, then from l to 2*l by b, setting the indices to | and printing as a matrix with l columns.

Python 2, 66 bytes
l=a,b=input()
while a%b:a+=l[0]
for x in l:print a/x*('-'*~-x+'|')

Try it online!

Husk, 12 bytes
†?'-'|TUṪ`%N

Try it online!
Yeah, there is a lcm builtin in Husk. No, I don't need it.
Bonus: works with any number of input values
Explanation
†?'-'|TUṪ`%N    input:[2,3]
        Ṫ`%N    table of all remainders of positive naturals divided by
                input numbers:
                             [[1,1],[0,2],[1,0],[0,1],[1,2],[0,0],[1,1],[0,2],...
       U        get all elements before the first repeated one:
                             [[1,1],[0,2],[1,0],[0,1],[1,2],[0,0]]
      T         transpose:
                             [[1,0,1,0,1,0],[1,2,0,1,2,0]]
†?'-'|          replace all truthy elements with '-' and all falsy elements
                with '|':
                             ["-|-|-|","--|--|"]
                implicit: since this is a full program, join the resulting array
                of strings with newlines, and print to stdout

Mathematica, 63 bytes
(s=LCM@##;Print[""<>If[i~Mod~#<1,"|","-"]~Table~{i,s}]&/@{##})&

Try it online!
and another version which user202729 really, really, really wants to see posted
Mathematica, 59 bytes
(s=LCM@##;Print[""<>If[#∣i,"|","-"]~Table~{i,s}]&/@{##})&

this one uses special character \[Divides] ∣

If this is Mathematica you can probably use \[Divides] instead of Mod operator to represent divisibility, which saves 4 bytes. Also Mathics TIO should not print the {Null, Null}.

@user202729 I fixed the Mathics print.

I think that your first comment was clear enough. Please stop pressing me in order to make the changes that you want, the exact time you want. Give the users some hours to respond. Some of us have a life out of this place

C, 72 bytes
i;f(x,y){for(i=1;i%y|i%x;)putchar(i++%x?45:124);puts("|");y>0&&f(y,-x);}

Octave, 46 38 bytes
-8 bytes thanks to several suggestions by Luis Mendo
@(a,b)'-|'.'(~mod(1:lcm(a,b),[a;b])+1)

Try it online!

05AB1E, 13 bytes
ʒ<'-×'|«¹.¿∍,

Uses the 05AB1E encoding. Try it online!

Filter was a good idea, I got 17 doing it entirely different .¿Lε²¹‚%_„-|è}øJ».

JavaScript (ES6), 69 bytes
f=(a,b,S,A=1)=>(A%a?'-':'|')+(A%a|A%b?f(a,b,S,A+1):S?'':`
`+f(b,a,1))

Recursively runs until A is divisible by both a and b – outputting a dash or pipe based on a's divisibility by A.
The function then calls itself, swapping a and b.
The S variable prevents the function from calling itself infinitely.
Test Cases:

f=(a,b,S,A=1)=>(A%a?'-':'|')+(A%a|A%b?f(a,b,S,A+1):S?'':`
`+f(b,a,1))

console.log(f(1,1));
console.log(f(1,2));
console.log(f(2,1));
console.log(f(2,2));
console.log(f(6,4));
console.log(f(4,6));
console.log(f(2,3));
console.log(f(3,2));
console.log(f(10,10));
console.log(f(3, 6));
console.log(f(2, 5));
console.log(f(4, 3));
console.log(f(10, 10));
console.log(f(10, 5));
console.log(f(10, 6));
console.log(f(24, 8));
console.log(f(7, 8));
console.log(f(6, 8));
console.log(f(13, 11));

Previous answers:
JavaScript (ES8), 91 bytes
f=(a,b,i=2,g=(c,d)=>d?g(d,c%d):c)=>i?'|'.padStart(a,'-').repeat(b/g(a,b))+`
`+f(b,a,i-1):''

Uses the algorithms:
lcm(a, b) = ab / gcd(a, b)
gcd(c, d) = d ? gcd(d, c%d) : c

Recursively calls itself just once to output the second line.
Test Cases:

f=(a,b,i=2,g=(c,d)=>d?g(d,c%d):c)=>i?'|'.padStart(a,'-').repeat(b/g(a,b))+`
`+f(b,a,i-1):''

console.log(f(1,1));
console.log(f(1,2));
console.log(f(2,1));
console.log(f(2,2));
console.log(f(6,4));
console.log(f(4,6));
console.log(f(2,3));
console.log(f(3,2));
console.log(f(10,10));
console.log(f(3, 6));
console.log(f(2, 5));
console.log(f(4, 3));
console.log(f(10, 10));
console.log(f(10, 5));
console.log(f(10, 6));
console.log(f(24, 8));
console.log(f(7, 8));
console.log(f(6, 8));
console.log(f(13, 11));

JavaScript (ES6), 93 bytes
f=(a,b,i=2,g=(c,d)=>!d=>d?c:g(d,c%d):c)=>i?('-'.repeat(a-1)+'|').repeat(a*bb/g(a,b)/a)+`
`+f(b,a,i-1):''

Same algorithm as before, using repeat instead of padStart.

I thought padStart was ES8?

f=(a,b,A=1)=>(A%a?'-':'|')+(A%a|A%b?f(a,b,A+1):a<0?'':`\n`+f(-b,a))

@l4m2, I can barely understand code that I wrote a year ago, but it does look like yours does shave off some bytes, thanks!

APL (Dyalog), 22 bytes
Assumes ⎕IO←0. Takes A,B as right argument. Bonus: handles input list of any length!
{'|-'[⌽×⍵∘.|⍳∧/⍵]}

Try it online!
{…} anonymous lambda where ⍵ represents the right argument
 '|-'[…] index the string with:
  ∧/ LCM across the input
  ⍳ first that many ɩntegers (0 through N-1)
  ⍵∘.| division remainder table with the input vertically and that horizontally
  × signum
  ⌽ flip horizontally

What does that first assumption mean?

@HelkaHomba It means that arrays index starting at 0, a default on APL interpreters, I believe.

@HelkaHomba Since APL systems come in both 0-based and 1-based flavours, I just write the assumption. Otherwise one would have to have two APLs. E.g. ngn/apl can run this very same code without specifying ⎕IO←0, as that is the default there.

Scala, 98 bytes
print((a to a*b).find(l=>l%a+l%b==0).map(l=>("-"*(a-1)+"|")*(l/a)+"\n"+("-"*(b-1)+"|")*(l/b)).get)

Try it online

Hi, welcome to PPCG! This looks like a great first answer, so +1 from me. I'm not sure, since I've never programmed in Scala, but can *(a-1) be golfed to *~-a and *(b-1) to *~-b? Also, could you perhaps add a TIO link with test code? (Oh, and that avatar doesn't seem very cubic to me. ;p)

Thanks! The trick with *~-a is great, but unfortunately Scala requires more brackets: *(~(-a)) to make clear that the concatenations *~-, *~, ~- are not fancy function names. I added a TIO link.

Ah yes, ~- can be function names in Scala. I remember someone mentioning that before quite a while ago. That's unfortunate regarding golfing. Again welcome, and nice first answer.

Java 8, 125 118 117 bytes
a->b->{String A="\n",B=A,t="|";for(int i=1;!A.endsWith(t)|!B.endsWith(t);B+=i++%b<1?t:"-")A+=i%a<1?t:"-";return A+B;}

-7 bytes thanks to @Nevay.
-1 byte by starting with a trailing new-line (A="",B="\n" replaced with A="\n",B=A).
Explanation:
Try it here.
a->b->{             // Method with two integer parameters and String return-type
  String A="\n",    //  String top line (starting with a trailing new-line)
         B=A,       //  String bottom-line (starting with a new-line)
         t="|";     //  Temp String "|" which is used multiple times
  for(int i=1;      //  Index-integer, starting at 1
      !A.endsWith(t)|!B.endsWith(t);
                    //  Loop as long as both Strings aren't ending with "|"
      B+=           //    After every iteration: append `B` with:
         i++%b<1?   //     If `i` is divisible by `b`:
                    //     (and increase `i` by 1 in the process)
          t         //      `t` (holding "|")
         :          //     Else:
          "-")      //      A literal "-"
    A+=             //   Append `A` with:
       i%a<1?       //    If `i` is divisible by `a`
        t           //     `t` (holding "|")
       :            //    Else:
        "-";        //     A literal "-"
                    //  End of loop (implicit / single-line body)
  return A+B;       //  Return both lines, separated by the new-line `B` started with
}                   // End of method

118 bytes: a->b->{String A="",B="\n",k="|";for(int i=0;!A.endsWith(k)|!B.endsWith(k);B+=i%b<1?k:"-")A+=++i%a<1?k:"-";return A+B;}

@Nevay Thanks. Can't believe I missed the most obvious thing !A.endsWith(t)|!B.endsWith(t) when I was looking for a short way to check whether both are ending with |.. And starting B with a new-line instead of putting it between them at the return is also smart.

Java (OpenJDK 8), 103 bytes
a->b->{String l="",r="|\n";for(int m=0;(++m%a|m%b)>0;r+=m%b<1?'|':'-')l+=m%a<1?'|':'-';return l+r+'|';}

Try it online!
110 bytes, n input values
a->{String s="";for(int v:a){for(int i=1,z=1;z>(z=0);s+=i++%v<1?'|':'-')for(int k:a)z|=i%k;s+='\n';}return s;}

Try it online!

Python 2, 96 88 bytes
Edit: Saved 4 bytes thanks to @Leaky Nun
Edit: Saved 4 bytes thanks to @Rod
lambda a,b:b/gcd(a,b)*("-"*~-a+"|")+"\n"+a/gcd(a,b)*("-"*~-b+"|")
from fractions import*

Try it online!

88 bytes or
77 bytes for a more flexible output

88 bytes

Apparently outputting a list of strings isn't acceptable. :I Replace [...] with '\n'.join(...) to fix.

Haskell, 66 60 bytes
a#b=do x<-[a,b];lcm a b`take`cycle(([2..x]>>"-")++"|")++"\n"

Try it online!

Same length:
a#b=unlines[take(lcm a b)$cycle$([2..x]>>"-")++"|"|x<-[a,b]]

Old solution:
l!x=[1..div l x]>>([2..x]>>"-")++"|"
a#b|l<-lcm a b=l!a++'\n':l!b

You can save a byte with '\n':.

@Laikoni Careful, I am closing in on you

Python 2, 89 bytes
Not the shortest Python 2 entry, but a different approach than gcd which may still be golfable.
a,b=input()
h,p='-|'
x=b*(h*~-a+p),a*(h*~-b+p)
for v in x:print v[~zip(*x).index((p,p)):]

Try it online!

Whispers v2, 131 bytes
> Input
> Input
>> 1⊔2
>> (3]
>> L∣1
>> L∣2
>> Each 5 4
>> Each 6 4
> '-|'
>> 9ⁿL
>> Each 10 7
>> Each 10 8
>> Output 11 12

Try it online!
How it works
If you're unfamiliar with Whispers' program structure, I'd recommend reading the first part of this post.
In this explanation, we'll refer to the two inputs as \$x\$ and \$y\$ respectively. Our first two lines simply take the inputs in, and store them on lines 1 (\$x\$) and 2 (\$y\$). We then move to line 3, which returns \$\alpha = \mathrm{lcm}(x, y)\$ and to line 4, which returns the range \$A = [1, 2, ..., \alpha]\$.
Next, we reach our first two Each statements, operating on each of the inputs:
>> L∣1
>> L∣2
>> Each 5 4
>> Each 6 4

These four lines both operate on \$A\$, but return two different arrays, which we will call \$A_x\$ and \$A_y\$. While being different arrays, they are both formed in similar ways, as can be noted from the similarities in the two pairs of lines. In fact, we can define \$A_x\$ and \$A_y\$ as
$$A_x := [(i \div x) \in \mathbb{Z} \: | \: i \in A]$$
$$A_y := [(i \div y) \in \mathbb{Z} \: | \: i \in A]$$
This leaves us with two lists consisting of a \$1\$ where we'd expect there to be a | character, and a \$0\$ where there should be a -. This takes us to the next section of our code:
> '-|'
>> 9ⁿL
>> Each 10 7
>> Each 10 8

First, we yield the string -|, then we create our next two arrays \$B_x\$ and \$B_y\$. Helpfully, we can use the same function to map \$A_x\$ to \$B_x\$ and \$A_y\$ to \$B_y\$, namely 9ⁿL. This function yields the \$n^{th}\$ element of the string on line 9 i.e. -|, where \$n\$ is either \$0\$ or \$1\$, depending on the element from the respective \$A\$ arrays. This yields the two arrays \$B_x\$ and \$B_y\$ as defined below:
$$(B_x)_i =
\begin{cases}
\text{"-"}, & (A_x)_i = 0 \\
\text{"|"}, & (A_x)_i = 1
\end{cases}$$
$$(B_y)_i =
\begin{cases}
\text{"-"}, & (A_y)_i = 0 \\
\text{"|"}, & (A_y)_i = 1
\end{cases}$$
The Each command is special-cased for when yielding an array of strings, where it returns a single string, rather than an array. Finally, we reach the statement
>> Output 11 12

which outputs \$B_x\$, then a newline, then \$B_y\$

I believe … is one byte shorter than Each, Try it online!, though I can't shake the feeling that there's some way to combine the processes

SOGL V0.12, 19 16 bytes
2{H┌*┐+..*..g/mP

Try it Here!
Explanation:
2{                two times do
  H                 decreate ToS - input - by 1
   ┌*               get that many dashes
     ┐+             append a vertical bar
       ..*          push both inputs multiplied           \
          ..g       push gcd(input1, input2)              | LCM - 7 bytes :/
             /      divide the multiblication by the GCD  /
              m     mold the string to that length
               P    print that in a new line

You documented before implementing? o0

@icrieverytim SOGL has many, many documentated things that aren't implemented. :p The documentation is basically my TODO list (which I rarely do :p)

C (gcc), 121 99 93 92 89 bytes
This should be much shorter, hmmmm....
#define L(x)for(j=-1,i=a;j;&(<:=i.)

Try it online!

this is pretty J

Ruby, 64 57 bytes
->a,b{[a,b].map{|n|(1..a.lcm(b)).map{|x|x%n>0??-:?|}*''}}

-7 bytes thanks to G B.
Try it online!

You don't need to include the 'puts', if the function returns 2 strings it's ok. And you can make it shorter by using the array * operator (array*'' is equivalent to array.join)

@GB thanks for your help!

Charcoal, 32 30 29 bytes
ＮθＮη≔θζＷ﹪ζη≦⁺θζＥ⟦θη⟧…⁺×-⁻ι¹|ζ

Try it online! Link is to verbose version of code. Edit: Saved 1 byte thanks to @ASCII-only.

29 bytes

@ASCII-only Something new to document!

Thanks for documenting! (sorry, I don't really feel like documenting things although I should really do it), if you don't mind there's some more to document https://chat.stackexchange.com/transcript/240?m=40270513#40270513 https://chat.stackexchange.com/transcript/240?m=40270838#40270838 (not sure where the directional casts should go, they're not commands nor are they operators)

Stacked, 42 38 bytes
[:...lcm@z:[:z\/\#-'-'*\rep'|'+out]"!]

Try it online!
Input in the form of a pair of numbers. All the test cases put together look kinda like buildings.
Explanation
This first takes the lcm of the two input numbers into z. Then, for each number k, we generate z / k strings of - of length k - 1, adding | to the end of each, and outputting each.
Previous counted attempts
42 bytes: [:...lcm@z:[:z\/\#-'-'*\rep'|'+''#`out]"!]
Other attempts
43 bytes: [:...lcm@z:[:z\/\#-'-'*\rep'|'#`'|'+out]"!]
45 bytes: ['@lcm'!#~@z,[:z\/\#-'-'*\rep'|'#`'|'+out]"!]
45 bytes: [:...lcm@x[x'-'*\#<$betailmap'|'#`'|'+out]"!]
53 bytes: [:...lcm'-'*@z#-'.'*'('\+')'+'.'+[z\'$1|'repl out]"!]
54 bytes: [:...lcm@x{!x'-'*('('n#-'.'*').')''#`'$1|'repl out}"!]

VBA (Excel) , 144  142 bytes
Sub q()
a=[a1]
b=[a2]
Do Until c=d And d="|"
e=e+1
c=IIf(e Mod a,"-","|")
d=IIf(e Mod b,"-","|")
f=f& c
g=g& d
Loop
Debug.? f& vbCr& g
End Sub

-2 bytes. thanks Sir  Washington Guedes.

JavaScript (ES6), 89
f=(a,b,t=`
`,l=0,R=n=>'-'.repeat(n-1)+'|')=>l||1/t?f(a,b,l<0?t+R(b,l+=b):R(a,l-=a)+t,l):t

Evaluating the LCM with repeated addictions.
Less golfed
F=(a,b, sa='', sb='', la=0, lb=0)=>
{
    var R=n=>'-'.repeat(n-1)+'|'
    if (la != lb || la == 0)
    {
        if (la < lb) {
            sa += R(a)
            la += a
        }
        else
        {
            sb += R(b)
            lb += b
        }
        return F(a, b, sa, sb, la, lb)
    }
    else
        return sa+'\n'+sb
}

Test

f=(a,b,t=`
`,l=0,R=n=>'-'.repeat(n-1)+'|')=>l||1/t?f(a,b,l<0?t+R(b,l+=b):R(a,l-=a)+t,l):t

function update()
{
  var [a,b]=I.value.match(/\d+/g)
  R.textContent = f(+a,+b)
}

update()
<input id=I oninput='update()' value='4 6'>

J, 20 bytes
*./($'-|'#~<:,1:)"0]

Try it online!

Google Sheets, 77 Bytes
Anonymous worksheet formula that takes input from range A1:B1 and outputs to the calling cell
=REPT(REPT("-",A1-1)&"|",LCM(1:1)/A1)&"
"&REPT(REPT("-",B1-1)&"|",LCM(1:1)/B1

-4 Bytes thanks to @EngineerToast

Can you presume that the nothing else is input to row 1? If so, you can shorted LCM(A1,B1) to just LCM(1:1) to save 4 bytes. I think it's reasonable to presume a blank starting sheet and specify where both the inputs and formula are.

Excel VBA, 79 Bytes
Anonymous VBE immediate window function that takes input from the range [A1:B1] and outputs a visualization of their LCM to the VBE immediate window.
This is a port of my Google Sheets answer.
?[Rept(Rept("-",A1-1)&"|",LCM(1:1)/A1)]:?[Rept(Rept("-",B1-1)&"|",LCM(1:1)/B1)]

Japt, 12 bytes
£×/Ury)î|ù-X

Japt Interpreter
Inputs as an array of numbers. Outputs as an array of strings. The -R flag slightly improves how the output looks, but isn't necessary for the logic.
Explanation:
£              For each of the two inputs as X, print...
        |           The string "|"
         ù-X        Left-padded with "-" until it is X characters long
       î            Repeated until its length is
 ×/Ury)             The Least Common Multiple
Extra thanks to Shaggy for finding some bytes to save.

15 bytes

@Shaggy Interesting, I never thought to use that part of Japt in that exact way.

Knocked another few bytes off

Jelly, 11 bytes
,ḍþælị⁾|-ZY

Try it online!
How it works
,ḍþælị⁾|-ZY - Main link. Takes A on the left and B on the right
,           - Pair; [A, B]
   æl       - LCM; L := LCM(A, B)
  þ         - Create a 2×L matrix and for each cell (i,j) i ∈ (A,B), 1 ≤ j ≤ L:
 ḍ          -   Is i divisible by j?
     ị⁾|-   - Index into "|-", replacing 1 with "|" and 0 with "-"
         Z  - Transpose the matrix into a L×2 matrix
          Y - Join by newlines

Pyth - 20 bytes
j.e*/@QtkiFQ+*\-tb\|

Test Suite.

Retina, 67 bytes
\d+
$*-
^((-+)(\2)*) ((\2)+)$
$1$#5$*1¶$4$#3$*11
-1
|
+`(-*.)1
$1$1

Try it online! Link includes test cases.

PHP, 142 bytes
list(,$a,$b)=$argv;for($n=$a;$n<=$a*$b;$n+=$a)if($n%$b==0)break;while($i<$n)echo++$i%$a==0?'|':'-';echo"
";while($j<$n)echo++$j%$b==0?'|':'-';

Try it online !

Javascript (ES6), 84 bytes
f=(a,b,c=1,o=x='-'.repeat(a-1)+'|')=>(o.length%b?f(a,b,0,o+x):o)+(c?`
`+f(b,a,0):'')

Test Cases:

f=(a,b,c=1,o=x='-'.repeat(a-1)+'|')=>(o.length%b?f(a,b,0,o+x):o)+(c?`
`+f(b,a,0):'')

console.log(f(1,1));
console.log(f(1,2));
console.log(f(2,1));
console.log(f(2,2));
console.log(f(6,4));
console.log(f(4,6));
console.log(f(2,3));
console.log(f(3,2));
console.log(f(10,10));
console.log(f(3, 6));
console.log(f(2, 5));
console.log(f(4, 3));
console.log(f(10, 10));
console.log(f(10, 5));
console.log(f(10, 6));
console.log(f(24, 8));
console.log(f(7, 8));
console.log(f(6, 8));
console.log(f(13, 11));

Old answer Javascript (ES6), 91 bytes
f=(a,b)=>{for(x=y='',i=0;!i++||q||r;)q=i%a,r=i%b,x+=q?'-':'|',y+=r?'-':'|';return x+'\n'+y}

AWK, 80 bytes
{for(;++m%$1||m%$2;)for(i=0;i++<2;)r[i]=r[i](m%$i?"-":"|");$0=r[1]"|\n"r[2]"|"}1

Try it online!
For 2 or more values you can use the following 94 bytes:
{m=0;for(x=1;x&&++m;)for(x=i=0;i++<NF;){x+=r=m%$i;R[i]=R[i](r?"-":"|")}for(;++za,b{[a,b].map{|x|(?-*~-x+?|)*(a.lcm(b)/x)}}

Try it online!

PHP, 85 82 bytes
for([,$a,$b]=$argv;++$i%$a|$y=$i%$b;$t.="-|"[!$y])$s.=$i%$a?"-":"|";echo"$s|
$t|";

Try it online.

Perl 6, 39 bytes
{@^a>>.&{('-'x$_-1~'|')x([lcm] @a)/$_}}

Try it online!
Takes input as a pair of numbers and returns a list of lines. Note that you can pass in as many integers as you like and it will print the lcm graph of all of them.

Powershell, 79 bytes
param($a,$b)do{$x+='-|'[!($c=++$i%$a)];$y+='-|'[!($d=$i%$b)]}while($c+$d)
$x;$y

Ungolfed test script:
$f = {

param($a,$b)
do{
    $x+='-|'[!($c=++$i%$a)]
    $y+='-|'[!($d=$i%$b)]
}while($c+$d)
$x;$y

}

@(
    ,(1,1,"| |")
    ,(1,2,"|| -|")
    ,(2,1,"-| ||")
    ,(6,4,"-----|-----| ---|---|---|")
    ,(4,6,"---|---|---| -----|-----|")
    ,(2,3,"-|-|-| --|--|")
    ,(3,2,"--|--| -|-|-|")
    ,(3,6,"--|--| -----|")
    ,(2,5,"-|-|-|-|-| ----|----|")
    ,(4,3,"---|---|---| --|--|--|--|")
    ,(10,10,"---------| ---------|")
    ,(10,5,"---------| ----|----|")
    ,(10,6,"---------|---------|---------| -----|-----|-----|-----|-----|")
    ,(24,8,"-----------------------| -------|-------|-------|")
    ,(7,8,"------|------|------|------|------|------|------|------| -------|-------|-------|-------|-------|-------|-------|")
    ,(6,8,"-----|-----|-----|-----| -------|-------|-------|")
    ,(13,11,"------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------| ----------|----------|----------|----------|----------|----------|----------|----------|----------|----------|----------|----------|----------|")
) | % {
    $a,$b,$expected = $_
    $result = &$f $a $b
    "$(""$result"-eq"$expected"): $a,$b"
    $result
}

Output:
True: 1,1
|
|
True: 1,2
||
-|
True: 2,1
-|
||
True: 6,4
-----|-----|
---|---|---|
True: 4,6
---|---|---|
-----|-----|
True: 2,3
-|-|-|
--|--|
True: 3,2
--|--|
-|-|-|
True: 3,6
--|--|
-----|
True: 2,5
-|-|-|-|-|
----|----|
True: 4,3
---|---|---|
--|--|--|--|
True: 10,10
---------|
---------|
True: 10,5
---------|
----|----|
True: 10,6
---------|---------|---------|
-----|-----|-----|-----|-----|
True: 24,8
-----------------------|
-------|-------|-------|
True: 7,8
------|------|------|------|------|------|------|------|
-------|-------|-------|-------|-------|-------|-------|
True: 6,8
-----|-----|-----|-----|
-------|-------|-------|
True: 13,11
------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|
----------|----------|----------|----------|----------|----------|----------|----------|----------|----------|----------|----------|----------|

Julia 1.0, 52 47 bytes
p->println.(@.("-"^(p-1)*"|").^(lcm(p...).÷p))

Anonymous function; takes a list or tuple of two integers and prints the ASCII-art. Try it online!
Explanation
p->                 Function of p (a list or tuple of two integers):
 println.(   )       Print with newline, vectorized:
  @.(   )             Vectorize throughout the following expression:
    "-"^(p-1)*"|"      String of x-1 hyphens and one pipe for each x in p
   (   ).^(   )        each repeated this many times:
      lcm(p...)         LCM of the two integers in p
               .÷p      divided by each number in p

40 bytes


text:
Casciitum Scribe
Introduction
Cacti come in various different sizes, shapes and colors. However, the most iconic cactus and must-have in every Western has to be the saguaro. Important features are its size and arms, which have defined the stereotypical cactus appearance.
Your task is to bring the saguaro in the ASCII world. However, -- as in the real world -- no saguaro is like another, so your program has to be able to generate saguaros with varying arm configurations.
An example saguaro

Input: [0b10, 0b11] ([2, 3] in decimal, input length of 2)

     _
    / \
 _  | |
/ \ | |
| | | |
\ \_| |
 \__  |
    \ |
 _  | |  _
/ \ | | / \
| | | | | |
\ \_| |_/ /
 \__   __/
    \ /
    | |
    | |
Specifications
A saguaro always has a base and a top, with variable amounts of stem in between. The stem parts can have no arms, an arm on the right, one on the left or two arms.
Saguaro growth patterns are given as an input list containing two-bit values. 00 means no arms, 01 an arm on the right, 10 an arm on the left and 11 two arms (all in binary). The input list's length determines the saguaro's height.
Saguaro sections look like the following. Cactus parts are surrounded by octothorps, #, for clarity which shall not be printed.
A saguaro's height is always equal to 4+6*k characters for nonnegative integers k.
#############
#     _     # Saguaro top
#    / \    #
#############
# _  | |  _ # Stem, both arms
#/ \ | | / \# Stem id: 11
#| | | | | |#
#\ \_| |_/ /#
# \__   __/ #
#    \ /    #
#############
# _  | |    # Stem, left arm
#/ \ | |    # Stem id: 10
#| | | |    #
#\ \_| |    #
# \__  |    #
#    \ |    #
#############
#    | |  _ # Stem, right arm
#    | | / \# Stem id: 01
#    | | | |#
#    | |_/ /#
#    |  __/ #
#    | /    #
#############
#    | |    # Stem, no arms
#    | |    # Stem id: 00
#    | |    #
#    | |    #
#    | |    #
#    | |    #
#############
#    | |    # Saguaro base
#    | |    #
#############
Input
As previously said, the input consists of a list of two-bit values (0, 1, 2, 3 in decimal). It can be given in any reasonable format. The list's first element corresponds to the saguaro's highest stem part, the second element to its second highest stem part, etc.
If you want, you can require the input list's length as an additional input. Please specify it in your answer if you do so.
Output
Your output ASCII saguaro should be built using the exact stem parts as described above. Trailing spaces on a line and trailing new lines are ignored; you may print more, fewer or as many as specified above.
Rules

Standard loopholes apply
This being code-golf, a program's byte count should be minimal

Test cases

An outlier. Input: [0b01, 0b00, 0b01, 0b11]

     _
    / \
    | |  _
    | | / \
    | | | |
    | |_/ /
    |  __/
    | /
    | |
    | |
    | |
    | |
    | |
    | |
    | |  _
    | | / \
    | | | |
    | |_/ /
    |  __/
    | /
 _  | |  _
/ \ | | / \
| | | | | |
\ \_| |_/ /
 \__   __/
    \ /
    | |
    | |

Alternating arms. Input: [0b10, 0b01, 0b10]

     _
    / \
 _  | |
/ \ | |
| | | |
\ \_| |
 \__  |
    \ |
    | |  _
    | | / \
    | | | |
    | |_/ /
    |  __/
    | /
 _  | |
/ \ | |
| | | |
\ \_| |
 \__  |
    \ |
    | |
    | |

An abundance of arms. Input: [0b11, 0b11]

     _
    / \
 _  | |  _
/ \ | | / \
| | | | | |
\ \_| |_/ /
 \__   __/
    \ /
 _  | |  _
/ \ | | / \
| | | | | |
\ \_| |_/ /
 \__   __/
    \ /
    | |
    | |

No arms, also known as a spear. Input: [0b00]

     _
    / \
    | |
    | |
    | |
    | |
    | |
    | |
    | |
    | |

No body, some call it a young cactus. Input: []

     _
    / \
    | |
    | |

can I take the input as the amount of parts and then each parts number separately? (e.g. 1st test-case would be 4 1 0 1 3)

can we ignore the trailing spaces?

@dzaima You may.

@BrianH. Yes; trailing spaces are ignored on every line.

Charcoal, 50 49 bytes
↘_\¶/Ｆ²«Ｊ¹¦²Ｆθ¿﹪÷Ｉκ⁺¹ι²”{➙∧⊟≕δaL7ＹF¬⊕ρ↥↖_K”↓⁶↓²‖Ｔ

Try it online! Link is to verbose version of code. Explanation:
↘_\¶/

Draw the top.
Ｆ²«

Loop over each side.
Ｊ¹¦²

Jump to just under the right side of the top.
Ｆθ

Loop over each stem part.
¿﹪÷Ｉκ⁺¹ι²

Test whether there is an arm.
”{➙∧⊟≕δaL7ＹF¬⊕ρ↥↖_K”

If so print an arm.
↓⁶

Otherwise just print a vertical line.
↓²

After printing the stem, print the base.
‖Ｔ

Reflect ready to draw the other side. Once both sides are drawn, the sides are then reflected back into their final position.

JavaScript (ES6), 210 bytes
I spent far too long on another solution before realising there was a better way, which didn't leave me as much time as I would've liked to work on this.
a=>`     _
    / \\`+a.map(([x,y])=>`
 1  | |  2
3 5 | | 4 6
7 7 | | 8 8
5 51| |24 4
 511${`| `[x]} ${`| `[y]}224
    ${`|\\`[x]} `.replace(/\d/g,m=>` _/\\|`[m%2?x*-~m/2:y*m/2])+`|/`[y],s=`
    | |`).join``+s+s

Try it

o.innerText=(f=
a=>`     _
    / \\`+a.map(([x,y])=>`
 1  | |  2
3 5 | | 4 6
7 7 | | 8 8
5 51| |24 4
 511${"| "[x]} ${"| "[y]}224
    ${"|\\"[x]} `.replace(/\d/g,m=>` _/\\|`[m%2?x*-~m/2:y*m/2])+"|/"[y],s=`
    | |`).join``+s+s
)(i.value=["11","10","01","00"]);oninput=_=>o.innerText=f(i.value.split`,`)
<input id=i><pre id=o>

this in taking literal 00,01,10,11 as input, instead of binary input or 0,1,2,3. using OP test cases this fails.

@BrianH.: Quoting the challenge spec on input: "It can be given in any reasonable format"

but it states "the input consists of a list of two-bit values (0, 1, 2, 3 in decimal)." right before that... (btw im not downvoting or anythin, this is insanely clever, it's just that per my interpretation of the rules the input doesn't match)

Python 2, 189 bytes
lambda l:'     _\n    / \\\n'+'\n'.join(('    |',' /|\  _   \  \|\_    __ |||| \\'[j::6])[i/2]+' '+('|','|||| /   __  /|/_ _   /  \|/'[j::6])[i%2]for i in l for j in range(6))+'\n    | |'*2

Try it online!

Python 2, 256 253...205 203 199 bytes
r=[('     _',''),('/','\ ')]
for a in input()+[0]:r+=zip(*[['|'*6,'_|    |_,,/|  \/  |\,,||  ||  ||,,\| _\/_ |/,,\ ____ /,,\/'[i::2].split(',')][2-i&a>0]for i in 0,1])
for l in r[:-4]:print'%5s %s'%l

Try it online!

As you do in other string literals, in the first line you can omit the escaping backslash.

It looks like you could save 18 bytes by removing all the trailing spaces.

for ...:\n r...\n r... -> for ...:r...;r... saves three bytes.

Java (OpenJDK 8), 626 566 499 466 398 312 310 308 bytes
Can be golfed a tonne
a->{String r=" |,",g="    |",n="     _,    / \\,";boolean j,k;for(int e:a)n+=((k=e>1)?" _  |":g)+((j=e%2>0)?" |  _,":r)+(k?"/ \\ |":g)+(j?" | / \\,":r)+(k?"| | |":g)+(j?" | | |,":r)+(k?"\\ \\_|":g)+(j?" |_/ /,":r)+(k?" \\__ ":g)+(j?"  __/,":r)+(k?"    \\":g)+(j?" /,":r);return(n+g+r+g+r).replace(",","\n");}

Try it online!

You can save 2 bytes by changing {j=e>1;k=e%2>0;n+=(k?" _  |":g)+(j?" |  _,":r)+ to n+=((k=e%2>0)?" _  |":g)+((j=e>1)?" |  _,":r)+ and removing the closing } of the for-loop as well.

You have the "arms" the wrong way 'round for 1 and 2.

PowerShell, 235 bytes
param($a)'     _
    / \'
($a|%{((,'1|'*6),('1|  _
1| / \
1|2
1|_/ /
1 __/
1/'),(' _ 2
/ \2
| |2
\ \_| |
 \__  |
    \ |'),(' _ 2  _
/ \2 / \
| |22
\ \_| |_/ /
 \__   __/
    \ /'))[$_]})-replace1,'    | '-replace2,' | |'
,'    | |'*2

Try it online!
PowerShell doesn't have a map or zip or a real easy way to reverse strings, so we're left with something else -- simple replacements of repeated sections.
The first two lines take input as an array of integers and output the top of the cactus. Then we loop through $a and select into an array of four strings based on the current value. Those strings are left on the pipeline and then we use our -replace to fill in the appropriate spots. We then put the bottom of the cactus onto the pipeline as well.
Everything is gathered from the pipeline and an implicit Write-Output happens at program completion, inserting a newline between every element.

05AB1E, 76 75 bytes
„ _…/ \‚4ú»,v6F'|4ú"_ |/\"•Aö¡Èèj{^ë•5вèJ5ôNè©‚y1›èð'|®∞2äθ‚yÉèJ,}}„| 4úû=,

Try it online!

Meh, I'ma try to beat ya, doubt it though.

@MagicOctopusUrn: Good luck! Hope you manage it (and maybe turn it into a skirmish :P)

My one good idea to beat this was squashed by like 30 bytes b/c of the command I posted in the "oasis/05AB1E" chat. Nice golf, if I tried now it'd just be too close.

SOGL V0.12, 56 54 53 bytes
5⁷yΙ‚‘∑≡`a#¾‘O.{@.2%i»¹{"⁸G‘6∙;?X"j1>ζ╔²i[n¹‘5n}┼±↔}O

Try it Here!
Explanation:
..‘                   push the ending part - "    | |\n    | |"
   ..‘O               output the starting part - "     _ \n    / \"
       .{             input times do
         @              push a space
          .2%           push input%2
             i»         push floor(prevInput/2)
               ¹        wrap the two in an array

{                   }   for each of the two numbers
 "..‘                     push "|    " - base stem
     6∙                   multiply vertically 6 times
       ;?       }         if the current item iterating over is truthy (i.e. != 0)
         X                  remove ToS - the regular stem - from the stack
          "..‘              push "|  _ | / \| | ||_/ / __/ /    " - stem with an arm
              5n            split it into line lengths of 5
                 ┼        add that horizontally to the space pushed earlier (or whatever it's become)
                  ±↔      reverse ToS - the stem currently - horizontally
                     O  output the array of the current part

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
It's a find-a-movie challenge
This is a simple(ish) web scraping challenge.
Input
Your code should take an MPAA film rating and a number from 0 to 100 as input. It can do this in any way you find convenient.
Output
Your code should return the name of any movie which has a) that film rating and b) the numerical score on the Tomatometer from rottentomatoes.
If there is no such movie it can output anything you like.
The possible MPAA film ratings are G, PG, PG-13, R, NC-17, NR.
Your code may report one or more movies, that is up to you.
To clarify, your code is meant to access the web to get the answers to queries.
Example
Say the input is "PG, 98" then your code could output "Zootropolis".
Please show an example of your code working with the film rating PG and score 98 along with your answer.

O_O NC-17 sounds bad

NC-17, unlike the others, is supposed to be inappropriate. :P

Should my answer return more than one movie?

@BlackCap Edited the question.  That's up to you.

Zootropolis or Zootopia?

@BlackCap They are the same movie I believe just renamed for different countries.

This challenge should be edited so the answer isn't a simple web request to the rottentomatoes API.

@Tom  I think the current answerers wouldn't like that. But it's not quite a simple web request currently, there is json to parse (or grep).

Would it break a rule if someone created a goo.gl link to decrease the link address size?

@RobertBenson Yes.

PG-13 doesn't seem to appear in the API, only PG13 does. Consider changing your question to account for that.

I'll be saving some of the answers to help when I can't pick a movie...fun puzzle!

I'm not sure where people have found this API address, but as best as I can tell, this challenge seems to go against the policies of Fandango (the owner of rottentomatoes) as can be viewed here and from their ToS linked from there.

In looking into the API's JSON, I have discovered that it will, by default, only return 32 results at at a time. There are however 123 films (as of this writing) with a score of 98 (for example) meaning that there is a possibility that, although films might exist with the given score and rating, they may not be returned in those 32. More results can be requested using the limit parameter but the maximum is 876 and there are currently 1315 films with a score of 100 (for example) - the other 439 can be retrieved by adding the page parameter.

Does this information invalidate all answers, including my own?

@Shaggy Only if you can find a case where your code doesn't give the right answer in practice.

Stratos, 133 bytes
{
f"www.rottentomatoes.com/api/private/v2.0/browse?minTomato=%&maxTomato=%&type=dvd-streaming-all"r"results")s"mpaaRating"=⁰
s"title"

Try it!

Could you show an example of your code being used please.

@Lembik Well, run it, and type in the number, press enter, type in the rating, press enter, and it will give you the output.

Can you drop the www.?

@Shaggy Unfortunately not.

Maybe you could just post a screenshot of it running?

@Lembik Added a link.

Stratos specializes in web challenges

Bash, 182 bytes
curl "https://www.rottentomatoes.com/api/private/v2.0/browse?minTomato=$2&maxTomato=$2&type=dvd-streaming-all" 2>/dev/null|grep -o "{[^}]*aRating\":\"$1\""|grep -Po 'title":"\K[^"]*'

Usage:
$ bash script PG 98
The Island President
Inside Out
Zootopia
Paddington
Love & Friendship
Long Way North (Tout en haut du monde)

I really like this answer.

JavaScript (ES6), 167 162 159 bytes
Needs to be run from the root of rottentomatoes.com. Returns a Promise object containing the title.
s=>n=>fetch(`api/private/v2.0/browse?minTomato=${n}&maxTomato=${n}&type=dvd-streaming-all`).then(r=>r.json()).then(j=>j.results.find(x=>x.mpaaRating==s).title)

If we can require that it be run in a specific directory then it becomes 139 bytes:
s=>n=>fetch(`browse?minTomato=${n}&maxTomato=${n}&type=dvd-streaming-all`).then(r=>r.json()).then(j=>j.results.find(x=>x.mpaaRating==s).title)

It would be great if there were a click and look way to test Javascript answers.

@Lembik: normally that can be done when working with APIs but, in this case, RT's CORS policy prevents it. Thanks for the accept, by the way.

Hmm..I just noticed there are shorter answers but I don't have the energy/expertise to test Stratos code right now. If I do, I will have to change the accept, sorry.

@Lembik: I fully expected Stratos to get it (so far).

Oh I added a bounty to the other find-a-movie question :)

Python 2 + requests, 209 204 bytes
-5 bytes thanks to Ian Gödel.
lambda r,t:[i['title']for i in get('http://rottentomatoes.com/api/private/v2.0/browse?minTomato=%d&maxTomato=%d&type=dvd-streaming-all'%(t,t)).json()['results']if i['mpaaRating']==r]
from requests import*

Think you may need (t,t) where you have (r,r)

You can use this link: http://rottentomatoes.com/api/private/v2.0/browse?minTomato=%d&maxTomato=%d&type=dvd-streaming-all (https -> http and drop the www.) for a couple of bytes saved.

Could you show an example of your code being used please.

q/kdb+, 168 bytes
Solution:
{(r(&)(r:.j.k[.Q.hg`$"https://www.rottentomatoes.com/api/private/v2.0/browse?type=dvd-streaming-all&min",t,"&max",t:"Tomato=",y]`results)[;`mpaaRating]like x)[;`title]}

Example:
q){(r(&)(r:.j.k[.Q.hg`$"https://www.rottentomatoes.com/api/private/v2.0/browse?type=dvd-streaming-all&min",t,"&max",t:"Tomato=",y]`results)[;`mpaaRating]like x)[;`title]}["PG";"98"]
"The Island President"
"Inside Out"
"Zootopia"
"Paddington"
"Love & Friendship"
"Long Way North (Tout en haut du monde)"

Explanation:
.Q.hg           / fetch a URL
.j.k            / parse json string into Q dictionaries
`results        / index into dictionary with key `results
[;`mpaaRating]  / index into these sub dictionaries extracting mpaaRating
like x          / binary list where they match, e.g. "PG"
(&)             / where, list indices where true
[;`title]       / index into dictionary with key `title

Notes:

If you want to try this out yourself, take a read through the Cookbook/SSL page to ensure your environment is setup correctly.
Fails if we remove the s of https, or the www., gives 301 Permanently Moved response.

Maybe add a link for "q/kdb+" in the title of your answer? A lot of people will never have heard of it and you can educate them (me).

Done :) I was hoping to write a solution in oK but getting a 'No 'Access-Control-Allow-Origin' header is present...' when using the online repl (http://johnearnest.github.io/ok/index.html), so have falled back to the closed-source Q.

JavaScript (ES2017), 158 bytes
async(r,n)=>(await(await fetch(`api/private/v2.0/browse?minTomato=${n}&maxTomato=${n}&type=dvd-streaming-all`)).json()).results.find(m=>m.mpaaRating==r).title

Run from the Rotten Tomatoes home page:
f=async(r,n)=>(await fetch(`api/private/v2.0/browse?minTomato=${n}&maxTomato=${n}&type=dvd-streaming-all`).then(x=>x.json())).results.find(m=>m.mpaaRating==r).title
f('PG',98).then(console.log)

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
A British find-a-movie challenge
This is a more difficult version of  It's a find-a-movie challenge .
Input
Your code should take a BBFC rating and a number from 1 to 5 as input. It can do this in any way you find convenient.
Output
Your code should return the name of any movie which has a) that film rating and b) that number of stars in a Guardian film review.
If there is no such movie it can output anything you like.
The possible BBFC film ratings are U, PG, 12, 12A, 15, 18, R18, TBC.
Your code may report one or more movies, that is up to you.
To clarify, your code is meant to access the web to get the answers to queries.
Example
Say the input is U, 5 then your code could output "My Neighbour Totoro".
Please show an example of your code working with the film rating PG and score 4 along with your answer.
Notes
The Guardian does have an API but this requires registration.  For this challenge you may not use it.
Example code
The following Python 3 code gets all the movies along with their score out of 5, although not 100% perfectly.
from bs4 import BeautifulSoup
import requests
import sys

for i in range(1,837):
    print("Page", i,file=sys.stderr)
    result = requests.get("https://www.theguardian.com/film+tone/reviews?page={0}".format(i))
    data = result.text
    soup = BeautifulSoup(data, "lxml")

    tags = soup.find_all("div", {"class":"stars"})

    for tag in tags:
        stars = 0
        for star in tag.find_all("span", {"class":"star__item--grey"}):
            stars +=1
        main = tag.parent
        title = main.find("h2")
        if title:
            a = title.find("span", {"class":"js-headline-text"})
            print("{} - {}".format(5 - stars, a.text))

NodeJS
I'm an awful golfer tho
The inputs must be passed like this node filename 12,12A,15,18 4 for fetching a movie with one of the ratings comma separated and at least 4 stars
var fetch=require('node-fetch');
var {JSDOM, VirtualConsole}=require('jsdom');

var f=x=>fetch(x).then(r=>r.text());
var vc = new VirtualConsole(); // ignore annoying css errors
var [bbfc='U,PG,12',stars='3']=process.argv.slice(2);

var Z=async()=>{
    for(var i=0;i<10;i++){ // 10 max pages, can be anything
        var t= await f(`https://www.theguardian.com/film+tone/reviews?page=${i}`);
        var w=new JSDOM(t, {virtualConsole:vc}).window;
        for(var h of w.document.querySelectorAll('.fc-item__header')){
            if (h.querySelectorAll('.star__item--golden').length>=stars){
                var title=h.querySelector('.js-headline-text').textContent.split(' review')[0].trim();
                var t=await f('http://www.bbfc.co.uk/search/releases/'+title);
                var rating=t.match(/BBF\w_(\w+)_/)[1];
                if(bbfc.includes(rating)) return title;
            }
        }
    }
};

Z()
.then(console.log)
.catch(console.error)

At least you can remove lots of unnecessary whitespaces, and you must also include the bytecount.

That's 956 bytes, but removing whitespaces  could save you some.

It works! However the question asks for exactly the right score, not at least the score.

I found a bug I think. Try node caub.js U 4.  You get Peter Bradshaw's film of the week  Daphne. First, Daphne is rated 15 and second you need to extract the movie name.

The code crashes on page 28 with TypeError: Cannot read property '1' of null
at Z (/home/foo/caub.js:17:51)
at process._tickCallback (internal/process/next_tick.js:109:7)

On page 22, the code returns "The Florida Project" as a "U" rated movie but it isn't rated at all yet by the BBFC as far as I can tell and it's R rated in the US so it can't be right. See e.g. http://www.bbfc.co.uk/search/releases/The%2BFlorida%2BProject . I general it might give the wrong answer for movies for which the BBFC has no rating.

instead of var variable;var variable, use var variable,variable,variable. and get rid of whitespace.

Javascript/JQuery - 517 504 494 bytes
Not really golfed at all, just wanted to write an answer.
x=>y=>{t=n=i=1;f=()=>{if(t){$.get("https://www.theguardian.com/film+tone/reviews?page="+i,d=>{l=$(d).find("div.stars").toArray().slice(1);for(k=0;k<l.length&&t;k++){((j,m)=>($.get('http://www.bbfc.co.uk/search/releases/'+encodeURI(n=$(m[j].parentNode).find("h2 span.js-headline-text").text().split(" review")[0]),(p=>b=>{if(/BBFC_(.*?)_/.exec($(b).find(".symbol img")[0].src)[1]==y&&$(m[j]).find(".star__item--golden").length==x){if(t)alert(p);t=0}})(n))))(k,l)}});i++;setTimeout(f,2000)}};f()}

It waits 10 sec before trying another page to stop the program from doing too many requests concurrently, so it may take some time with some inputs.
Examples:

I don't know JS, but I do know that x=>y=> using currying is a byte shorter than (x,y)=>.

Thank you for giving the first answer!  Is it possible to make a https://tio.run/# link for it?

@Lembik TIO cannot access the internet. Since this is JS, a Stack Snippet could be used, or it's reasonably easy to run the code in your browser's console.

since when jquery is allowed in golfing? use fetch

Can you show an example of your code running? I am having no luck getting it to work. My steps: open new tab, press F12, enter f=(x,y)..., f("U",5) . Then f("U",5) gives me
TypeError: $.get is not a function [Learn More]

@caub as it's included in the language of the answer, it's allowed to be used. It's the same as using libraries in other languages.

@dzaima Wasn't the complaint that it is one character longer?

@Lembik that's cuz you don't have jquery. Easiest way is to just run it in the console on http://jquery.com. Also, you'll need to disable cors if you're running it in the browser

@Lembik added examples

Python + BS4 - 631 bytes
Lembik wanted a Python answer so he could run it, so I made one, but its way longer.
from bs4 import BeautifulSoup as b
import requests
def f(x,y):
 i=n=1
 while 1:
  for m in b(requests.get("https://www.theguardian.com/film+tone/reviews?page="+`i`).text,'lxml').find_all('div',{'class':'stars'}):
         a=m.parent.find('h2')
         if a:
          e=a.find('span',{'class':'js-headline-text'}).text.split(" review")[0]
          s=b(requests.get('http://www.bbfc.co.uk/search/releases/'+requests.utils.quote(e)).text,'lxml').find("p",{"class":"symbol"})
          if s and s.find("img").get('src').split("BBFC_")[1].split("_")[0]==y and len(m.find_all('span',{'class':'star__item--golden'}))==x:return e
  i+=1

The code crashes on page 6 with "Traceback (most recent call last):
File "guardianfilm-2.py", line 17, in
print f(5, "U")
File "guardianfilm-2.py", line 13, in f
if s and s.find("img").get('src').split("BBFC_")[1].split("_")[0]==y and len(m.find_all('span',{'class':'star__item--golden'}))==x:
IndexError: list index out of range
"

621 bytes with a bit of reordering and link tweaking.

@Mr.Xcoder You can save a few bytes by optimizing indentation.

Is the variable n used at all in your code?


text:
Find the Intersections
Let us consider a regular n-sided polygon where all of the sides are equal in length with n being a natural number larger than or equal to three. All of the vertices lie on the unit circle (circle of radius one centered at the origin) and one of the vertices is always at the coordinate (x,y)=(1,0). Now let's draw all possible diagonals (including the edges) which connect all n vertices to one another. Here is an example for n=11.

This results in n-choose-2 (which is just n(n-1)/2) lines (diagonals and edges) which in this case is 55. The total number of line intersections, counting the interior intersection points as well as the n vertices, will be denoted I and I=341 in this case.
The Goal
Your goal is to write a full program or a function which takes in an integer n larger than or equal to three and outputs a list of (x,y) coordinates of all of the intersections of all of the diagonals and edges, that are contained within the regular n-sided polygon with one of its vertices being at (1,0). This includes the n vertices themselves which lie on the unit circle. The length of this list must be I. There is an OEIS sequence for I, which is A007569 and here is a paper which talks about it.
Rules and Specifications

Standard loopholes are forbidden.
Each coordinate has to be an ordered 2-tuple, giving the (x,y) coordinates in the Cartesian system.
The list of coordinates can be in any order. It doesn't have to be sorted or in any particular order.
All of the coordinates provided must be accurate to at least six significant figures. I am not specifying a rounding method. You are free to choose any rounding method or to simply chop off a number. Also for n large enough, it will be the case that two distinct intersections (in exact arithmetic) will be equal to each other to six significant figures in both coordinates (in floating point arithmetic). In this case you are free to treat them as the "same" and remove the "duplicates" from your list. The length of your list will be less than I, but oh well!
The coordinates can be in decimal or scientific notation. For small enough n, decimal notation is fine and decimal notation will make it easier to check so it is preferred. But I am not mandating one over the other.
Outputting I, which should be the length of your coordinate list, is not a requirement for this task. You don't have to output it.

You can assume whatever input/output form that is appropriate for your language. You can also assume that the input will always be a positive integer greater than or equal to three. In case of any other input, your program is free to do whatever it wants. You can also assume that the input and output will always be in the numerical range of your language/environment. Trailing newlines are okay in the output.
Some Test Cases
I am showing more significant digits here than I need to. You are only required to show six. Remember, you don't have to print I.
n => 3

I => 3
(1.000000000,0)
(-0.5000000000,0.8660254038)
(-0.5000000000,-0.8660254038)

n => 4

I => 5
(1.000000000,0)
(0,1.000000000)
(-1.000000000,0)
(0,0)
(0,-1.000000000)

n => 5

I => 10
(1.000000000,0)
(0.3090169944,0.9510565163)
(-0.8090169944,0.5877852523)
(-0.1180339887,0.3632712640)
(0.3090169944,0.2245139883)
(-0.8090169944,-0.5877852523)
(0.3090169944,-0.2245139883)
(-0.1180339887,-0.3632712640)
(0.3090169944,-0.9510565163)
(-0.3819660113,0)

n => 6

I => 19
(1.000000000,0)
(0.5000000000,0.8660254038)
(-0.5000000000,0.8660254038)
(0,0.5773502692)
(0.2500000000,0.4330127019)
(0.5000000000,0.2886751346)
(-1.000000000,0)
(0,0)
(0.5000000000,0)
(-0.5000000000,0)
(-0.5000000000,-0.8660254038)
(0.5000000000,-0.2886751346)
(0.2500000000,-0.4330127019)
(0,-0.5773502692)
(0.5000000000,-0.8660254038)
(-0.5000000000,0.2886751346)
(-0.2500000000,0.4330127019)
(-0.2500000000,-0.4330127019)
(-0.5000000000,-0.2886751346)

n => 7

I => 42
(1.000000000,0)
(0.6234898019,0.7818314825)
(-0.2225209340,0.9749279122)
(0.1539892642,0.6746710485)
(0.3215520661,0.5410441731)
(0.4559270000,0.4338837391)
(0.6234898019,0.3002568637)
(-0.9009688679,0.4338837391)
(-0.05495813209,0.2407873094)
(0.3215520661,0.1548513136)
(0.6234898019,0.08593599577)
(-0.5244586698,0.3479477434)
(-0.2225209340,0.2790324255)
(0.1539892642,0.1930964297)
(-0.9009688679,-0.4338837391)
(0.1539892642,-0.1930964297)
(0.6234898019,-0.08593599577)
(-0.2225209340,-0.2790324255)
(0.3215520661,-0.1548513136)
(-0.5244586698,-0.3479477434)
(-0.05495813209,-0.2407873094)
(-0.2225209340,-0.9749279122)
(0.6234898019,-0.3002568637)
(0.4559270000,-0.4338837391)
(0.3215520661,-0.5410441731)
(0.1539892642,-0.6746710485)
(0.6234898019,-0.7818314825)
(-0.4314683302,0.5410441731)
(-0.2225209340,0.5887350528)
(-0.05495813209,0.6269801688)
(-0.2225209340,0.1071604339)
(0.07941680185,0.3479477434)
(-0.5990311321,-0.1930964297)
(-0.3568958679,0)
(0.2469796037,0)
(0.07941680185,-0.3479477434)
(-0.05495813209,-0.6269801688)
(-0.6920214716,0)
(-0.5990311321,0.1930964297)
(-0.2225209340,-0.1071604339)
(-0.2225209340,-0.5887350528)
(-0.4314683302,-0.5410441731)

I can provide more test cases but they will take up a lot of space and I am not sure how to provide them here. Let me know if you guys need more cases and what is the best way for me to provide them.
Scoring
This is code-golf. The answer with the smallest byte-count will win. In case of a tie, I will pick the answer that was posted earlier as the winner.
Please post your answer in the standard format with all compiler/interpreter options/flags.

Are three-line intersections (such as the center of the hexagon) counted once or twice?

@LuisMendo No matter how many lines intersect at a point, the point is only counted once.

Python 3, 211 204 bytes
from itertools import*
C=combinations
lambda n:{(round(z.real,6),round(z.imag,6))
          for z in[(a*b*c+a*b*d-a*c*d-b*c*d)/(a*b-c*d)
          for(a,b),(c,d)in C(C([23.140693**(2j*k/n)for k in range(n)],2),2)]
          if abs(z)<=1}

For readability I've added superfluous newlines in my answer that aren't included in the bytecount.
If we have a line crossing through points a and b, and another line crossing through points c and d, where a, b, c, d are complex numbers, then the intersection between those lines (not segments!) is

But for a point u on the unit circle, the conjugate of u is 1/u. Then the formula simplifies to:

Now, if the intersection of the two lines also lies within the unit circle, that's a proper intersection of the diagonals.

Mathematica 165 143  112 bytes
53 bytes saved by Misha Lavrov!
22 thanks to his suggestion to use Cases instead of Select.
31 additional bytes saved thanks to his suggestion to use CirclePoints.
(s=Subsets;Union@Cases[RegionIntersection@@@s[Line/@s[N[{1,Pi/2}~CirclePoints~#,8]&@#,{2}],{2}],Point@{x_}:>x])&

Table[{Cos[Pi/2+(2k Pi)/# ],Sin[Pi/2+(2k Pi)/# ]},{k,0,#-1}] generates the coordinates of the vertices of a regular polygon (inscribed in the unit circle) with one vertex at (0,1).
Line segments are then defined for each subsets of possible pairs of those coordinates.
RegionIntersection finds a point of intersection for each pair of these line segments (iff such intersection exists).
Cases[... Point@{x_} :> x] returns the coordinates.  Cases in which two segments do not intersect are ignored.
Union eliminates possible duplicates.

Example (n=7)
(s = Subsets;
Union@Cases[
 RegionIntersection @@@s[Line /@s[N[{1, Pi/2}~CirclePoints~#&@#, {2}], {2}],
Point@{x_} :> x]) &[7]

{{-0.974928, -0.222521}, {-0.781831, 0.62349}, {-0.674671,
  0.153989}, {-0.62698, -0.0549581}, {-0.588735, -0.222521}, \
{-0.541044, -0.431468}, {-0.541044,
  0.321552}, {-0.433884, -0.900969}, {-0.433884,
  0.455927}, {-0.347948, -0.524459}, {-0.347948,
  0.0794168}, {-0.300257,
  0.62349}, {-0.279032, -0.222521}, {-0.240787, -0.0549581}, \
{-0.193096, -0.599031}, {-0.193096, 0.153989}, {-0.154851,
  0.321552}, {-0.10716, -0.222521}, {-0.085936,
  0.62349}, {0., -0.692021}, {0., -0.356896}, {0., 0.24698}, {0.,
  1.}, {0.085936, 0.62349}, {0.10716, -0.222521}, {0.154851,
  0.321552}, {0.193096, -0.599031}, {0.193096,
  0.153989}, {0.240787, -0.0549581}, {0.279032, -0.222521}, {0.300257,
   0.62349}, {0.347948, -0.524459}, {0.347948,
  0.0794168}, {0.433884, -0.900969}, {0.433884,
  0.455927}, {0.541044, -0.431468}, {0.541044,
  0.321552}, {0.588735, -0.222521}, {0.62698, -0.0549581}, {0.674671,
  0.153989}, {0.781831, 0.62349}, {0.974928, -0.222521}}
Graphics[{PointSize[Large], Blue, Point@%}, Axes -> True]

We can simplify thing somewhat by using Cases instead of Select. Change Select[...,Head@#==Point&] to Cases[...,Point@_] and, as a bonus, we can do the wrapper-removal at the same time by making it Cases[...,Point@{x_}->x].

Also, there's a built-in CirclePoints: CirclePoints[#] or CirclePoints@# will get us n evenly spaced points around the unit circle, and CirclePoints[{1,Pi/2},#] or {1,Pi/2}~CirclePoints~# will get us n points rotated so that (1,0) is included.

@MishaLavrov, First use I've seen of CirclePoints with rotation. You clearly examined the code carefully. Thanks


text:
Build me some string stairs
String Stairs
Disclaimer: This is the first challenge I propose. Any and all feedback is welcome. If this is a duplicate, please point it out.
Here's a link to the sandbox post.
Goal
The goal of this challenge is to, given a string and an integer, print the string into blocks of that integer's size. If a word has more characters than the size of a block, print it into a descending "stair" pattern.
Rules

The "stair pattern" mentioned above means that, for every block of a same word, that block must begin exactly where the block above it ends. Check the test cases (or ask) if you have any questions.
If a word is broken in multiple blocks, the following word must be printed with an adequate number of spaces, that is, it must be separated from the preceding word's lowermost block by exactly one whitespace. Check the test cases (or ask) for clarification.
You can assume the input string will consist only of printable ASCII characters. Also, it will not have multiple whitespaces in a row.
You can also assume that the integer will always be in the range [1, +∞).
Trailing whitespace or newlines are allowed.
You can use any reasonable method for I/O.
Standard Loopholes apply.
This is code-golf, so shortest code (in bytes, per language) wins. After a week (or so), I'll accept the overall shortest answer.

Test Cases
(String, Integer) => (Output)

"This is a large string", 3 => Thi is a lar  str
                                 s        ge   ing

"This is an even larger string!", 2 => Th  is an ev  la   st
                                        is        en  rg   ri
                                                       er   ng
                                                             !
"Ooooh dear, what a big string you have!", 3
=> Ooo  dea  wha a big str   you hav
     oh   r,   t         ing       e!

"Staphylococcus saprophyticus", 4 => Stap        sapr
                                        hylo        ophy
                                           cocc        ticu
                                              us          s

"I hope you find this challenge interesting", 2
=> I ho  yo fi  th  ch    in
      pe  u  nd  is  al    te
                      le    re
                       ng    st
                        e     in
                               g

"Well, this test case looks kinda pointless now doesn't it?", 15
=> Well, this test case looks kinda pointless now doesn't it?

"This one looks a lot more interesting!", 1 => T o l a l m i
                                               h n o   o o n
                                               i e o   t r t
                                               s   k     e e
                                                   s       r
                                                           e
                                                           s
                                                           t
                                                           i
                                                           n
                                                           g
                                                           !
"Keep in mind, people: 'Punctuation! Does! Matter!'", 2
=> Ke  in mi  pe   'P      Do  Ma
    ep     nd  op   un      es  tt
            ,   le   ct      !   er
                 :    ua          !'
                       ti
                        on
                         !

can there be an equal amount of leading spaces on each line?

Bonus: use Zalgo for block size-1 t̳͔̲̻̫̪ḛ͕̦̙͔̩͎͉̝̞ͅx̳͖̬̥̱͓̭̙̤͇̘̲ț͎̣̫̪̩̟̯͈͙͈̗̳͕̹̙̣ͅ

@dzaima I'm not sure what you mean by that, but I don't see why not. Care to give an example?

@J.Salle this

@dzaima yeah sure, no problem.

Charcoal, 22 bytes
Ｆ⪪θ «↑⸿⸿ＦＬι«Ｍ¬﹪κＩη↙§ικ

Try it online! Link is to verbose version of code. Explanation:
  θ                      First input
 ⪪                      Split on spaces
Ｆ   «                   Loop over each word
     ↑⸿⸿                Move the cursor to the top row and two columns right*
          ι             Current word
         Ｌ              Length
        Ｆ  «            Loop over implicit range
               κ        Current index
                 η      Second input
                Ｉ       Cast to integer
              ﹪         Modulo
             ¬          Logical not
            Ｍ     ↙     Move that many characters down and left
                    ι   Current word
                     κ  Current index
                   §    Index into word and implicitly print

*More precisely, "move to the start of the next line twice, but as if the canvas was rotated." Edit: In between this challenge being set and this answer being accepted, Charcoal actually acquired a means of splitting a string into pairs of characters, reducing the code 16 bytes:
Ｆ⪪θ «↑⸿⸿Ｆ⪪ιＩη«κ↙ Try it online! Link is to verbose version of code. Explanation:
  θ                 First input
 ⪪                  Split on spaces
Ｆ   «               Loop over each word
     ↑⸿⸿            Move the cursor to the top row and two columns right
          ι         Current wordＩη
            η       Second input
           Ｉ        Cast to integer
         ⪪          Split into substrings of that length
        Ｆ    «      Loop over each substring
              κ     Print the substring
               ↙    Move the cursor down and left

Following the challenge rules, I've accepted this as the shortest answer (as of Oct. 6th, 2017).

SOGL V0.12, 28 27 26 bytes
ā,θ{0Eā;{ēb÷eb‰⁴bH*+I;Iž}┼

Try it Here!
I did implement ‰ while making this, but the documentation for it existed before.
Explanation:
ā                            push an empty array - the main canvas
 ,                           push the first input
  θ{                         for each word (pushing the word each time)
    0E                         set the variable E to 0
      ā;                       below the current word place an empty array - current word canvas
        {               }      for each character of the word
         ēb÷                     push (E++ // B) - note that E is incremented after being used
            eb‰                  push E positive modulo B - like regular modulo but in the 0 output case it gives B
               ⁴                 duplicate the item below ToS
                bH               push B-1
                  *              multiply [(E++ // B) and B-1]
                   +             add [that multiplication to E‰B] - current letters X position
                    I            increase the X position to have one leading space row
                     ;           swap top 2 items - current X position and (E++ // B)
                      I          increase to create current letters Y position
                       ž         in those positions insert the current letter in the current words canvas
                         ┼     append to main canvas current word canvas horizontally

Javascript ES6 , 187 183 174 166 163 148 145 143 141 140 138 bytes

for readability added some bytes in the code and removed them in the bytes count
instead of s="",j=0 i did j=s=""
instead of for(i in s) - regular for loop - removed 1 byte
using already generated values in the indexers of the arrays - removed 8 bytes
using already with value i= s.length (from the first loop) in the eval - instead of the real array length - causes trailing space which are allowed
using map of S instead of eval - reduces by 3 bytes
using fill instead on initializing empty array- so there is not need for the loop in the map result
could replace || with | - reduced by 2 bytes
thanks to @Justin Mariner - replace occurrences ==" " with <"!" reduces 2 bytes
moved the conditions from the a[I] to the other statement to reduces one " u<"!" " - reduces 2 bytes
instead of (I+=2,j=0) - j=!(I+=2) - reduced 1 byte
"for of" instead of for

F=(s,n)=>{R=[I=j=i=0]
for(u of s)
a=R[z=u<"!"?j=!(I+=2):(j%n&&I++,j++/n|0)]=R[z]||[...s].fill` `,a[I]=u
return R.map(x=>x.join``).join`
`}
console.log(F("This is a large string", 3));
console.log(F("This is an even larger string!", 2));
console.log(F("Ooooh dear, what a big string you have!", 3));
console.log(F("Staphylococcus saprophyticus", 4));
console.log(F("I hope you find this challenge interesting", 2));
console.log(F("Well, this test case looks kinda pointless now doesn't it?", 15));
console.log(F("This one looks a lot more interesting!", 1))
console.log(F("Keep in mind, people: 'Punctuation! Does! Matter!'", 2));

You should be able to save a couple bytes by using <"!" instead of ==" ".

C#, 200 bytes
int x=-2,y=0;Regex.Split(i,@"\s+").ToList().ForEach(w =>{y=0;Regex.Matches(w,".{0,"+s+"}").Cast<Match>().ToList().ForEach(c=>{x+=(y==0?2:s-1);Console.SetCursorPosition(x,y);Console.Write(c);y++;});});

Where the string is specified by i and the size is specified by s.
E.g.
string i = "Staphylococcus saprophyticus";
int s = 2;
int x=-2,y=0;Regex.Split(i,@"\s+").ToList().ForEach(w =>{y=0;Regex.Matches(w,".{0,"+s+"}").Cast<Match>().ToList().ForEach(c=>{x+=(y==0?2:s-1);Console.SetCursorPosition(x,y);Console.Write(c);y++;});});

Basically, the first part Regex.Split uses white spaces to split the sentence into words, and the Regex.Matches splits each word into chunks specified by s. The chunk is written to Cursor position (x,y) where Y is set to 0 for every new word, and x is incremented by 2 for the first chunk of a word and subsequently (s-1) for each chunk.
x starts off it's life at -2 to ensure it's first use is set to 0.
I'm not knowledgable enough in C# trivia to be able to to make it smaller, but suspect it probably can be.

Any particular reason why you use s for an int, and i for a string, instead of the other way around?

Ha ha! No idea - just a quick time waster on my lunch break. I for input and s for size, perhaps?

Python 2, 203 199 bytes
s,l=input()
S=s.split()
x=[]
for w in S:L=len(w);W=[i/l*~-l*' '+w[i:i+l]for i in range(0,L,l)];x+=[[c.ljust(L/l*~-l+L%l)for c in W+['']*len(s)]]
for l in zip(*x):
 L=' '.join(l)
 if L.strip():print L

Try it online!

' '*(i/l*(l-1)) can be i/l*~-l*' '.

202 bytes.

Perl 5, 59 bytes
55 bytes code + 4 for -ai.
$-=s/.{$^I}\K(?=.)/\x1b[1B\x1b[1D/g,print$_,"\x1b[1A"x$-,$"for@F

Note: the \x1bs are literal ESC chars, but escaped here for easy copy and paste.
This script utilises ANSI escape sequences and requires input via the -i flag which is non-standard. If either of these are not acceptable, please let me know and I'll updated.
Example runs
perl -ai3 string-stairs.pl <<< 'This is a large string' 2>/dev/null
Thi is a lar  str
  s        ge   ing

perl -ai2 string-stairs.pl <<< 'This is an even larger string!' 2>/dev/null
Th  is an ev  la   st
 is        en  rg   ri
                er   ng
                      !

perl -ai3 string-stairs.pl <<< 'Ooooh dear, what a big string you have!' 2>/dev/null
Ooo  dea  wha a big str   you hav
  oh   r,   t         ing       e!

perl -ai4 string-stairs.pl <<< 'Staphylococcus saprophyticus' 2>/dev/null
Stap        sapr
   hylo        ophy
      cocc        ticu
         us          s

perl -ai2 string-stairs.pl <<< 'I hope you find this challenge interesting' 2>/dev/null
I ho  yo fi  th  ch    in
   pe  u  nd  is  al    te
                   le    re
                    ng    st
                     e     in
                            g

perl -ai15 string-stairs.pl <<< "Well, this test case looks kinda pointless now doesn't it?" 2>/dev/null
Well, this test case looks kinda pointless now doesn't it?

perl -ai1 string-stairs.pl <<< 'This one looks a lot more interesting!' 2>/dev/null
T o l a l m i
h n o   o o n
i e o   t r t
s   k     e e
    s       r
            e
            s
            t
            i
            n
            g
            !

perl -ai2 string-stairs.pl <<< "Keep in mind, people: 'Punctuation! Does! Matter!'" 2>/dev/null
Ke  in mi  pe   'P       Do   Ma
 ep     nd  op   un       es   tt
         ,   le   ct       !    er
              :    ua            !'
                    ti
                     on
                      !


text:
Deep Search a List
For this challenge, a list is considered valid if and only if it consists entirely of integers and valid lists (recursive definitions \o/). For this challenge, given a valid list and an integer, return a list of all depths at which the integer can be found.
Example
Let's consider list [1, [2, [3, [1, 2, 3], 4], 1], 1] and integer 1. Then, we can draw out the list like this:
Depth 0 1 2 3
Num   1
        2
          3
            1
            2
            3
          4
        1
      1

You'll notice that 1 shows up at depths 0, 1, 3. Thus, your output should be 0, 1, 3 in some reasonable format (order does not matter).
The depth may be either 0- or 1-indexed, but please specify in your submission which one it is.
Test Cases (0-indexed)
For list [1,[2,[3,4],5,[6,7],1],[[[[5,2],4,[5,2]]],6],3]:
1 -> [0, 1]
2 -> [1, 4]
3 -> [0, 2]
4 -> [2, 3]
5 -> [1, 4]
6 -> [1, 2]
7 -> [2]

For list [[[[[1],0],1],0],1]:
0 -> 1, 3
1 -> 0, 2, 4

For list [11,22,[33,44]]:
11 -> [0]
22 -> [0]
33 -> [1]
44 -> [1]

Return an empty list if the search term does not exist in the list anywhere.
Negative and zero values are valid in the input list and term.

If the integer appears at one depth multiple times, do we have to only return that depth number once?

@Giuseppe yes, that's correct.

May we assume that there are no zeros in th list?

@Adám Well given that one of my test cases has zeros, no. Also I will add that negative integers are fair game.

Multi-digit numbers should also be added in a test case, if they can occur.

@Zgarb thanks for the suggestion, will do.

Few questions: Can we take the list input as string? Can we take the integer input as string? May we output the result displaying the same depth multiple times and/or in random order (i.e. your example would output [0,3,1,0])?

@KevinCruijssen Yes, yes, no, and yes. So you can take inputs both as strings, and you can display the depth in any order, but not multiple times.

Is there a maximum depth that must be supported?

@Jakob reasonable depth; probably your language's recursion depth. should theoretically work for any depth

Haskell, 102 93 80 76 bytes
Thanks Bruce Forte for saving some bytes, and Laikoni for saving some more.
Thanks 4castle for saving 4 bytes.
Haskell has no data type for this kind of list, so I made my own.
This solution is 1-indexed
import Data.List
data T=E Int|L[T]
E n%x=[0|x==n]
L s%x=nub$map(+1).(%x)=<<s

Try it online!
First I define (recursively) a data type T
T has either type E Int (single element of type Int) or L[L] (list of type T).
(%) is function that takes 2 arguments, on of type T, the list through which we are searching, and x, the Int we are looking for.
Whenever (%) finds something that is a single element E n, it checks n for equality with x and returns 0 if True.
When (%) is applied to an L s (where s has type [T]) it runs (%) on all the elements of s and increments the result (as the depth is increasing since we are looking inside s), and the concatenates the result.
nub then removes the duplicates from the list
NB. import Data.List is only for nub.

I came up with a quite similar solution for 81 bytes: Try it online!

@Laikoni Very nice, do you want to post it yourself, or do you suggest I update mine?

Feel free to update your answer. :)

Concerning the NB: I tried to get rid of the import, but endet up at 88 bytes: Try it online!

You can remove the parenthesis around E n and L s.

@4castle Wow! I thought type constructors always needed parentheses.

Mathematica, 25 bytes
Tr/@Union[1^Position@##]&

(returns 1-indexed output)
Explanation
                         test  {1, {2, {3, {1, 2, 3}, 4}, 1}, 1}
             Position[test,1]  {{1}, {2, 2, 2, 1}, {2, 3}, {3}}
           1^Position[test,1]  {{1}, {1, 1, 1, 1}, {1, 1}, {1}}
    Union[1^Position[test,1]]  {{1}, {1, 1}, {1, 1, 1, 1}}
Tr/@Union[1^Position[test,1]]  {1, 2, 4}

Python 2, 68 bytes
f=lambda l,k,d=-1:l>[]and f(l[0],k,d+1)|f(l[1:],k,d)or{d}-{d+(l==k)}

Try it online!

R, 101 95 92 100 bytes
f=function(L,n,d=0)unique(unlist(Map(function(x)if(n%in%unlist(x))"if"(is.list(x),f(x,n,d+1),d),L)))

Try it online!
Recursive solution; it's quite inefficient in bytes, but R lists are super annoying to work with.
Basically, takes L, and for each element x of L, (which is either a list or an atomic vector of one element), checks if n is %in% x, then checks if x is a list. If it isn't, then x==n so we return the depth d; otherwise we recursively call f on x, incrementing d.
This, of course, returns a list, which we unlist and unique to ensure the right output (returning a vector of integer depths); returns NULL (an empty list) for invalid n.
Apparently, %in% doesn't search recursively through a list like I thought, so I have to unlist(x) for +8 bytes :(

Jelly, 11 8 bytes
WẎÐĿċ€IT

Try it online!
How it works
WẎÐĿċ€IT  Main link. Left argument: A (array). Right argument: n (integer)

W         Wrap; yield [A].
  ÐĿ      Repeatedly apply the link to the left until the results are no longer
          unique. Yield the array of all unique results.
 Ẏ          Concatenate all elements at depth 1 in the array.
          The last array of the array of results is completely flat.
    ċ€    Count the occurrences of n in each intermediate result.
      I   Compute all forward differences.
       T  Truth; yield the array of all indices of non-zero differences.

Example run
For left argument
[1, [2, [3, [1, 2, 3], 4], 1], 1]

W first yields the following array.
[[1, [2, [3, [1, 2, 3], 4], 1], 1]]

ẎÐĿ repeatedly concatenates all elements at depth 1, reducing the depth of the array by 1 in each step. This yields the following array of intermediate results.
[
 [[1, [2, [3, [1, 2, 3], 4], 1], 1]],
 [ 1, [2, [3, [1, 2, 3], 4], 1], 1 ],
 [ 1,  2, [3, [1, 2, 3], 4], 1,  1 ],
 [ 1,  2,  3, [1, 2, 3], 4,  1, 1  ],
 [ 1,  2,  3,  1, 2, 3,  4,  1, 1  ]
]

For right argument 1, ċ€ counts the occurrences of 1 in each intermediate result.
[0, 2, 3, 3, 4]

I now takes all forward differences.
[2, 1, 0, 1]

Non-zero differences correspond to steps in which at least one other 1 was added to depth 1. Thus, a non-zero difference at index k indicates the presence of a 1 at depth k. T finds the indices of all truthy elements, yielding the desired result:
[1, 2, 4]

\o/ this was my exact solution when comparing Jelly to Python. yay! :P

Python 2, 72 bytes
f=lambda l,k,d=0:set([d]*(k in l)).union(*[f(x,k,d+1)for x in l if[]<x])

Try it online!

APL (Dyalog), 39 bytes*
Full program. Prompts for list, then for number. Prints 1-based list to STDOUT.
⌊2÷⍨⍸∨⌿⍞⍷⎕FMT⎕JSON⍠'Compact'0⊢⎕

Try it online!
⎕ prompt for list
⊢ yield that (separates 0 and ⎕)
⎕JSON⍠'Compact'0 convert to indented JSON string with newlines
⎕FMT convert to matrix (one newline-delimited line per row)
⍞⍷ prompt for number as string and indicate where it begins in that
∨⌿ vertical OR reduction (i.e. which columns it begins in)
⍸ indices of those beginnings
2÷⍨ halve that (levels are indented with two spaces)
⌊ round down (because first data column is column 3)

* In Dyalog Classic, counting ⍸ as ⎕U2378 and ⍠ as ⎕OPT.

JavaScript (ES6), 79 68 bytes
f=(a,n,r=new Set,d=0)=>a.map(e=>e.map?f(e,n,r,d+1):e-n||r.add(d))&&r

Returns a Set. If this is unacceptable, use &&[...r] at a cost of 5 bytes.

PHP, 117 bytes
$r;function z($a,&$r,$i=0){foreach($a as $v){is_int($v)?(@in_array($i,$r[$v])?:$r[$v][]=$i):z($v,$r,$i+1);}}z($s,$r);

Try it online!

Octave, 126 122 bytes
function n=r(p,t,l)n=[];if nargin<3
l=0;end
for x=p
if iscell(q=x{1})a=r(q,t,l+1);else
a=l*find(q==t);end
n=union(n,a);end

Try it online!
For readability, I replaced spaces or ;'s with line ends where possible.
Explanation of ungolfed code:
function n=r(p,t,l) % Declare function with list p, integer t and optional recursion depth l
n=[];
if nargin<3
    l=0;            % If l is not given (first iteration), set l to zero (or one for 1-indexing)
end
for x=p             % Loop over list
if iscell(q=x{1})   % If loop variable x is a cell, we must go down one level.
     a=r(q,t,l+1);  % So recurse to l+1.
else
    a=l*find(q==t); % Empty if q~=t (because find(false)==[], and l*[]==[]), else equal to l*1==l.
end
n=union(n,a);       % Append to list of levels, make sure we only get distinct values.
end

APL (Dyalog Classic), 31 30 bytes
Function. Left arg ⍺ is the needle, right arg ⍵ is the haystack.
{×≢⍵:(⍳⍺∊⍵),1+⍺∇⊃,/⍵/⍨≢¨⍴¨⍵⋄⍬}

Try it online!

JavaScript (ES6), 73 74 bytes
f=(a,n,i=0,o={})=>a.map(e=>e.pop?f(e,n,i+1,o):e-n||o[i]++)&&Object.keys(o)

Explanation:
f=(a,                             //input array
   n,                             //input number to search
   i=0,                           //start at first level
   o={}                           //object to store the finds
  )=>
    a.map(                        //loop through the array
      e => e.pop ?                //is this element an array?
             f(e, n, i+1, o) :    //if so, recurse on it to the next level
             e-n || o[i]++        //otherwise, update o if element equals the number
    ) &&
    Object.keys(o)                //return o's keys

Test cases

f=(a,n,i=0,o={})=>a.map(e=>e.pop?f(e,n,i+1,o):e-n||o[i]++)&&Object.keys(o)

var a = [1,[2,[3,4],5,[6,7],1],[[[[5,2],4,[5,2]]],6],3];
console.log(f(a,1));
console.log(f(a,2));
console.log(f(a,3));
console.log(f(a,4));
console.log(f(a,5));
console.log(f(a,6));
console.log(f(a,7));

console.log('___________');
var a = [[[[[1],0],1],0],1];
console.log(f(a,0));
console.log(f(a,1));

console.log('___________');
var a = [11,22,[33,44]];
console.log(f(a,11)) // [0]
console.log(f(a,22)) // [0]
console.log(f(a,33)) // [1]
console.log(f(a,44)) // [1]
console.log(f(a,55)) // empty set

Although there are no test cases [yet], my reading of the question suggests that it's valid for e[0] to be zero, which would throw off your test.

@Neil, excellent point.  Now changed to e.pop for a loss of one byte.

Python 3, 123 86 82 bytes
def f(a,n,l=[],d=0):
 for e in a:l+=[d]*(e==n);0*e==[]and f(e,n,l,d+1)
 return{*l}

Try it online!
-37 bytes thanks to Hyper Neutrino and ovs
-4 bytes thanks to Jonathan Frech

Try if type(a[i])!=int for -1 byte

Try l+=[d] for -5 bytes

Try l+=[d]*(a[i]==n) for -whatever_number_of_bytes_it_is

[]==a[i]*0 for a shorter type check

Try iterating through a instead of a range and using getitem so much for -~20 bytes

86 bytes including @HyperNeutrinos improvements

82 bytes.

Jelly,  17  16 bytes
⁴e®;©ȧ⁸ḟ⁴ẎµÐĿȧ®T’

A full program taking two command line arguments the list and an element to check for, and printing the depth or depths (if any) at which the element exists. The results are 1-indexed.
Try it online!
How?
⁴e®;©ȧḟ⁴ẎµÐĿȧ®T’ - Main link: list, L
          µÐĿ    - loop, collecting updated values of L, until a fixed point is reached:
⁴                -   4th argument (2nd program input) = the number
 e               -   exists in (the current version of) L?
  ®              -   recall value from the register (initially 0)
   ;             -   concatenate the two
    ©            -   (copy this result to the register)
       ⁴         -   4th argument (2nd program input) again
      ḟ          -   filter out (discard any instances of the number)
     ȧ           -   logical and (non-vectorising)
        Ẏ        -   tighten (flatten the filtered L by one level to create the next L)
             ®   - recall value from the register
            ȧ    - logical and (non-vectorising)
              T  - truthy indexes (1-indexed)
               ’ - decrement (account for the leading zero from the initial register)

Nice! Fun fact though: by using a very similar approach but by changing the order of things a bit, you can get 8 bytes. edit the approach is actually a bit different, nvm

This doesn't quite work: https://tio.run/##y0rNyan8//9R45ZU60MrD607sfxR446HO@YDBR7u6ju09fCEI/tPLD@0LuRRw8z///9HG@pEG@lEG@uYxOqY6kSb6ZjH6hjG6kQDgamOUayOiQ6Yjo3VMYvVMY79bwgA

Hmm found bugs during the write up... deleting for now.

Ah I had somehow changed the order of my concatenation :/ should be working now

Vyxal, 75 bitsv2, 9.375 bytes
w⁽Þf↔ƛ⁰O;¯T

Try it Online!
Might be able to shave off a byte here, port of Jelly

Java, 154 + 19 = 173 bytes
import java.util.*;

Set<Long>f(List l,long n){Set s=new HashSet();if(l.contains(n))s.add(0l);for(Object o:l)if(o instanceof List)for(long d:f((List)o,n))s.add(d+1);return s;}

Try It Online
Ungolfed method
Set<Long> f(List l, long n) {
    Set s = new HashSet();
    if (l.contains(n))
        s.add(0l);
    for (Object o : l)
        if (o instanceof List)
            for (long d : f((List) o, n))
                s.add(d + 1);
    return s;
}

ReRegex, 299 bytes
#import math
(a[^<>\[\]]*?)\[/$1</(a.*?(_*)<[^<>\[\]]*?)\[/$1_$2</(a.*?(_*)<[^<>\[\]]*?)\]/$1$2>/(a.*?(_*)>[^<>\[\]]*?)\[/$1$2</(a.*?_(_*)>[^<>\[\]]*?)\]/$1$2>/a([^\[\]]*$)/bb$1/^(.*?)b(.*)b(.*?(_*)<[^<]*)\1/$1b$2,d<$4>b$3/^(.*?)b,?(.*)b(.(?!\1))*$/$2/(,|^)([^,<>\[\]]+)([^<>\[\]]*),\2/$1$2$3/#input

With comments
#import math
# Count the depths of all braces
(a[^<>\[\]]*?)\[/$1</
(a.*?(_*)<[^<>\[\]]*?)\[/$1_$2</
(a.*?(_*)<[^<>\[\]]*?)\]/$1$2>/
(a.*?(_*)>[^<>\[\]]*?)\[/$1$2</
(a.*?_(_*)>[^<>\[\]]*?)\]/$1$2>/
# Move to step b
a([^\[\]]*$)/bb$1/
# Record all the depths of all instances of the input
^(.*?)b(.*)b(.*?(_*)<[^<]*)\1/$1b$2,d<$4>b$3/
# Move to finalize
^(.*?)b,?(.*)b(.(?!\1))*$/$2/
# Deduplicate
(,|^)([^,<>\[\]]+)([^<>\[\]]*),\2/$1$2$3/
#input

Try it online!

Ruby, 63 bytes
f=->n,a,x=0{a.map{f[n,_1,x+1]rescue n==_1 ?x:p}.flatten-[p]|[]}

Attempt This Online!

Perl 5 -a, 65 bytes
$q=<>;s,-?\d+,$q-$&||$k{$`=~y/\[//-$`=~y/]//}++,ge;say for keys%k

Try it online!
Result is 1-indexed.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/