<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>irctc on Aldrin Jenson</title>
    <link>/tags/irctc/</link>
    <description>Aldrin Jenson (irctc)</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Mon, 11 Mar 2024 12:00:00 -0400</lastBuildDate>
    
    <atom:link href="/tags/irctc/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>Fetching Train availability in IRCTC</title>
      <link>/til/fetching-train-availability-in-irctc/</link>
      <pubDate>Mon, 11 Mar 2024 12:00:00 -0400</pubDate>
      
      <guid>/til/fetching-train-availability-in-irctc/</guid>
      <description>&lt;h3 id=&#34;problem&#34;&gt;Problem&lt;/h3&gt;
&lt;p&gt;When you search for trains in &lt;a href=&#34;https://www.irctc.co.in&#34;&gt;irctc&lt;/a&gt; page, it never shows the seat availability directly. You&amp;rsquo;ll have to manually go and click the refresh button of every listed train&lt;/p&gt;
&lt;center&gt;
  &lt;img src=&#34;/images/til/fetching-train-availability-in-image-2-1-1-1.jpg&#34; width=&#34;700&#34; alt=&#34;List of trains, but availability is not present&#34;&gt;
  &lt;p class=&#39;caption&#39;&gt;List of trains, but availability is not present&lt;/p&gt;
&lt;/center&gt;
&lt;h3 id=&#34;steps-to-fix&#34;&gt;Steps to fix&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Search for trains in &lt;a href=&#34;https://www.irctc.co.in&#34;&gt;https://www.irctc.co.in&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Apply filters to narrow down the list of trains&lt;/p&gt;
&lt;center&gt;
&lt;/li&gt;
&lt;/ol&gt;
  &lt;img src=&#34;/images/til/fetching-train-availability-in-image-1-1-1-1.jpg&#34; width=&#34;700&#34; alt=&#34;Narrow down list of trains using filters&#34;&gt;
  &lt;p class=&#39;caption&#39;&gt;Narrow down list of trains using filters&lt;/p&gt;
&lt;/center&gt;
&lt;ol start=&#34;3&#34;&gt;
&lt;li&gt;Paste the following script in console to get the availability status of all trains at once&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;document.&lt;span style=&#34;color:#a6e22e&#34;&gt;querySelectorAll&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;.fa.fa-repeat&amp;#39;&lt;/span&gt;).&lt;span style=&#34;color:#a6e22e&#34;&gt;forEach&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;el&lt;/span&gt;=&amp;gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;el&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;click&lt;/span&gt;())
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ol start=&#34;4&#34;&gt;
&lt;li&gt;The end. Tada!&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;note&#34;&gt;Note:&lt;/h3&gt;
&lt;p&gt;Ensure that you always try this out after narrowing down the list using filters. Else it&amp;rsquo;ll be too many requests going on at once.&lt;/p&gt;
</description>
    </item>
    
  </channel>
</rss>
