ਵੈੱਬ ਨੂੰ ਕੈਪਚਰ ਅਤੇ ਕਨਵਰਟ ਕਰਨ ਲਈ ਟੂਲ

ਰੂਬੀ ਨਾਲ ਵੈਬਸਾਈਟਾਂ ਤੋਂ HTML ਟੇਬਲ ਕੈਪਚਰ ਕਰੋ

ਰੂਬੀ ਏ.ਪੀ.ਆਈ.

HTML ਟੇਬਲ ਤਬਦੀਲ ਕਰ ਰਿਹਾ ਹੈ into ਜੇ ਐਸ ਐੱਨ, ਸੀ ਐੱਸ ਵੀ ਅਤੇ ਐਕਸਲ ਸਪਰੈਡਸ਼ੀਟ ਵਰਤਦੇ ਹੋਏ ਗਰੈਬਜ਼ਿਟ ਦਾ ਰੂਬੀ ਏ.ਪੀ.ਆਈ. ਪੂਰਬ ਹੈ, ਸਿਰਫ ਇੱਥੇ ਦਿਖਾਇਆ ਉਦਾਹਰਣ ਦੀ ਪਾਲਣਾ ਕਰੋ. ਪਰ ਤੁਹਾਨੂੰ ਸ਼ੁਰੂ ਕਰਨ ਤੋਂ ਪਹਿਲਾਂ ਯਾਦ ਰੱਖੋ ਕਿ ਫੋਨ ਕਰਨ ਤੋਂ ਬਾਅਦ url_to_table, html_to_table or file_to_table theੰਗ save or save_to ਟੇਬਲ ਨੂੰ ਹਾਸਲ ਕਰਨ ਲਈ methodੰਗ ਨੂੰ ਬੁਲਾਇਆ ਜਾਣਾ ਚਾਹੀਦਾ ਹੈ. ਜੇ ਤੁਸੀਂ ਜਲਦੀ ਦੇਖਣਾ ਚਾਹੁੰਦੇ ਹੋ ਕਿ ਇਹ ਸੇਵਾ ਤੁਹਾਡੇ ਲਈ ਸਹੀ ਹੈ ਜਾਂ ਨਹੀਂ, ਤੁਸੀਂ ਕੋਸ਼ਿਸ਼ ਕਰ ਸਕਦੇ ਹੋ HTML ਟੇਬਲ ਕੈਪਚਰ ਕਰਨ ਦਾ ਸਿੱਧਾ ਪ੍ਰਦਰਸ਼ਨ ਇੱਕ ਯੂਆਰਐਲ ਤੋਂ.

ਮੁ Optionsਲੇ ਚੋਣਾਂ

ਹੇਠਾਂ ਦਿੱਤੀ ਉਦਾਹਰਣ ਇੱਕ ਖਾਸ ਵੈਬਪੰਨੇ ਵਿੱਚ ਪਹਿਲੇ HTML ਟੇਬਲ ਨੂੰ ਬਦਲਦੀ ਹੈ intਸੀਐਸਵੀ ਦਸਤਾਵੇਜ਼

grabzItClient.url_to_table("https://www.tesla.com")
# Then call the save or save_to method
grabzItClient.html_to_table("<html><body><table><tr><th>Name</th><th>Age</th></tr>
    <tr><td>Tom</td><td>23</td></tr><tr><td>Nicola</td><td>26</td></tr>
    </table></body></html>")
# Then call the save or save_to method
grabzItClient.file_to_table("tables.html")
# Then call the save or save_to method

ਜੇ ਤੁਸੀਂ ਆਪਣੇ ਵੈੱਬ ਪੇਜ 'ਤੇ ਪਹਿਲੀ ਟੇਬਲ ਨੂੰ ਆਪਣੇ ਆਪ ਬਦਲਣਾ ਨਹੀਂ ਚਾਹੁੰਦੇ ਹੋ ਤਾਂ ਤੁਸੀਂ tableNumberToInclude .ੰਗ. ਉਦਾਹਰਣ ਵਜੋਂ ਇੱਕ 2 ਨਿਰਧਾਰਤ ਕਰਨਾ ਇੱਕ ਵੈੱਬ ਪੇਜ ਵਿੱਚ ਪਾਈ ਗਈ ਦੂਜੀ ਟੇਬਲ ਨੂੰ ਬਦਲ ਦੇਵੇਗਾ.

grabzItClient = GrabzIt::Client.new("Sign in to view your Application Key", "Sign in to view your Application Secret")

options = GrabzIt::TableOptions.new()
options.tableNumberToInclude = 2

grabzItClient.url_to_table("https://www.tesla.com", options)
# Then call the save or save_to method
grabzItClient.save_to("result.csv"
grabzItClient = GrabzIt::Client.new("Sign in to view your Application Key", "Sign in to view your Application Secret")

options = GrabzIt::TableOptions.new()
options.tableNumberToInclude = 2

grabzItClient.html_to_table("<html><body><table><tr><th>Name</th><th>Age</th></tr>
    <tr><td>Tom</td><td>23</td></tr><tr><td>Nicola</td><td>26</td></tr>
    </table></body></html>", options)
# Then call the save or save_to method
grabzItClient.save_to("result.csv")
grabzItClient = GrabzIt::Client.new("Sign in to view your Application Key", "Sign in to view your Application Secret")

options = GrabzIt::TableOptions.new()
options.tableNumberToInclude = 2

grabzItClient.file_to_table("tables.html", options)
# Then call the save or save_to method
grabzItClient.save_to("result.csv")

ਤੁਸੀਂ ਇਹ ਵੀ ਨਿਰਧਾਰਤ ਕਰ ਸਕਦੇ ਹੋ targetElement ਉਹ thatੰਗ ਜੋ ਨਿਸ਼ਚਤ ਕੀਤੇ ਐਲੀਮੈਂਟ ਆਈਡੀ ਦੇ ਅੰਦਰ ਸਿਰਫ ਟੇਬਲ ਨੂੰ ਹੀ ਬਦਲਿਆ ਜਾਵੇਗਾ.

grabzItClient = GrabzIt::Client.new("Sign in to view your Application Key", "Sign in to view your Application Secret")

options = GrabzIt::TableOptions.new()
options.targetElement = "stocks_table"

grabzItClient.url_to_table("https://www.tesla.com", options)
# Then call the save or save_to method
grabzItClient.save_to("result.csv")
grabzItClient = GrabzIt::Client.new("Sign in to view your Application Key", "Sign in to view your Application Secret")

options = GrabzIt::TableOptions.new()
options.targetElement = "stocks_table"

grabzItClient.html_to_table("<html><body><table id='stocks_table'><tr><th>Name</th><th>Age</th></tr>
    <tr><td>Tom</td><td>23</td></tr><tr><td>Nicola</td><td>26</td></tr>
    </table></body></html>", options)
# Then call the save or save_to method
grabzItClient.save_to("result.csv")
grabzItClient = GrabzIt::Client.new("Sign in to view your Application Key", "Sign in to view your Application Secret")

options = GrabzIt::TableOptions.new()
options.targetElement = "stocks_table"

grabzItClient.file_to_table("tables.html", options)
# Then call the save or save_to method
grabzItClient.save_to("result.csv")

ਜੇ ਤੁਸੀਂ ਐਕਸਐਲਐਸਐਕਸ ਫਾਰਮੈਟ ਦੀ ਵਰਤੋਂ ਕਰਦੇ ਹੋ ਤਾਂ ਤੁਸੀਂ ਵੈਬਪੰਨੇ ਤੇ ਸਾਰੇ ਟੇਬਲਾਂ ਨੂੰ ਸਹੀ ਤੇ ਪਾਸ ਕਰ ਸਕਦੇ ਹੋ includeAllTables .ੰਗ. ਇਹ ਫਿਰ ਹਰੇਕ ਟੇਬਲ ਨੂੰ ਸਪਰੈਡਸ਼ੀਟ ਵਰਕਬੁੱਕ ਦੇ ਅੰਦਰ ਇੱਕ ਨਵੀਂ ਸ਼ੀਟ ਵਿੱਚ ਪਾ ਦੇਵੇਗਾ.

grabzItClient = GrabzIt::Client.new("Sign in to view your Application Key", "Sign in to view your Application Secret")

options = GrabzIt::TableOptions.new()
options.format = "xlsx"
options.includeAllTables = true

grabzItClient.url_to_table("https://www.tesla.com", options)
# Then call the save or save_to method
grabzItClient.save_to("result.xlsx")
grabzItClient = GrabzIt::Client.new("Sign in to view your Application Key", "Sign in to view your Application Secret")

options = GrabzIt::TableOptions.new()
options.format = "xlsx"
options.includeAllTables = true

grabzItClient.html_to_table("<html><body><table><tr><th>Name</th><th>Age</th></tr>
    <tr><td>Tom</td><td>23</td></tr><tr><td>Nicola</td><td>26</td></tr>
    </table></body></html>", options)
# Then call the save or save_to method
grabzItClient.save_to("result.xlsx")
grabzItClient = GrabzIt::Client.new("Sign in to view your Application Key", "Sign in to view your Application Secret")

options = GrabzIt::TableOptions.new()
options.format = "xlsx"
options.includeAllTables = true

grabzItClient.file_to_table("tables.html", options)
# Then call the save or save_to method
grabzItClient.save_to("result.xlsx")

HTML ਟੇਬਲ ਨੂੰ JSON ਵਿੱਚ ਬਦਲੋ

ਗਰੈਬਜ਼ਿਟ ਨਾਲ, ਰੂਬੀ ਆਸਾਨੀ ਨਾਲ HTML ਟੇਬਲ ਬਦਲ ਸਕਦੇ ਹਨ into ਜੇ ਐਸ ਐੱਨ ਨੂੰ ਇਸ ਨਿਰਧਾਰਤ ਕਰਨ ਲਈ json ਫਾਰਮੈਟ ਪੈਰਾਮੀਟਰ ਵਿੱਚ. ਹੇਠਾਂ ਦਿੱਤੀ ਉਦਾਹਰਣ ਵਿਚ ਡੇਟਾ ਪੜ੍ਹਿਆ ਜਾਂਦਾ ਹੈ ਸਮਕਾਲੀ ਵਰਤ ਕੇ save_to methodੰਗ ਹੈ, ਇੱਕ ਦੇ ਤੌਰ ਤੇ JSON ਪ੍ਰਾਪਤ ਕਰਨ ਲਈ string. ਇਹ ਫਿਰ ਇੱਕ ਲਾਇਬ੍ਰੇਰੀ ਦੁਆਰਾ ਪਾਰਸ ਕੀਤਾ ਜਾ ਸਕਦਾ ਹੈ json ਰਤਨ.

grabzItClient = GrabzIt::Client.new("Sign in to view your Application Key", "Sign in to view your Application Secret")

options = GrabzIt::TableOptions.new()
options.format = "json"
options.tableNumberToInclude = 1

grabzItClient.url_to_table("https://www.tesla.com", options)

json = grabzItClient.save_to()
grabzItClient = GrabzIt::Client.new("Sign in to view your Application Key", "Sign in to view your Application Secret")

options = GrabzIt::TableOptions.new()
options.format = "json"
options.tableNumberToInclude = 1

grabzItClient.html_to_table("<html><body><table><tr><th>Name</th><th>Age</th></tr>
    <tr><td>Tom</td><td>23</td></tr><tr><td>Nicola</td><td>26</td></tr>
    </table></body></html>", options)

json = grabzItClient.save_to()
grabzItClient = GrabzIt::Client.new("Sign in to view your Application Key", "Sign in to view your Application Secret")

options = GrabzIt::TableOptions.new()
options.format = "json"
options.tableNumberToInclude = 1

grabzItClient.file_to_table("tables.html", options)

json = grabzItClient.save_to()

ਕਸਟਮ ਪਛਾਣਕਰਤਾ

ਤੁਸੀਂ ਇੱਕ ਕਸਟਮ ਪਛਾਣਕਰਤਾ ਨੂੰ ਪਾਸ ਕਰ ਸਕਦੇ ਹੋ ਸਾਰਣੀ ਵਿੱਚ shownੰਗ ਜਿਵੇਂ ਕਿ ਹੇਠਾਂ ਦਰਸਾਇਆ ਗਿਆ ਹੈ, ਇਹ ਮੁੱਲ ਫਿਰ ਤੁਹਾਡੇ ਗਰੈਬਜ਼ਆਈਟੀ ਰੂਬੀ ਹੈਂਡਲਰ ਨੂੰ ਵਾਪਸ ਕਰ ਦਿੱਤਾ ਜਾਵੇਗਾ. ਉਦਾਹਰਣ ਦੇ ਲਈ ਇਹ ਕਸਟਮ ਪਛਾਣਕਰਤਾ ਇੱਕ ਡੇਟਾਬੇਸ ਪਛਾਣਕਰਤਾ ਹੋ ਸਕਦਾ ਹੈ, ਜਿਸ ਨਾਲ ਸਕ੍ਰੀਨਸ਼ਾਟ ਨੂੰ ਕਿਸੇ ਵਿਸ਼ੇਸ਼ ਡਾਟਾਬੇਸ ਰਿਕਾਰਡ ਨਾਲ ਜੋੜਿਆ ਜਾ ਸਕਦਾ ਹੈ.

grabzItClient = GrabzIt::Client.new("Sign in to view your Application Key", "Sign in to view your Application Secret")

options = GrabzIt::TableOptions.new()
options.customId = "123456"

grabzItClient.url_to_table("https://www.tesla.com", options)
# Then call the save method
grabzItClient.save("http://www.example.com/handler/index")
grabzItClient = GrabzIt::Client.new("Sign in to view your Application Key", "Sign in to view your Application Secret")

options = GrabzIt::TableOptions.new()
options.customId = "123456"

grabzItClient.html_to_table("<html><body><h1>Hello World!</h1></body></html>", options)
# Then call the save method
grabzItClient.save("http://www.example.com/handler/index")
grabzItClient = GrabzIt::Client.new("Sign in to view your Application Key", "Sign in to view your Application Secret")

options = GrabzIt::TableOptions.new()
options.customId = "123456"

grabzItClient.file_to_table("example.html", options)
# Then call the save method
grabzItClient.save("http://www.example.com/handler/index")